user MDL-19825 Upgraded print_header and build_navigation calls to use PAGE and OUTPUT equivilants

This commit is contained in:
samhemelryk
2009-09-02 08:36:16 +00:00
parent 46b02712fd
commit caa8363f83
14 changed files with 98 additions and 109 deletions
+11 -9
View File
@@ -82,7 +82,7 @@
}
if ($user->deleted) {
print_header();
echo $OUTPUT->header();
echo $OUTPUT->heading(get_string('userdeleted'));
echo $OUTPUT->footer();
die;
@@ -207,16 +207,18 @@
$strparticipants = get_string('participants');
$userfullname = fullname($user, true);
$navlinks = array();
$link = null;
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');
$link = new moodle_url($CFG->wwwroot."/user/index.php", array('id'=>$course->id));
}
$navlinks[] = array('name' => $userfullname,
'link' => "view.php?id=$user->id&course=$course->id",
'type' => 'misc');
$navlinks[] = array('name' => $streditmyprofile, 'link' => null, 'type' => 'misc');
$navigation = build_navigation($navlinks);
print_header("$course->shortname: $streditmyprofile", $course->fullname, $navigation, "");
$PAGE->navbar->add($strparticipants, null, null, navigation_node::TYPE_SETTING, $link);
$link = new moodle_url($CFG->wwwroot.'/user/view.php', array('id'=>$user->id, 'course'=>$course->id));
$PAGE->navbar->add($userfullname, null, null, navigation_node::TYPE_SETTING, $link);
$PAGE->navbar->add($streditmyprofile);
$PAGE->set_title("$course->shortname: $streditmyprofile");
$PAGE->set_heading($course->fullname);
echo $OUTPUT->header();
/// Print tabs at the top
$showroles = 1;