Rounding errors could lead to "Partially correct" for correct answers, see http://moodle.org/mod/forum/discuss.php?d=39548

This commit is contained in:
gustav_delius
2006-02-14 18:37:03 +00:00
parent 24edc235c6
commit 8c85be6698
+1 -1
View File
@@ -588,7 +588,7 @@ class quiz_default_questiontype {
// let student know wether the answer was correct
echo '<div class="correctness ';
if ($state->last_graded->raw_grade >= $question->maxgrade) {
if ($state->last_graded->raw_grade >= $question->maxgrade/1.01) { // We divide by 1.01 so that rounding errors dont matter.
echo ' correct">';
print_string('correct', 'quiz');
} else if ($state->last_graded->raw_grade > 0) {