Permalink
Browse files

adjust "best grade" to range 0 to hotpot->maxgrade

  • Loading branch information...
1 parent 1cc9e57 commit cc4782064df5811b9b083887675d0081496c83bc gbateson committed Oct 7, 2006
Showing with 3 additions and 1 deletion.
  1. +3 −1 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 = " ";
}

0 comments on commit cc47820

Please sign in to comment.