diff --git a/src/main/java/de/tum/in/www1/artemis/service/CourseExamExportService.java b/src/main/java/de/tum/in/www1/artemis/service/CourseExamExportService.java index e1113146c25b..02cafe145c54 100644 --- a/src/main/java/de/tum/in/www1/artemis/service/CourseExamExportService.java +++ b/src/main/java/de/tum/in/www1/artemis/service/CourseExamExportService.java @@ -371,21 +371,18 @@ private List exportExercises(String notificationTopic, Set exerc continue; } - // Export programming exercise - if (exercise instanceof ProgrammingExercise programmingExercise) { - // Download the repositories' template, solution, tests and students' repositories - exportedExercises - .add(programmingExerciseExportService.exportProgrammingExerciseForArchival(programmingExercise, exportErrors, Optional.of(exerciseExportDir), reportData)); - continue; - } - - // Export the other exercises types - // Export options var submissionsExportOptions = new SubmissionExportOptionsDTO(); submissionsExportOptions.setExportAllParticipants(true); try { - if (exercise instanceof FileUploadExercise) { + // Export programming exercise + if (exercise instanceof ProgrammingExercise programmingExercise) { + // Download the repositories' template, solution, tests and students' repositories + exportedExercises.add( + programmingExerciseExportService.exportProgrammingExerciseForArchival(programmingExercise, exportErrors, Optional.of(exerciseExportDir), reportData)); + } + // Export the other exercises types + else if (exercise instanceof FileUploadExercise) { exportedExercises.add(fileUploadExerciseWithSubmissionsExportService.exportFileUploadExerciseWithSubmissions(exercise, submissionsExportOptions, exerciseExportDir, exportErrors, reportData)); }