Home
Documentation
Downloads
Demo
Tracker
Development
Translation
Moodle.net
Search
projects
/
moodle.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d20b966
)
rating MDL-26461 fixed an off by 1 bug that made the safeguard against too high ratin...
author
Andrew Davis (andyjdavis)
<andrew@moodle.com>
Mon, 21 Feb 2011 02:48:38 +0000
(10:48 +0800)
committer
Andrew Davis (andyjdavis)
<andrew@moodle.com>
Mon, 21 Feb 2011 02:48:38 +0000
(10:48 +0800)
rating/index.php
patch
|
blob
|
blame
|
history
diff --git
a/rating/index.php
b/rating/index.php
index
41d085e
..
8f4cf70
100644
(file)
--- a/
rating/index.php
+++ b/
rating/index.php
@@
-92,7
+92,8
@@
if (!$ratings) {
echo "<th class=\"header\" scope=\"col\"><a href=\"index.php?$sortargs&sort=time\">$strtime</a></th>";
echo "</tr>";
- $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