MDL-16474 Make counts of posts look nicer, and use the scale to show the results, not just a number
This commit is contained in:
+1
-7
@@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user