Skip to content

Commit

Permalink
MDL-49346 ratings: ratingarea should be a required parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
jleyva committed Mar 6, 2015
1 parent b90f98d commit 9502a19
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions rating/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

$contextid = required_param('contextid', PARAM_INT);
$component = required_param('component', PARAM_COMPONENT);
$ratingarea = optional_param('ratingarea', null, PARAM_AREA);
$ratingarea = required_param('ratingarea', PARAM_AREA);
$itemid = required_param('itemid', PARAM_INT);
$scaleid = required_param('scaleid', PARAM_INT);
$sort = optional_param('sort', '', PARAM_ALPHA);
Expand All @@ -39,11 +39,9 @@

$url = new moodle_url('/rating/index.php', array('contextid' => $contextid,
'component' => $component,
'ratingarea' => $ratingarea,
'itemid' => $itemid,
'scaleid' => $scaleid));
if (!empty($ratingarea)) {
$url->param('ratingarea', $ratingarea);
}
if (!empty($sort)) {
$url->param('sort', $sort);
}
Expand Down

0 comments on commit 9502a19

Please sign in to comment.