From cc4782064df5811b9b083887675d0081496c83bc Mon Sep 17 00:00:00 2001 From: gbateson Date: Sat, 7 Oct 2006 05:03:52 +0000 Subject: [PATCH] adjust "best grade" to range 0 to hotpot->maxgrade --- 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 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 = " "; } -- 2.39.5