From: Eloy Lafuente (stronk7) Date: Tue, 22 Feb 2011 10:06:23 +0000 (+0100) Subject: Merge branch 'MDL-26461_change_rating_scale' of git://github.com/andyjdavis/moodle X-Git-Tag: v2.0.3~270 X-Git-Url: http://git.moodle.org/gw?p=moodle.git;a=commitdiff_plain;h=29336fb13ce8c300458a08ccc8f712b77ed93879;hp=cc31313c4b2188ead3677f769eec231ab322237a Merge branch 'MDL-26461_change_rating_scale' of git://github.com/andyjdavis/moodle --- diff --git a/rating/index.php b/rating/index.php index 50a63bed791..ff9b1214a24 100644 --- a/rating/index.php +++ b/rating/index.php @@ -92,7 +92,8 @@ if (!$ratings) { echo "$strtime"; echo ""; - $maxrating = count($scalemenu); + //if the scale was changed after ratings were submitted some ratings may have a value above the current maximum + $maxrating = count($scalemenu) - 1; foreach ($ratings as $rating) { //Undo the aliasing of the user id column from user_picture::fields() //we could clone the rating object or preserve the rating id if we needed it again