From c9e42aaa990ec96d998a4ffc59b5204a9cb30370 Mon Sep 17 00:00:00 2001
From: martinlanghoff <martinlanghoff>
Date: Wed, 19 Sep 2007 07:48:56 +0000
Subject: [PATCH] course/index: Bring back Petr's MDL-9647 simplify dealing
 with headers/footers in admin sections

I had mistakenly reverted some of Petr's changes.

Fixes MDL-11179 19PERF: Notice on /course/index.php as admin
---
 course/index.php | 12 ++----------
 1 file changed, 2 insertions(+), 10 deletions(-)

diff --git a/course/index.php b/course/index.php
index 7c37b647f3..2d25f75fdc 100644
--- a/course/index.php
+++ b/course/index.php
@@ -165,11 +165,7 @@
                              "index.php?delete=$delete&amp;sure=".md5($deletecat->timemodified)."&amp;sesskey=$USER->sesskey",
                              "index.php?sesskey=$USER->sesskey");
 
-                if (has_capability('moodle/site:config', $sysctx)) {
-                    admin_externalpage_print_footer($adminroot);
-                } else {
-                    print_footer();  
-                }
+                print_footer();  
                 exit();
             }
         }
@@ -331,11 +327,7 @@
     echo update_categories_button();
     echo '</div></div>';
 
-    if (has_capability('moodle/site:config', $sysctx)) {
-        admin_externalpage_print_footer($adminroot);
-    } else {
-        print_footer();
-    }
+    print_footer();
 
 function print_category_edit($category, $displaylist, $parentslist, $depth=-1, $up=false, $down=false) {
 /// Recursive function to print all the categories ready for editing
-- 
2.39.5