Permalink
Browse files

Round $bestgrade when storing it to avoid insert_record problems

  • Loading branch information...
1 parent 20a3006 commit 38f03e5a5c37786b366497ba48ee170cf72dbb02 moodler committed Oct 21, 2002
Showing with 1 addition and 1 deletion.
  1. +1 −1 mod/quiz/lib.php
View
@@ -771,7 +771,7 @@ function quiz_save_best_grade($quiz, $user) {
} else {
$grade->quiz = $quiz->id;
$grade->user = $user->id;
- $grade->grade = $bestgrade;
+ $grade->grade = round($bestgrade, 2);
$grade->timemodified = time();
if (!insert_record("quiz_grades", $grade)) {
notify("Could not insert new best grade");

0 comments on commit 38f03e5

Please sign in to comment.