diff --git a/lang/en_utf8/rating.php b/lang/en_utf8/rating.php index 8ce1f888129..0e98df3927c 100644 --- a/lang/en_utf8/rating.php +++ b/lang/en_utf8/rating.php @@ -9,4 +9,3 @@ $string['noviewrate'] = 'You do not have the capability to view post ratings'; $string['noviewanyrate'] = 'You can only look at results for posts that you made'; $string['ratepermissiondenied'] = 'You do not have permission to rate this item'; $string['ratingsuse'] = 'Use ratings'; -$string['sessionexpired'] = 'Your session has expired. Please log in again.'; diff --git a/lib/outputrenderers.php b/lib/outputrenderers.php index 9e5d2b9c4ad..e3fc138ee97 100644 --- a/lib/outputrenderers.php +++ b/lib/outputrenderers.php @@ -1234,11 +1234,11 @@ class core_renderer extends renderer_base { * @param $page the page object on which this rating will appear */ function render_rating(rating $rating) { - global $CFG, $USER, $PAGE; + global $CFG, $USER; static $havesetupjavascript = false; if( !$havesetupjavascript && !empty($CFG->enableajax) ) { - $PAGE->requires->js_init_call('M.core_ratings.init'); + $this->page->requires->js_init_call('M.core_ratings.init'); $havesetupjavascript = true; } diff --git a/rating/index.php b/rating/index.php index 4ff941f7b0a..88e03b725cc 100644 --- a/rating/index.php +++ b/rating/index.php @@ -34,7 +34,7 @@ $sort = optional_param('sort', '', PARAM_ALPHA); list($context, $course, $cm) = get_context_info_array($contextid); require_login($course, false, $cm); -$url = new moodle_url('/rating/index.php', array('contextid'=>$contextid,'itemid'=>$itemid)); +$url = new moodle_url('/rating/index.php', array('contextid'=>$contextid,'itemid'=>$itemid,'scaleid'=>$scaleid)); if ($sort !== 0) { $url->param('sort', $sort); } @@ -80,7 +80,7 @@ if (!$ratings) { echo "