MDL-13449 If the count exceeds the forum scale, then set the score to the max grade

This commit is contained in:
mudrd8mz
2009-01-28 15:51:32 +00:00
parent be10e474f3
commit 78700ccdca
+1 -1
View File
@@ -3391,7 +3391,7 @@ function forum_get_ratings_count($postid, $scale, $ratings=NULL) {
$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];
$count = $scalecount;
}
return $scale[$count];
}