]> git.mjollnir.org Git - moodle.git/commitdiff
adjust "best grade" to range 0 to hotpot->maxgrade
authorgbateson <gbateson>
Sat, 7 Oct 2006 05:03:52 +0000 (05:03 +0000)
committergbateson <gbateson>
Sat, 7 Oct 2006 05:03:52 +0000 (05:03 +0000)
mod/hotpot/index.php

index f51a89f72b45cc97afa92c36382c86530eb9f6d4..9dabc470340f9e8fc922ebf452c5ed5a87243790 100644 (file)
 
             // get best score
             if (is_numeric($totals[$hotpot->id]->maxscore)) {
-                $bestscore = $totals[$hotpot->id]->maxscore." / $hotpot->grade";
+                               $weighting = $hotpot->grade / 100;
+                               $precision = hotpot_get_precision($hotpot);
+                               $bestscore = round($totals[$hotpot->id]->maxscore * $weighting, $precision)." / $hotpot->grade";
             } else {
                 $bestscore = "&nbsp;";
             }