cron: MDL-19774 temporary hack so cron does not crash.

This commit is contained in:
tjhunt 2009-07-13 06:08:48 +00:00
parent 652ee8aa56
commit 43b152f69a

View File

@ -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 {