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