From c3b58d2611719eade71d178f51d97b9ea7c4d607 Mon Sep 17 00:00:00 2001 From: Dan Poltawski Date: Fri, 30 Mar 2012 15:04:49 +0800 Subject: [PATCH 1/1] Revert "rating MDL-26461 fixed an off by 1 bug that made the safeguard against too high ratings not work" This reverts commit aafa4f324a4880c26001ab745ee06b32ee57cb31. --- rating/index.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/rating/index.php b/rating/index.php index 2667947..01cfca5 100644 --- a/rating/index.php +++ b/rating/index.php @@ -102,8 +102,7 @@ if (!$ratings) { $table->colclasses = array('', 'firstname', 'rating', 'time'); $table->data = array(); - //if the scale was changed after ratings were submitted some ratings may have a value above the current maximum - $maxrating = count($scalemenu) - 1; + $maxrating = count($scalemenu); 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 -- 1.7.9.3