Fix for bug 2241:
I hope this time I got everything changed to the new Page interface! I 'm really sorry for messing up and breaking new installations... :( Also moved the only two functions of the API outside the page_base class.
This commit is contained in:
+2
-2
@@ -845,14 +845,14 @@ function upgrade_blocks_plugins($continueto) {
|
||||
//Iterate over each course
|
||||
if ($courses = get_records('course')) {
|
||||
foreach ($courses as $course) {
|
||||
$page = MoodlePage::create_object(MOODLE_PAGE_COURSE, $course->id);
|
||||
$page = page_create_object(MOODLE_PAGE_COURSE, $course->id);
|
||||
blocks_repopulate_page($page);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!empty($CFG->siteblocksadded)) { /// This is a once-off hack to make a proper upgrade
|
||||
$page = MoodlePage::create_object(MOODLE_PAGE_COURSE, SITEID);
|
||||
$page = page_create_object(MOODLE_PAGE_COURSE, SITEID);
|
||||
blocks_repopulate_page($page);
|
||||
delete_records('config', 'name', 'siteblocksadded');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user