Skip to content

Commit

Permalink
fix: Average rubric score calculation [PT-187021319]
Browse files Browse the repository at this point in the history
When a score is removed from the rubric the value is set to 0 and in that case the scored question count should not be increased.
  • Loading branch information
dougmartin committed Mar 6, 2024
1 parent ece3441 commit fdea516
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion js/util/scoring.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export const computeAvgScore = (scoringSettings: ScoringSettings, rubric: Rubric
const rubricScores = getRubricScores(rubric, feedbacks);
const {totalScore, scoredQuestions} = rubricScores.reduce((acc, cur) => {
let {totalScore, scoredQuestions} = acc;
if (cur !== null) {
if (cur) {
totalScore += cur;
scoredQuestions++;
}
Expand Down

0 comments on commit fdea516

Please sign in to comment.