Skip to content

Commit 2d09418

Browse files
Show individual statuses as themselves (bugfix)
Previously if there were multiple lab entrants, their background color would be set based on cumulative correctness. This was a bug; they should be shown separately. The only way to notice this is to fill in correct answers in the wrong order, so it's not obvious, but we want to handle this unusual case correctly. Signed-off-by: David A. Wheeler <[email protected]>
1 parent 272feba commit 2d09418

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/labs/checker.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ function runCheck() {
172172
let result = calcOneMatch(attempt, i, correctRe);
173173
if (!result) isCorrect = false;
174174
document.getElementById(`attempt${i}`).style.backgroundColor =
175-
isCorrect ? 'lightgreen' : 'yellow';
175+
result ? 'lightgreen' : 'yellow';
176176
};
177177
// isCorrect is now true only if everything matched
178178
let oldGrade = document.getElementById('grade').innerHTML;

0 commit comments

Comments
 (0)