MDL-27471 rating - whitespace cleanup

This commit is contained in:
Eloy Lafuente (stronk7) 2011-05-25 16:54:51 +02:00
parent 5b52ce19c5
commit f2e725930b
4 changed files with 9 additions and 9 deletions

View file

@ -3523,7 +3523,7 @@ function forum_rating_validate($params) {
if ($context->id != $params['context']->id) { if ($context->id != $params['context']->id) {
throw new rating_exception('invalidcontext'); throw new rating_exception('invalidcontext');
} }
if ($forum->scale != $params['scaleid']) { if ($forum->scale != $params['scaleid']) {
//the scale being submitted doesnt match the one in the database //the scale being submitted doesnt match the one in the database
throw new rating_exception('invalidscaleid'); throw new rating_exception('invalidscaleid');
@ -3535,7 +3535,7 @@ function forum_rating_validate($params) {
throw new rating_exception('notavailable'); throw new rating_exception('notavailable');
} }
} }
//check that the submitted rating is valid for the scale //check that the submitted rating is valid for the scale
// lower limit // lower limit

View file

@ -527,7 +527,7 @@ function glossary_rating_validate($params) {
//item doesn't exist //item doesn't exist
throw new rating_exception('invaliditemid'); throw new rating_exception('invaliditemid');
} }
if ($info->scale != $params['scaleid']) { if ($info->scale != $params['scaleid']) {
//the scale being submitted doesnt match the one in the database //the scale being submitted doesnt match the one in the database
throw new rating_exception('invalidscaleid'); throw new rating_exception('invalidscaleid');

View file

@ -88,7 +88,7 @@ if (!$ratings) {
if ($popup) { if ($popup) {
$sorturl->param('popup', $popup); $sorturl->param('popup', $popup);
} }
$table = new html_table; $table = new html_table;
$table->cellpadding = 3; $table->cellpadding = 3;
$table->cellspacing = 3; $table->cellspacing = 3;
@ -130,4 +130,4 @@ if (!$ratings) {
if ($popup) { if ($popup) {
echo $OUTPUT->close_window_button(); echo $OUTPUT->close_window_button();
} }
echo $OUTPUT->footer(); echo $OUTPUT->footer();

View file

@ -571,10 +571,10 @@ class rating_manager {
$aggregatestr(r.rating) AS aggrrating, COUNT(r.rating) AS numratings, $aggregatestr(r.rating) AS aggrrating, COUNT(r.rating) AS numratings,
ur.id, ur.userid, ur.scaleid, ur.rating AS usersrating ur.id, ur.userid, ur.scaleid, ur.rating AS usersrating
FROM {rating} r FROM {rating} r
LEFT JOIN {rating} ur ON ur.contextid = r.contextid AND LEFT JOIN {rating} ur ON ur.contextid = r.contextid AND
ur.itemid = r.itemid AND ur.itemid = r.itemid AND
ur.component = r.component AND ur.component = r.component AND
ur.ratingarea = r.ratingarea AND ur.ratingarea = r.ratingarea AND
ur.userid = :userid ur.userid = :userid
WHERE r.contextid = :contextid AND WHERE r.contextid = :contextid AND
r.itemid {$itemidtest} AND r.itemid {$itemidtest} AND