From e031d03e2aee22ff648f35c38f1d46da1538009f Mon Sep 17 00:00:00 2001 From: 19mdavenport Date: Sat, 23 Nov 2024 00:44:34 +0000 Subject: [PATCH] add missing functionality --- src/main/java/edu/byu/cs/autograder/score/Scorer.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/main/java/edu/byu/cs/autograder/score/Scorer.java b/src/main/java/edu/byu/cs/autograder/score/Scorer.java index c090ddcb..50921373 100644 --- a/src/main/java/edu/byu/cs/autograder/score/Scorer.java +++ b/src/main/java/edu/byu/cs/autograder/score/Scorer.java @@ -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()); + } } }