From: moodler Date: Fri, 12 Sep 2008 07:26:56 +0000 (+0000) Subject: MDL-16474 Make counts of posts look nicer, and use the scale to show the results... X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=81de8d8e649dc98e47fe3261802fdc92e89840e6;p=moodle.git MDL-16474 Make counts of posts look nicer, and use the scale to show the results, not just a number --- diff --git a/mod/forum/lib.php b/mod/forum/lib.php index dbe3afef11..07d0a13e2d 100644 --- a/mod/forum/lib.php +++ b/mod/forum/lib.php @@ -3557,13 +3557,7 @@ function forum_get_ratings_count($postid, $scale, $ratings=NULL) { } } - $count = count($ratings); - $scalecount = count($scale)-1; //this should give us the last element of the scale aka the max grade with $scale[$scalecount] - - if ($count > $scale[$scalecount]) { //if the count exceeds the forum scale (i.e. max grade then set the score to the max grade - $count = $scale[$scalecount]; - } - return $scale[$count]; + return count($ratings); } /**