mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 00:46:50 +02:00
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:
parent
56dae0a227
commit
81de8d8e64
1 changed files with 1 additions and 7 deletions
|
@ -3557,13 +3557,7 @@ function forum_get_ratings_count($postid, $scale, $ratings=NULL) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$count = count($ratings);
|
return 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];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue