MDL-50700 gradereport_overview: Call $PAGE->set_course
authorRussell Smith <mr-russ@smith2001.net>
Mon, 16 Nov 2015 01:14:43 +0000 (12:14 +1100)
committerDavid Monllao <davidm@moodle.com>
Tue, 17 Nov 2015 02:01:57 +0000 (10:01 +0800)
To ensure correct blocks are displayed.

grade/report/overview/index.php

index 15954dc..a367aee 100644 (file)
@@ -36,6 +36,7 @@ if (!$course = $DB->get_record('course', array('id' => $courseid))) {
     print_error('nocourseid');
 }
 require_login(null, false);
+$PAGE->set_course($course);
 
 $context = context_course::instance($course->id);
 $systemcontext = context_system::instance();