Skip to content

Commit

Permalink
add missing functionality
Browse files Browse the repository at this point in the history
  • Loading branch information
19mdavenport committed Nov 23, 2024
1 parent 8cb281b commit e031d03
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/main/java/edu/byu/cs/autograder/score/Scorer.java
Original file line number Diff line number Diff line change
Expand Up @@ -318,9 +318,11 @@ private Rubric.Results mergeResultsWithPrevious(Rubric.RubricType rubricType, Ru
float score = startingScore;

for (Submission previousSubmission : previousSubmissions) {
Rubric.RubricItem previousItem = previousSubmission.rubric().items().get(rubricType);
if (previousItem != null && previousItem.results().rawScore() <= results.rawScore()) {
score = Math.max(score, previousItem.results().score());
if(previousSubmission.passed()) {
Rubric.RubricItem previousItem = previousSubmission.rubric().items().get(rubricType);
if (previousItem != null && previousItem.results().rawScore() <= results.rawScore()) {
score = Math.max(score, previousItem.results().score());
}
}
}

Expand Down

0 comments on commit e031d03

Please sign in to comment.