MDL-13866 fixed stupid bug in my last commit

This commit is contained in:
skodak
2008-03-10 21:16:57 +00:00
parent e694d551b5
commit 5c691fc5fc
+6 -3
View File
@@ -1217,9 +1217,12 @@ function forum_get_user_grades($forum, $userid=0) {
}
} else {
//scales
$max = count_records('scale', 'id', - $forum->scale);
if ($result->rawgrade > $max) {
$results[$rid]->rawgrade = $max;
if ($scale = get_record('scale', 'id', -$forum->scale)) {
$scale = explode(',', $scale->scale);
$max = count($scale);
if ($result->rawgrade > $max) {
$results[$rid]->rawgrade = $max;
}
}
}
}