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:
defacer
2004-11-29 04:19:05 +00:00
parent a9e91540df
commit 9b12850043
10 changed files with 64 additions and 67 deletions
+2 -2
View File
@@ -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;