cron: MDL-19774 temporary hack so cron does not crash.
This commit is contained in:
@@ -925,6 +925,9 @@ function cron_setup_user($user=null, $course=null) {
|
||||
}
|
||||
}
|
||||
|
||||
// TODO MDL-19774 relying on global $PAGE in cron is a bad idea.
|
||||
// Temporary hack so that cron does not give fatal errors.
|
||||
$PAGE = new moodle_page();
|
||||
if ($course) {
|
||||
$PAGE->set_course($course);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user