if (empty($title)) {
$title = get_string("editinga", "moodle", $fullmodulename);
}
- print_header_simple($title, '', '', '', '', false);
-
+ $PAGE->set_title($title);
+ $PAGE->set_cacheable(false);
+ echo $OUTPUT->header();
break;
case CONTEXT_BLOCK:
//
if ( !($COURSE->visible && course_parent_visible($COURSE)) &&
!has_capability('moodle/course:viewhiddencourses', $COURSE->context)) {
- print_header_simple();
+ echo $OUTPUT->header();
notice(get_string('coursehidden'), $CFG->wwwroot .'/');
}
}
case 1: /// Guests always allowed
if (!has_capability('moodle/course:view', $COURSE->context)) { // Prohibited by capability
- print_header_simple();
+ echo $OUTPUT->header();
notice(get_string('guestsnotallowed', '', format_string($COURSE->fullname)), get_login_url());
}
if (!empty($cm) and !$cm->visible) { // Not allowed to see module, send to course page
default: /// Guests not allowed
$strloggedinasguest = get_string('loggedinasguest');
$PAGE->navbar->add($strloggedinasguest);
- print_header_simple();
+ echo $OUTPUT->header();
if (empty($USER->access['rsw'][$COURSE->context->path])) { // Normal guest
notice(get_string('guestsnotallowed', '', format_string($COURSE->fullname)), get_login_url());
} else {
if (session_is_loggedinas()) { // Make sure the REAL person can also access this course
$realuser = session_get_realuser();
if (!has_capability('moodle/course:view', $COURSE->context, $realuser->id)) {
- print_header_simple();
+ echo $OUTPUT->header();
notice(get_string('studentnotallowed', '', fullname($USER, true)), $CFG->wwwroot .'/');
}
}
$button = $OUTPUT->button($form);
$header = $SITE->shortname . ': ' . $strmymoodle;
- $navigation = build_navigation($strmymoodle);
+ $PAGE->navbar->add($strmymoodle);
$loggedinas = user_login_string();
if (empty($CFG->langmenu)) {
$PAGE->requires->data_for_js('FO', $args);
$PAGE->requires->js_function_call('create_UFO_object', Array('moodletestclient'));
-print_header_simple('Test Client', 'Test Client');
+$PAGE->set_title('Test Client');
+$PAGE->set_heading('Test Client');
+echo $OUTPUT->header();
echo '<div id="moodletestclient">
<p>You need to install Flash 9.0</p>
</div>';