-
Type:
Bug
-
Status: Closed (View Workflow)
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 10.3.7
-
Fix Version/s: 10.3.8
-
Labels:None
-
Funded by:
When replacing a solution, the file of the former solution is not deleted, so the students will see at least 2 files, the actual solution and all former solutions. This is a problem when working with dummy solutions if the solution is not ready when the task starts and solution is activated in the workflow.
This patch fixes that:
diff --git a/src/main/java/org/olat/course/nodes/gta/ui/EditSolutionController.java b/src/main/java/org/olat/course/nodes/gta/ui/EditSolutionController.java --- a/src/main/java/org/olat/course/nodes/gta/ui/EditSolutionController.java +++ b/src/main/java/org/olat/course/nodes/gta/ui/EditSolutionController.java @@ -68,7 +68,7 @@ this(ureq, wControl, solution, solutionDir, solutionContainer, false); } - private EditSolutionController(UserRequest ureq, WindowControl wControl, + public EditSolutionController(UserRequest ureq, WindowControl wControl, Solution solution, File solutionDir, VFSContainer solutionContainer, boolean replaceFile) { super(ureq, wControl); this.replaceFile = replaceFile; diff --git a/src/main/java/org/olat/course/nodes/gta/ui/GTASampleSolutionsEditController.java b/src/main/java/org/olat/course/nodes/gta/ui/GTASampleSolutionsEditController.java --- a/src/main/java/org/olat/course/nodes/gta/ui/GTASampleSolutionsEditController.java +++ b/src/main/java/org/olat/course/nodes/gta/ui/GTASampleSolutionsEditController.java @@ -247,7 +247,7 @@ } private void doReplace(UserRequest ureq, Solution solution) { - editSolutionCtrl = new EditSolutionController(ureq, getWindowControl(), solution, solutionDir, solutionContainer); + editSolutionCtrl = new EditSolutionController(ureq, getWindowControl(), solution, solutionDir, solutionContainer, true); listenTo(editSolutionCtrl); String title = translate("add.solution");