From: samhemelryk Date: Thu, 3 Sep 2009 08:58:41 +0000 (+0000) Subject: message MDL-19801 Upgraded print_header and build_navigation calls to use PAGE and... X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=5a2940429dab43fe49defe25005d3262946f1638;p=moodle.git message MDL-19801 Upgraded print_header and build_navigation calls to use PAGE and OUTPUT equivilants --- diff --git a/message/edit.php b/message/edit.php index f007c9ab53..0b58c1304c 100644 --- a/message/edit.php +++ b/message/edit.php @@ -173,22 +173,21 @@ $strparticipants = get_string('participants'); $userfullname = fullname($user, true); - $navlinks = array(); if (has_capability('moodle/course:viewparticipants', $coursecontext) || has_capability('moodle/site:viewparticipants', $systemcontext)) { - $navlinks[] = array('name' => $strparticipants, 'link' => "index.php?id=$course->id", 'type' => 'misc'); + $PAGE->navbar->add($strparticipants, null, null, navigation_node::TYPE_CUSTOM, + new moodle_url($CFG->wwwroot.'/message/index.php', array('id'=>$course->id))); } - $navlinks[] = array('name' => $userfullname, - 'link' => "view.php?id=$user->id&course=$course->id", - 'type' => 'misc'); - $navlinks[] = array('name' => $streditmymessage, 'link' => null, 'type' => 'misc'); - $navigation = build_navigation($navlinks); - + $PAGE->navbar->add($userfullname, null, null, navigation_node::TYPE_CUSTOM, + new moodle_url($CFG->wwwroot.'/message/view.php', array('id'=>$user->id, 'course'=>$course->id))); + $PAGE->navbar->add($streditmymessage); + $PAGE->set_title("$course->shortname: $streditmymessage"); if ($course->id != SITEID) { - print_header("$course->shortname: $streditmymessage", "$course->fullname: $streditmymessage", $navigation); + $PAGE->set_heading("$course->fullname: $streditmymessage"); } else { - print_header("$course->shortname: $streditmymessage", $course->fullname, $navigation); + $PAGE->set_heading($course->fullname); } + echo $OUTPUT->header(); /// Print tabs at the top $showroles = 1;