Skip to content

Commit

Permalink
MDL-27471 rating - whitespace cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
stronk7 committed May 25, 2011
1 parent 5b52ce1 commit f2e7259
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions mod/forum/lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -3523,7 +3523,7 @@ function forum_rating_validate($params) {
if ($context->id != $params['context']->id) {
throw new rating_exception('invalidcontext');
}

if ($forum->scale != $params['scaleid']) {
//the scale being submitted doesnt match the one in the database
throw new rating_exception('invalidscaleid');
Expand All @@ -3535,7 +3535,7 @@ function forum_rating_validate($params) {
throw new rating_exception('notavailable');
}
}

//check that the submitted rating is valid for the scale

// lower limit
Expand Down
2 changes: 1 addition & 1 deletion mod/glossary/lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -527,7 +527,7 @@ function glossary_rating_validate($params) {
//item doesn't exist
throw new rating_exception('invaliditemid');
}

if ($info->scale != $params['scaleid']) {
//the scale being submitted doesnt match the one in the database
throw new rating_exception('invalidscaleid');
Expand Down
4 changes: 2 additions & 2 deletions rating/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@
if ($popup) {
$sorturl->param('popup', $popup);
}

$table = new html_table;
$table->cellpadding = 3;
$table->cellspacing = 3;
Expand Down Expand Up @@ -130,4 +130,4 @@
if ($popup) {
echo $OUTPUT->close_window_button();
}
echo $OUTPUT->footer();
echo $OUTPUT->footer();
8 changes: 4 additions & 4 deletions rating/lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -571,10 +571,10 @@ public function get_ratings($options) {
$aggregatestr(r.rating) AS aggrrating, COUNT(r.rating) AS numratings,
ur.id, ur.userid, ur.scaleid, ur.rating AS usersrating
FROM {rating} r
LEFT JOIN {rating} ur ON ur.contextid = r.contextid AND
ur.itemid = r.itemid AND
ur.component = r.component AND
ur.ratingarea = r.ratingarea AND
LEFT JOIN {rating} ur ON ur.contextid = r.contextid AND
ur.itemid = r.itemid AND
ur.component = r.component AND
ur.ratingarea = r.ratingarea AND
ur.userid = :userid
WHERE r.contextid = :contextid AND
r.itemid {$itemidtest} AND
Expand Down

0 comments on commit f2e7259

Please sign in to comment.