Skip to content

Commit

Permalink
Update artemis4j and skip submissions where the assessment can't be l…
Browse files Browse the repository at this point in the history
…oaded (#66)
  • Loading branch information
Luro02 authored Nov 19, 2024
1 parent 0f1887b commit 7d0c745
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<dependency>
<groupId>edu.kit.kastel.sdq</groupId>
<artifactId>artemis4j</artifactId>
<version>7.5.6</version>
<version>7.5.7-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.jcommander</groupId>
Expand Down
11 changes: 10 additions & 1 deletion src/main/java/edu/kit/kastel/sdq/scorestats/cli/CLI.java
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,16 @@ private Assessments loadAssessments(GradingConfig config, ProgrammingExercise ex

for (ProgrammingSubmission submission : submissions) {
String studentId = submission.getParticipantIdentifier();
Assessment assessment = submission.openAssessment(config).orElse(null);
Assessment assessment = null;
try {
assessment = submission.openAssessment(config).orElse(null);
} catch (Exception e) {
// Artemis4j is not perfect and might crash while loading an assessment.
// If a crash occurs, the student will be skipped.
logger.error("Error while loading assessment for student %s, submission id: %d".formatted(studentId, submission.getId()), e);
continue;
}

if (assessment == null) {
skippedStudents.add(studentId);
continue;
Expand Down

0 comments on commit 7d0c745

Please sign in to comment.