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
@@ -70,7 +70,7 @@
|
||||
|
||||
if (!empty($course)) {
|
||||
// Test for and remove blocks which aren't appropriate anymore
|
||||
$page = page_create_object(MOODLE_PAGE_COURSE, $course->id);
|
||||
$page = page_create_object(PAGE_COURSE_VIEW, $course->id);
|
||||
blocks_remove_inappropriate($page);
|
||||
|
||||
// Update with the new data
|
||||
@@ -91,7 +91,7 @@
|
||||
if ($newcourseid = insert_record('course', $form)) { // Set up new course
|
||||
|
||||
// Setup the blocks
|
||||
$page = page_create_object(MOODLE_PAGE_COURSE, $newcourseid);
|
||||
$page = page_create_object(PAGE_COURSE_VIEW, $newcourseid);
|
||||
blocks_repopulate_page($page); // Return value not checked because you can always edit later
|
||||
|
||||
$section = NULL;
|
||||
|
||||
Reference in New Issue
Block a user