-
Bug
-
Resolution: Unresolved
-
Minor
-
None
-
3.9.19
-
2022112800
-
MOODLE_39_STABLE
Quiz completions that are marked as incorrect return as yellow not red.
We use unlimited resubmissions with manual grading. When graded as incorrect, we expect this to appear as red. Yellow suggests that a new attempt has been submitted?
I've changed the code with the following which looks to have fixed this issue, however I don't know if that will affect any other logic at this point.
In classes/completion_progress.php line 575:
// code placeholder
|
foreach ($rset as $compl) {
|
$submission = $this->submissions[$compl->userid][$compl->cmid] ?? null; |
if ($compl->completionstate == COMPLETION_INCOMPLETE && $submission && !$submission->graded) { |
$this->completions[$compl->userid][$compl->cmid] = 'submitted'; |
} else if ($compl->completionstate == COMPLETION_INCOMPLETE && $submission && $submission->graded) { |
$this->completions[$compl->userid][$compl->cmid] = COMPLETION_COMPLETE_FAIL; |
} else if ($compl->completionstate == COMPLETION_COMPLETE_FAIL && $submission && !$submission->graded) { |
$this->completions[$compl->userid][$compl->cmid] = 'submitted'; |
} else { |
$this->completions[$compl->userid][$compl->cmid] = $compl->completionstate; |
}
|
}
|