mirror of
https://github.com/moodle/moodle.git
synced 2025-01-17 21:49:15 +01:00
course MDL-19794 Updated print_header_simple and build_navigation to OUTPUT and PAGE equivalents
This commit is contained in:
parent
968583af41
commit
3856ca5605
@ -50,8 +50,10 @@
|
||||
$strsummaryof = get_string('summaryof', '', " $sectionname $section->section");
|
||||
}
|
||||
|
||||
print_header_simple($stredit, '', build_navigation(array(array('name' => $stredit, 'link' => null, 'type' => 'misc'))), 'theform.summary' );
|
||||
|
||||
$PAGE->set_title($stredit);
|
||||
$PAGE->navbar->add($stredit);
|
||||
$PAGE->set_focuscontrol('theform.summary');
|
||||
echo $OUTPUT->header();
|
||||
print_heading_with_help($strsummaryof, 'summaries');
|
||||
$mform->display();
|
||||
echo $OUTPUT->footer();
|
||||
|
@ -50,13 +50,13 @@
|
||||
|
||||
/// Check if the course is a meta course (bug 5734)
|
||||
if ($course->metacourse) {
|
||||
print_header_simple();
|
||||
echo $OUTPUT->header();
|
||||
notice(get_string('coursenotaccessible'), "$CFG->wwwroot/index.php");
|
||||
}
|
||||
|
||||
/// Users can't enroll to site course
|
||||
if ($course->id == SITEID) {
|
||||
print_header_simple();
|
||||
echo $OUTPUT->header();
|
||||
notice(get_string('enrollfirst'), "$CFG->wwwroot/index.php");
|
||||
}
|
||||
|
||||
@ -76,7 +76,7 @@
|
||||
|
||||
/// Check if the course is enrollable
|
||||
if (!method_exists($enrol, 'print_entry')) {
|
||||
print_header_simple();
|
||||
echo $OUTPUT->header();
|
||||
notice(get_string('enrolmentnointernal'), "$CFG->wwwroot/index.php");
|
||||
}
|
||||
|
||||
|
@ -69,8 +69,9 @@
|
||||
$strloginas = get_string('loginas');
|
||||
$strloggedinas = get_string('loggedinas', '', $newfullname);
|
||||
|
||||
print_header_simple($strloggedinas, '', build_navigation(array(array('name'=>$strloggedinas, 'link'=>'','type'=>'misc'))),
|
||||
'', '', true, ' ', navmenu($course));
|
||||
$PAGE->set_title($strloggedinas);
|
||||
$PAGE->navbar->add($strloggedinas);
|
||||
echo $OUTPUT->header();
|
||||
notice($strloggedinas, "$CFG->wwwroot/course/view.php?id=$course->id");
|
||||
|
||||
|
||||
|
@ -64,8 +64,9 @@
|
||||
$strdeletecheckfull = get_string('deletecheckfull', '', "$fullmodulename '$cm->name'");
|
||||
|
||||
$PAGE->set_pagetype('mod-' . $cm->modname . '-delete');
|
||||
|
||||
print_header_simple($strdeletecheck, '', build_navigation(array(array('name'=>$strdeletecheck, 'link'=>'', 'type'=>'misc'))));
|
||||
$PAGE->set_title($strdeletecheck);
|
||||
$PAGE->navbar->add($strdeletecheck);
|
||||
echo $OUTPUT->header();
|
||||
|
||||
// print_simple_box_start('center', '60%', '#FFAAAA', 20, 'noticebox');
|
||||
echo $OUTPUT->box_start('noticebox');
|
||||
|
@ -582,16 +582,15 @@
|
||||
$streditinga = get_string('editinga', 'moodle', $fullmodulename);
|
||||
$strmodulenameplural = get_string('modulenameplural', $module->name);
|
||||
|
||||
$navlinks = array();
|
||||
$navlinks[] = array('name' => $strmodulenameplural, 'link' => "$CFG->wwwroot/mod/$module->name/index.php?id=$course->id", 'type' => 'activity');
|
||||
$PAGE->navbar->add($strmodulenameplural, new moodle_url($CFG->wwwroot.'/mod/'.$module->name.'/index.php', array('id'=>$course->id)));
|
||||
if ($navlinksinstancename) {
|
||||
$navlinks[] = $navlinksinstancename;
|
||||
$PAGE->navbar->add($navlinksinstancename);
|
||||
}
|
||||
$navlinks[] = array('name' => $streditinga, 'link' => '', 'type' => 'title');
|
||||
|
||||
$navigation = build_navigation($navlinks);
|
||||
|
||||
print_header_simple($streditinga, '', $navigation, $mform->focus(), "", false);
|
||||
$PAGE->navbar->add($streditinga);
|
||||
$PAGE->set_title($streditinga);
|
||||
$PAGE->set_focuscontrol($mform->focus());
|
||||
$PAGE->set_cacheable(false);
|
||||
echo $OUTPUT->header();
|
||||
|
||||
if (!empty($cm->id)) {
|
||||
$context = get_context_instance(CONTEXT_MODULE, $cm->id);
|
||||
|
@ -61,8 +61,8 @@ $strlastmodified = get_string('lastmodified');
|
||||
$PAGE->set_url('course/resources.php', array('id' => $course->id));
|
||||
$PAGE->set_title($course->shortname.': '.$strresources);
|
||||
$PAGE->set_heading($course->fullname);
|
||||
$navlinks = array(array('name' => $strresources, 'link' => '', 'type' => 'activityinstance'));
|
||||
echo $OUTPUT->header(build_navigation($navlinks), navmenu($course));
|
||||
$PAGE->navbar->add($strresources);
|
||||
echo $OUTPUT->header();
|
||||
|
||||
$modinfo = get_fast_modinfo($course);
|
||||
$cms = array();
|
||||
|
Loading…
x
Reference in New Issue
Block a user