mirror of
https://github.com/moodle/moodle.git
synced 2025-04-21 00:12:56 +02:00
course MDL-19794 Updated print_header and build_navigation to OUTPUT and PAGE equivalents
This commit is contained in:
parent
92e8851f67
commit
837b38eedb
@ -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();
|
||||
|
Loading…
x
Reference in New Issue
Block a user