Skip to content
Snippets Groups Projects
Commit e2b8f3dd authored by Ron Lucke's avatar Ron Lucke Committed by David Siegfried
Browse files

fix #1113

Closes #1113

Merge request studip/studip!667
parent 3080a873
No related branches found
No related tags found
No related merge requests found
......@@ -34,6 +34,7 @@
:title="structuralElement.attributes.title"
>
<span>{{ structuralElement.attributes.title || "" }}</span>
<span v-if="isTask">[ {{ solverName }} ]</span>
</li>
</template>
<template #breadcrumbFallback>
......@@ -672,6 +673,7 @@ export default {
sortMode: 'structuralElementSortMode',
viewMode: 'viewMode',
taskById: 'courseware-tasks/byId',
userById: 'users/byId',
}),
currentId() {
......@@ -1080,6 +1082,31 @@ export default {
return this.taskById({ id: this.structuralElement.relationships.task.data.id });
},
solver() {
if (this.task) {
const solver = this.task.relationships.solver.data;
if (solver.type === 'users') {
return this.userById({ id: solver.id });
}
if (solver.type === 'status-groups') {
return this.groupById({ id: solver.id });
}
}
return null;
},
solverName() {
if (this.solver) {
if (this.solver.type === 'users') {
return this.solver.attributes['formatted-name'];
}
if (this.solver.type === 'status-groups') {
return this.solver.attributes.name;
}
}
return '';
},
canAddElements() {
if (!this.isTask) {
return true;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment