MDL-26704 Fixed up variable typo

This commit is contained in:
Sam Hemelryk 2011-05-18 15:32:40 +08:00
parent faf0e91a4b
commit 74cf2d0015
3 changed files with 3 additions and 3 deletions

View File

@ -1424,7 +1424,7 @@ function data_rating_validate($params) {
throw new rating_exception('invalidnum'); throw new rating_exception('invalidnum');
} else if ($info->scale < 0) { } else if ($info->scale < 0) {
//its a custom scale //its a custom scale
$scalerecord = $DB->get_record('scale', array('id' => -$options->scaleid)); $scalerecord = $DB->get_record('scale', array('id' => -$params['scaleid']));
if ($scalerecord) { if ($scalerecord) {
$scalearray = explode(',', $scalerecord->scale); $scalearray = explode(',', $scalerecord->scale);
if ($params['rating'] > count($scalearray)) { if ($params['rating'] > count($scalearray)) {

View File

@ -3517,7 +3517,7 @@ function forum_rating_validate($params) {
throw new rating_exception('invalidnum'); throw new rating_exception('invalidnum');
} else if ($info->scale < 0) { } else if ($info->scale < 0) {
//its a custom scale //its a custom scale
$scalerecord = $DB->get_record('scale', array('id' => -$options->scaleid)); $scalerecord = $DB->get_record('scale', array('id' => -$params['scaleid']));
if ($scalerecord) { if ($scalerecord) {
$scalearray = explode(',', $scalerecord->scale); $scalearray = explode(',', $scalerecord->scale);
if ($params['rating'] > count($scalearray)) { if ($params['rating'] > count($scalearray)) {

View File

@ -530,7 +530,7 @@ function glossary_rating_validate($params) {
throw new rating_exception('invalidnum'); throw new rating_exception('invalidnum');
} else if ($info->scale < 0) { } else if ($info->scale < 0) {
//its a custom scale //its a custom scale
$scalerecord = $DB->get_record('scale', array('id' => -$options->scaleid)); $scalerecord = $DB->get_record('scale', array('id' => -$params['scaleid']));
if ($scalerecord) { if ($scalerecord) {
$scalearray = explode(',', $scalerecord->scale); $scalearray = explode(',', $scalerecord->scale);
if ($params['rating'] > count($scalearray)) { if ($params['rating'] > count($scalearray)) {