From a8fdaa5c38e4194cb47eba52778fb8178b393f4d Mon Sep 17 00:00:00 2001 From: gbateson Date: Mon, 2 Oct 2006 00:30:32 +0000 Subject: [PATCH] corrected display of best grade on "index.php" when maximum grade for the HotPot is not 100 --- mod/hotpot/index.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/mod/hotpot/index.php b/mod/hotpot/index.php index ebba4e77915..8e0f49d0f10 100644 --- a/mod/hotpot/index.php +++ b/mod/hotpot/index.php @@ -359,7 +359,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 = " "; }