Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Make sure grades are always rounded

  • Loading branch information...
commit 1d2603b1e3a487eb59a44b4ba5d3fcb7e5d881db 1 parent a2fe7cc
moodler authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  mod/quiz/lib.php
2  mod/quiz/lib.php
View
@@ -875,7 +875,7 @@ function quiz_save_best_grade($quiz, $userid) {
$bestgrade = (($bestgrade / $quiz->sumgrades) * $quiz->grade);
if ($grade = get_record("quiz_grades", "quiz", $quiz->id, "userid", $userid)) {
- $grade->grade = $bestgrade;
+ $grade->grade = round($bestgrade, 2);
$grade->timemodified = time();
if (!update_record("quiz_grades", $grade)) {
notify("Could not update best grade");
Please sign in to comment.
Something went wrong with that request. Please try again.