From 837b38eedb851f84953d5c78f0ced71418cc2092 Mon Sep 17 00:00:00 2001 From: samhemelryk Date: Mon, 7 Sep 2009 07:33:41 +0000 Subject: [PATCH] course MDL-19794 Updated print_header and build_navigation to OUTPUT and PAGE equivalents --- course/editcategory.php | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) diff --git a/course/editcategory.php b/course/editcategory.php index c3b3a87384..cf2a48e15c 100644 --- a/course/editcategory.php +++ b/course/editcategory.php @@ -87,27 +87,21 @@ $strcategories = get_string('categories'); $navlinks = array(); if ($id) { - $navlinks[] = array('name' => $strtitle, - 'link' => null, - 'type' => 'misc'); + $PAGE->navbar->add($strtitle); $title = $strtitle; $fullname = $category->name; } else { - $navlinks[] = array('name' => $stradministration, - 'link' => "$CFG->wwwroot/$CFG->admin/index.php", - 'type' => 'misc'); - $navlinks[] = array('name' => $strcategories, - 'link' => 'index.php', - 'type' => 'misc'); - $navlinks[] = array('name' => $straddnewcategory, - 'link' => null, - 'type' => 'misc'); + $PAGE->navbar->add($stradministration, new moodle_url($CFG->wwwroot.'/'.$CFG->admin.'/index.php')); + $PAGE->navbar->add($strcategories, new moodle_url($CFG->wwwroot.'/course/index.php')); + $PAGE->navbar->add($straddnewcategory); $title = "$SITE->shortname: $straddnewcategory"; $fullname = $SITE->fullname; } -$navigation = build_navigation($navlinks); -print_header($title, $fullname, $navigation, $mform->focus()); +$PAGE->set_title($title); +$PAGE->set_heading($fullname); +$PAGE->set_focuscontrol($mform->focus()); +echo $OUTPUT->header(); echo $OUTPUT->heading($strtitle); $mform->display(); -- 2.39.5