Skip to content
Permalink
Browse files

Rounding errors could lead to "Partially correct" for correct answers…

  • Loading branch information...
gustav_delius
gustav_delius committed Feb 14, 2006
1 parent 24edc23 commit 8c85be66982bfb441eedbc6c144982d6287c0884
Showing with 1 addition and 1 deletion.
  1. +1 −1 mod/quiz/questiontypes/questiontype.php
@@ -588,7 +588,7 @@ function print_question_grading_details(&$question, &$state, $cmoptions, $option
// 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) {

0 comments on commit 8c85be6

Please sign in to comment.
You can’t perform that action at this time.