Skip to content
Snippets Groups Projects
Commit a01aed40 authored by Ron Lucke's avatar Ron Lucke Committed by Jan-Hendrik Willms
Browse files

fix #2752

Closes #2752

Merge request studip/studip!1865
parent e11ea79b
No related branches found
No related tags found
No related merge requests found
......@@ -226,7 +226,7 @@
</form>
</template>
</studip-dialog>
<courseware-tasks-dialog-distribute v-if="showTasksDistributeDialog"/>
<courseware-tasks-dialog-distribute v-if="showTasksDistributeDialog" @newtask="reloadTasks"/>
</div>
</template>
......@@ -335,6 +335,7 @@ export default {
copyStructuralElement: 'copyStructuralElement',
companionSuccess: 'companionSuccess',
companionError: 'companionError',
loadAllTasks: 'courseware-tasks/loadAll'
}),
addFeedback(task) {
this.currentDialogFeedback.attributes = {};
......@@ -405,6 +406,14 @@ export default {
});
this.currentDialogTask = {};
},
reloadTasks() {
this.loadAllTasks({
options: {
'filter[cid]': this.context.id,
include: 'solver, structural-element, task-feedback, task-group, task-group.lecturer'
}
});
},
getSortClass(col) {
if (col === this.sortBy) {
return this.sortASC ? 'sortasc' : 'sortdesc';
......
......@@ -567,7 +567,6 @@ export default {
this.loadStructuralElement({ id: id, options: { include: 'children' } });
},
async distributeTask() {
this.setShowTasksDistributeDialog(false);
const taskGroup = {
attributes: {
title: this.taskTitle,
......@@ -604,6 +603,8 @@ export default {
await this.createTaskGroup({ taskGroup });
this.companionSuccess({ info: this.$gettext('Aufgaben wurden verteilt.') });
this.$emit('newtask');
this.setShowTasksDistributeDialog(false);
},
validateSolvers() {
if (
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment