$fullname = fullname($USER, true);
- $navlinks[] = array('name' => $fullname,
- 'link' => "$CFG->wwwroot/user/view.php?id=$USER->id&course=$course->id",
- 'type' => 'misc');
- $navlinks[] = array('name' => $strpasswordchanged, 'link' => null, 'type' => 'misc');
- $navigation = build_navigation($navlinks);
-
- print_header($strpasswordchanged, $strpasswordchanged, $navigation);
+ $PAGE->navbar->add($fullname, null, null, navigation_node::TYPE_CUSTOM,
+ new moodle_url($CFG->wwwroot.'/user/view.php', array('id'=>$USER->id, 'course'=>$course->id)));
+ $PAGE->navbar->add($strpasswordchanged);
+ $PAGE->set_title($strpasswordchanged);
+ $PAGE->set_header($strpasswordchanged);
+ echo $OUTPUT->header();
if (empty($SESSION->wantsurl) or $SESSION->wantsurl == $CFG->httpswwwroot.'/login/change_password.php') {
$returnto = "$CFG->wwwroot/user/view.php?id=$USER->id&course=$id";
$fullname = fullname($USER, true);
- $navlinks[] = array('name' => $fullname, 'link' => "$CFG->wwwroot/user/view.php?id=$USER->id&course=$course->id", 'type' => 'misc');
- $navlinks[] = array('name' => $strchangepassword, 'link' => null, 'type' => 'misc');
- $navigation = build_navigation($navlinks);
+ $PAGE->navbar->add($fullname, null, null, navigation_node::TYPE_CUSTOM,
+ new moodle_url($CFG->wwwroot.'/user/view.php', array('id'=>$USER->id, 'course'=>$course->id)));
+ $PAGE->navbar->add($strchangepassword);
+ $PAGE->set_title($strchangepassword);
+ $PAGE->set_header($strchangepassword);
+ echo $OUTPUT->header();
- print_header($strchangepassword, $strchangepassword, $navigation);
if (get_user_preferences('auth_forcepasswordchange')) {
echo $OUTPUT->notification(get_string('forcepasswordchangenotice'));
}
if ($confirmed == AUTH_CONFIRM_ALREADY) {
$user = get_complete_user_data('username', $username);
- print_header(get_string("alreadyconfirmed"), get_string("alreadyconfirmed"), array(), "");
+ $PAGE->set_title(get_string("alreadyconfirmed"));
+ $PAGE->set_heading(get_string("alreadyconfirmed"));
+ echo $OUTPUT->header();
echo $OUTPUT->box_start('generalbox centerpara boxwidthnormal boxaligncenter');
echo "<h3>".get_string("thanks").", ". fullname($user) . "</h3>\n";
echo "<p>".get_string("alreadyconfirmed")."</p>\n";
redirect($goto);
}
- print_header(get_string("confirmed"), get_string("confirmed"), array(), "");
+ $PAGE->set_title(get_string("confirmed"));
+ $PAGE->set_heading(get_string("confirmed"));
+ echo $OUTPUT->header();
echo $OUTPUT->box_start('generalbox centerpara boxwidthnormal boxaligncenter');
echo "<h3>".get_string("thanks").", ". fullname($USER) . "</h3>\n";
echo "<p>".get_string("confirmed")."</p>\n";
$strforgotten = get_string('passwordforgotten');
$strlogin = get_string('login');
-$navigation = build_navigation(array(array('name' => $strlogin, 'link' => get_login_url(), 'type' => 'misc'),
- array('name' => $strforgotten, 'link' => null, 'type' => 'misc')));
+$PAGE->navbar->add($strlogin, null, null, navigation_node::TYPE_CUSTOM, get_login_url());
+$PAGE->navbar->add($strforgotten);
// if alternatepasswordurl is defined, then we'll just head there
if (!empty($CFG->forgottenpasswordurl)) {
update_login_count();
+ $PAGE->set_title($strforgotten);
+ $PAGE->set_heading($strforgotten);
+
$user = get_complete_user_data('username', $p_username);
if (!empty($user) and $user->secret === '') {
- print_header($strforgotten, $strforgotten, $navigation);
+ echo $OUTPUT->header();
print_error('secretalreadyused');
-
} else if (!empty($user) and $user->secret == $p_secret) {
// make sure that url relates to a valid user
$a->email = $user->email;
$a->link = $changepasswordurl;
- print_header($strforgotten, $strforgotten, $navigation);
+ echo $OUTPUT->header();
notice(get_string('emailpasswordsent', '', $a), $changepasswordurl);
} else {
// somebody probably tries to hack in by guessing secret - stop them!
$DB->set_field('user', 'secret', '', array('id'=>$user->id));
}
- print_header($strforgotten, $strforgotten, $navigation);
+ echo $OUTPUT->header();
print_error('forgotteninvalidurl');
}
}
}
- print_header($strforgotten, $strforgotten, $navigation);
+ $PAGE->set_title($strforgotten);
+ $PAGE->set_heading($strforgotten);
+ echo $OUTPUT->header();
if (empty($user->email) or !empty($CFG->protectusernames)) {
// Print general confirmation message
/// DISPLAY FORM
-print_header($strforgotten, $strforgotten, $navigation, 'id_email');
+$PAGE->set_title($strforgotten);
+$PAGE->set_heading($strforgotten);
+$PAGE->set_focuscontrol('id_email');
+echo $OUTPUT->header();
echo $OUTPUT->box(get_string('passwordforgotteninstructions'), 'generalbox boxwidthnormal boxaligncenter');
$mform->display();
}
$loginsite = get_string("loginsite");
- $navlinks = array(array('name' => $loginsite, 'link' => null, 'type' => 'misc'));
- $navigation = build_navigation($navlinks);
+ $PAGE->navbar->add($loginsite);
if ($user !== false or $frm !== false) {
// some auth plugin already supplied these
}
if (empty($user->confirmed)) { // This account was never confirmed
- print_header(get_string("mustconfirm"), get_string("mustconfirm") );
+ $PAGE->set_title(get_string("mustconfirm"));
+ $PAGE->set_heading(get_string("mustconfirm"));
+ echo $OUTPUT->header();
echo $OUTPUT->heading(get_string("mustconfirm"));
echo $OUTPUT->box(get_string("emailconfirmsent", "", $user->email), "generalbox boxaligncenter");
echo $OUTPUT->footer();
$passwordchangeurl = $CFG->httpswwwroot.'/login/change_password.php';
}
$days2expire = $userauth->password_expire($USER->username);
+ $PAGE->set_title("$site->fullname: $loginsite");
+ $PAGE->set_heading("$site->fullname");
+ $PAGE->set_headingmenu("<div class=\"langmenu\">$langmenu</div>");
if (intval($days2expire) > 0 && intval($days2expire) < intval($userauth->config->expiration_warning)) {
- print_header("$site->fullname: $loginsite", "$site->fullname", $navigation, '', '', true, "<div class=\"langmenu\">$langmenu</div>");
+ echo $OUTPUT->header();
echo $OUTPUT->confirm(get_string('auth_passwordwillexpire', 'auth', $days2expire), $passwordchangeurl, $urltogo);
echo $OUTPUT->footer();
exit;
} elseif (intval($days2expire) < 0 ) {
- print_header("$site->fullname: $loginsite", "$site->fullname", $navigation, '', '', true, "<div class=\"langmenu\">$langmenu</div>");
+ echo $OUTPUT->header();
echo $OUTPUT->confirm(get_string('auth_passwordisexpired', 'auth'), $passwordchangeurl, $urltogo);
echo $OUTPUT->footer();
exit;
$show_instructions = false;
}
- print_header("$site->fullname: $loginsite", $site->fullname, $navigation, $focus,
- '', true, '<div class="langmenu">'.$langmenu.'</div>');
+ $PAGE->set_title("$site->fullname: $loginsite");
+ $PAGE->set_heading("$site->fullname");
+ $PAGE->set_headingmenu("<div class=\"langmenu\">$langmenu</div>");
+ $PAGE->set_focuscontrol($focus);
+ echo $OUTPUT->header();
include("index_form.html");
-
echo $OUTPUT->footer();
redirect($redirect);
} else if (!confirm_sesskey($sesskey)) {
- print_header($SITE->fullname, $SITE->fullname, 'home');
+ $PAGE->set_title($SITE->fullname);
+ $PAGE->set_heading($SITE->fullname);
+ echo $OUTPUT->header();
echo $OUTPUT->confirm(get_string('logoutconfirm'), 'logout.php', $CFG->wwwroot.'/');
echo $OUTPUT->footer();
die;
if (isloggedin() and !isguestuser()) {
redirect( $CFG->wwwroot.'/', get_string('loginalready'), 5);
}
-$navigation = build_navigation(array(array('name' => 'MNET ID Provider', 'link' => null, 'type' => 'misc')));
-print_header('MNET ID Provider', 'MNET ID Provider', $navigation, 'form.email' );
+$PAGE->navbar->add('MNET ID Provider');
+$PAGE->set_title('MNET ID Provider');
+$PAGE->set_heading('MNET ID Provider');
+$PAGE->set_focuscontrol('email');
+
+echo $OUTPUT->header();
if ($form = data_submitted() and confirm_sesskey()) {
if ($user = $DB->get_record('user', array('username'=>$username, 'email'=>$form->email))) {
<form method="post">
<input type="hidden" name="sesskey" value="<?php echo $sesskey; ?>">
<?php echo get_string('email') ?>:
- <input type="text" name="email" size="" maxlength="100" />
+ <input type="text" name="email" id="email" size="" maxlength="100" />
<input type="submit" value="Find Login" />
</form>
<?php
$langmenu = $OUTPUT->select($select);
}
- $navlinks = array();
- $navlinks[] = array('name' => $login, 'link' => "index.php", 'type' => 'misc');
- $navlinks[] = array('name' => $newaccount, 'link' => null, 'type' => 'misc');
- $navigation = build_navigation($navlinks);
- print_header($newaccount, $newaccount, $navigation, $mform_signup->focus(), "", true, "<div class=\"langmenu\">$langmenu</div>");
-
+ $PAGE->navbar->add($login);
+ $PAGE->navbar->add($newaccount);
+ $PAGE->set_title($newaccount);
+ $PAGE->set_heading($newaccount);
+ $PAGE->set_focuscontrol($mform_signup->focus());
+ $PAGE->set_headingmenu("<div class=\"langmenu\">$langmenu</div>");
+
+ echo $OUTPUT->header();
$mform_signup->display();
echo $OUTPUT->footer();