Dropping the use of MOODLE_PAGE_COURSE <gasp>!
The new constant is PAGE_COURSE_VIEW, and it's more streamlined with the new CSS-related ids for 1.5. There are great possibilities for the future here, so we 're getting ready. On the other hand, this has to be the ugliest hack I 've ever inflicted on any program (look at pagelib.php). Thankfully it will only stay for just a little while.
This commit is contained in:
+2
-2
@@ -854,14 +854,14 @@ function upgrade_blocks_plugins($continueto) {
|
||||
//Iterate over each course
|
||||
if ($courses = get_records('course')) {
|
||||
foreach ($courses as $course) {
|
||||
$page = page_create_object(MOODLE_PAGE_COURSE, $course->id);
|
||||
$page = page_create_object(PAGE_COURSE_VIEW, $course->id);
|
||||
blocks_repopulate_page($page);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!empty($CFG->siteblocksadded)) { /// This is a once-off hack to make a proper upgrade
|
||||
$page = page_create_object(MOODLE_PAGE_COURSE, SITEID);
|
||||
$page = page_create_object(PAGE_COURSE_VIEW, SITEID);
|
||||
blocks_repopulate_page($page);
|
||||
delete_records('config', 'name', 'siteblocksadded');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user