course MDL-19794: Fix more initialisation order problems

This commit is contained in:
tjhunt 2009-07-28 04:16:59 +00:00
parent 62d90637c2
commit 680a65a0cc
2 changed files with 14 additions and 7 deletions

View File

@ -440,10 +440,5 @@
print_course_search();
if ($editingon && update_category_button()) {
admin_externalpage_print_footer();
} else {
print_footer();
}
print_footer();
?>

View File

@ -29,11 +29,23 @@
$site = get_site();
$urlparams = array();
foreach (array('search', 'page', 'blocklist', 'modulelist') as $param) {
if (!empty($$param)) {
$urlparams[$param] = $$param;
}
}
if ($perpage != 10) {
$urlparams['perpage'] = $perpage;
}
$PAGE->set_url('course/search.php', $urlparams);
$PAGE->set_context(get_context_instance(CONTEXT_SYSTEM));
if ($CFG->forcelogin) {
require_login();
}
if (update_category_button()) {
if (can_edit_in_category()) {
if ($edit !== -1) {
$USER->editing = $edit;
}