getAeolusTemplate(@PathVariable ProgrammingLanguag
}
/**
- * GET /api/aeolus/templates/:language/:projectType : Get the aeolus template file with the given filename
- * GET /api/aeolus/templates/:language : Get the aeolus template file with the given filename
+ * GET /api/aeolus/template-scripts/:language/:projectType : Get the aeolus template file with the given filename
+ * GET /api/aeolus/template-scripts/:language : Get the aeolus template file with the given filename
*
* The windfile contains the default build plan configuration for new programming exercises.
*
@@ -91,7 +91,7 @@ public ResponseEntity getAeolusTemplate(@PathVariable ProgrammingLanguag
* @param testCoverage Whether the test coverage template should be used
* @return The requested file, or 404 if the file doesn't exist
*/
- @GetMapping({ "templateScripts/{language}/{projectType}", "templateScripts/{language}" })
+ @GetMapping({ "template-scripts/{language}/{projectType}", "template-scripts/{language}" })
@EnforceAtLeastEditor
public ResponseEntity getAeolusTemplateScript(@PathVariable ProgrammingLanguage language, @PathVariable Optional projectType,
@RequestParam(value = "staticAnalysis", defaultValue = "false") boolean staticAnalysis,
diff --git a/src/main/java/de/tum/cit/aet/artemis/quiz/domain/DragAndDropSubmittedAnswer.java b/src/main/java/de/tum/cit/aet/artemis/quiz/domain/DragAndDropSubmittedAnswer.java
index cfc17f0b42ee..7ab065bb4920 100644
--- a/src/main/java/de/tum/cit/aet/artemis/quiz/domain/DragAndDropSubmittedAnswer.java
+++ b/src/main/java/de/tum/cit/aet/artemis/quiz/domain/DragAndDropSubmittedAnswer.java
@@ -76,7 +76,6 @@ public DragItem getSelectedDragItemForDropLocation(DropLocation dropLocation) {
* @param question the changed question with the changed DragItems and DropLocations
*/
private void checkAndDeleteMappings(DragAndDropQuestion question) {
-
if (question != null) {
// Check if a dragItem or dropLocation was deleted and delete reference to it in mappings
Set selectedMappingsToDelete = new HashSet<>();
@@ -98,7 +97,6 @@ private void checkAndDeleteMappings(DragAndDropQuestion question) {
*/
@Override
public void checkAndDeleteReferences(QuizExercise quizExercise) {
-
// Delete all references to question, dropLocations and dragItem if the question was deleted
if (!quizExercise.getQuizQuestions().contains(getQuizQuestion())) {
setQuizQuestion(null);
diff --git a/src/main/java/de/tum/cit/aet/artemis/quiz/domain/DragItem.java b/src/main/java/de/tum/cit/aet/artemis/quiz/domain/DragItem.java
index bcf311e9e31c..e657930b29f9 100644
--- a/src/main/java/de/tum/cit/aet/artemis/quiz/domain/DragItem.java
+++ b/src/main/java/de/tum/cit/aet/artemis/quiz/domain/DragItem.java
@@ -109,6 +109,10 @@ public void setInvalid(Boolean invalid) {
this.invalid = invalid;
}
+ public void setMappings(Set mappings) {
+ this.mappings = mappings;
+ }
+
/**
* This method is called after the entity is saved for the first time. We replace the placeholder in the pictureFilePath with the id of the entity because we don't know it
* before creation.
diff --git a/src/main/java/de/tum/cit/aet/artemis/quiz/domain/DropLocation.java b/src/main/java/de/tum/cit/aet/artemis/quiz/domain/DropLocation.java
index 8237750bf7b0..468210dc7cab 100644
--- a/src/main/java/de/tum/cit/aet/artemis/quiz/domain/DropLocation.java
+++ b/src/main/java/de/tum/cit/aet/artemis/quiz/domain/DropLocation.java
@@ -128,6 +128,10 @@ public void setInvalid(Boolean invalid) {
this.invalid = invalid;
}
+ public void setMappings(Set mappings) {
+ this.mappings = mappings;
+ }
+
/**
* check if the DropLocation is solved correctly
*
diff --git a/src/main/java/de/tum/cit/aet/artemis/quiz/domain/ShortAnswerSolution.java b/src/main/java/de/tum/cit/aet/artemis/quiz/domain/ShortAnswerSolution.java
index f55298937de9..448507563f89 100644
--- a/src/main/java/de/tum/cit/aet/artemis/quiz/domain/ShortAnswerSolution.java
+++ b/src/main/java/de/tum/cit/aet/artemis/quiz/domain/ShortAnswerSolution.java
@@ -77,6 +77,10 @@ public void setQuestion(ShortAnswerQuestion shortAnswerQuestion) {
this.question = shortAnswerQuestion;
}
+ public void setMappings(Set