Skip to content
Snippets Groups Projects
Commit 1f89c96e authored by Ron Lucke's avatar Ron Lucke
Browse files

fix #2752

Closes #2752

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