From 40935142f72cf87600d1de671c92465da404957f Mon Sep 17 00:00:00 2001 From: skodak Date: Mon, 30 Apr 2007 17:28:29 +0000 Subject: [PATCH] MDL-9647 simplify dealing with headers/footers in admin sections; some more cleanup fixed continue button in error() on admin page when link present --- admin/roles/assign.php | 6 +----- admin/roles/override.php | 6 +----- course/category.php | 6 +----- course/index.php | 12 ++---------- course/report/log/index.php | 6 +----- 5 files changed, 6 insertions(+), 30 deletions(-) diff --git a/admin/roles/assign.php b/admin/roles/assign.php index 3996b349ed..3cc60513ff 100755 --- a/admin/roles/assign.php +++ b/admin/roles/assign.php @@ -286,10 +286,6 @@ print_table($table); } - if ($context->contextlevel == CONTEXT_SYSTEM or ($context->contextlevel==CONTEXT_COURSE and $context->instanceid == SITEID)) { - admin_externalpage_print_footer(); - } else { - print_footer($course); - } + print_footer($course); ?> diff --git a/admin/roles/override.php b/admin/roles/override.php index 4d6d2ece2e..2c25061824 100755 --- a/admin/roles/override.php +++ b/admin/roles/override.php @@ -223,10 +223,6 @@ print_table($table); } - if ($context->contextlevel == CONTEXT_SYSTEM or ($context->contextlevel==CONTEXT_COURSE and $context->instanceid == SITEID)) { - admin_externalpage_print_footer(); - } else { - print_footer($course); - } + print_footer($course); ?> diff --git a/course/category.php b/course/category.php index 26a0867762..5b21889485 100644 --- a/course/category.php +++ b/course/category.php @@ -453,10 +453,6 @@ print_course_search(); - if ($adminediting) { - admin_externalpage_print_footer(); - } else { - print_footer(); - } + print_footer(); ?> diff --git a/course/index.php b/course/index.php index a39ccee9f4..1e6178b576 100644 --- a/course/index.php +++ b/course/index.php @@ -157,11 +157,7 @@ "index.php?delete=$delete&sure=".md5($deletecat->timemodified)."&sesskey=$USER->sesskey", "index.php?sesskey=$USER->sesskey"); - if (has_capability('moodle/site:config', get_context_instance(CONTEXT_SYSTEM))) { - admin_externalpage_print_footer(); - } else { - print_footer(); - } + print_footer(); exit(); } } @@ -326,11 +322,7 @@ echo update_categories_button(); echo ''; - if (has_capability('moodle/site:config', get_context_instance(CONTEXT_SYSTEM))) { - admin_externalpage_print_footer(); - } else { - print_footer(); - } + print_footer(); function print_category_edit($category, $displaylist, $parentslist, $depth=-1, $up=false, $down=false) { diff --git a/course/report/log/index.php b/course/report/log/index.php index cada4d3f96..9f984c4be8 100644 --- a/course/report/log/index.php +++ b/course/report/log/index.php @@ -144,11 +144,7 @@ } - if ($hostid != $CFG->mnet_localhost_id || $course->id == SITEID) { - admin_externalpage_print_footer(); - } else { - print_footer($course); - } + print_footer($course); exit; ?> -- 2.39.5