From: gbateson Date: Sat, 7 Oct 2006 05:03:52 +0000 (+0000) Subject: adjust "best grade" to range 0 to hotpot->maxgrade X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=cc4782064df5811b9b083887675d0081496c83bc;p=moodle.git adjust "best grade" to range 0 to hotpot->maxgrade --- diff --git a/mod/hotpot/index.php b/mod/hotpot/index.php index f51a89f72b..9dabc47034 100644 --- a/mod/hotpot/index.php +++ b/mod/hotpot/index.php @@ -356,7 +356,9 @@ // 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 = " "; }