From c93fdc7b7170e83c311302f710182f758d6532b5 Mon Sep 17 00:00:00 2001 From: Rossiani Wijaya Date: Thu, 27 May 2010 09:21:24 +0000 Subject: [PATCH] add page heading --- auth/email/auth.php | 2 +- login/change_password.php | 4 ++-- login/confirm.php | 6 ++++-- login/forgot_password.php | 6 +++--- login/signup.php | 6 +++--- 5 files changed, 13 insertions(+), 11 deletions(-) diff --git a/auth/email/auth.php b/auth/email/auth.php index f6e82042690..938476f3abd 100644 --- a/auth/email/auth.php +++ b/auth/email/auth.php @@ -99,7 +99,7 @@ class auth_plugin_email extends auth_plugin_base { $emailconfirm = get_string('emailconfirm'); $PAGE->navbar->add($emailconfirm); $PAGE->set_title($emailconfirm); - $PAGE->set_heading($emailconfirm); + $PAGE->set_heading($PAGE->course->fullname); echo $OUTPUT->header(); notice(get_string('emailconfirmsent', '', $user->email), "$CFG->wwwroot/index.php"); } else { diff --git a/login/change_password.php b/login/change_password.php index c259a2c0a08..b09e14ab42e 100644 --- a/login/change_password.php +++ b/login/change_password.php @@ -110,7 +110,7 @@ if ($mform->is_cancelled()) { $PAGE->navbar->add($fullname, new moodle_url('/user/view.php', array('id'=>$USER->id, 'course'=>$course->id))); $PAGE->navbar->add($strpasswordchanged); $PAGE->set_title($strpasswordchanged); - $PAGE->set_heading($strpasswordchanged); + $PAGE->set_heading($COURSE->fullname); echo $OUTPUT->header(); if (empty($SESSION->wantsurl) or $SESSION->wantsurl == $CFG->httpswwwroot.'/login/change_password.php') { @@ -133,7 +133,7 @@ $fullname = fullname($USER, true); $PAGE->navbar->add($fullname, new moodle_url('/user/view.php', array('id'=>$USER->id, 'course'=>$course->id))); $PAGE->navbar->add($strchangepassword); $PAGE->set_title($strchangepassword); -$PAGE->set_heading($strchangepassword); +$PAGE->set_heading($COURSE->fullname); echo $OUTPUT->header(); if (get_user_preferences('auth_forcepasswordchange')) { diff --git a/login/confirm.php b/login/confirm.php index bf0bf773db5..39890b1c490 100644 --- a/login/confirm.php +++ b/login/confirm.php @@ -33,8 +33,9 @@ if (!empty($data) || (!empty($p) && !empty($s))) { if ($confirmed == AUTH_CONFIRM_ALREADY) { $user = get_complete_user_data('username', $username); + $PAGE->navbar->add(get_string("alreadyconfirmed")); $PAGE->set_title(get_string("alreadyconfirmed")); - $PAGE->set_heading(get_string("alreadyconfirmed")); + $PAGE->set_heading($COURSE->fullname); echo $OUTPUT->header(); echo $OUTPUT->box_start('generalbox centerpara boxwidthnormal boxaligncenter'); echo "

".get_string("thanks").", ". fullname($user) . "

\n"; @@ -60,8 +61,9 @@ if (!empty($data) || (!empty($p) && !empty($s))) { redirect($goto); } + $PAGE->navbar->add(get_string("confirmed")); $PAGE->set_title(get_string("confirmed")); - $PAGE->set_heading(get_string("confirmed")); + $PAGE->set_heading($COURSE->fullname); echo $OUTPUT->header(); echo $OUTPUT->box_start('generalbox centerpara boxwidthnormal boxaligncenter'); echo "

".get_string("thanks").", ". fullname($USER) . "

\n"; diff --git a/login/forgot_password.php b/login/forgot_password.php index 5e0257c3faf..a0d2e98b406 100644 --- a/login/forgot_password.php +++ b/login/forgot_password.php @@ -40,7 +40,7 @@ if ($p_secret !== false) { update_login_count(); $PAGE->set_title($strforgotten); - $PAGE->set_heading($strforgotten); + $PAGE->set_heading($COURSE->fullname); $user = get_complete_user_data('username', $p_username); if (!empty($user) and $user->secret === '') { @@ -133,7 +133,7 @@ if ($mform->is_cancelled()) { } $PAGE->set_title($strforgotten); - $PAGE->set_heading($strforgotten); + $PAGE->set_heading($COURSE->fullname); echo $OUTPUT->header(); if (empty($user->email) or !empty($CFG->protectusernames)) { @@ -153,7 +153,7 @@ if ($mform->is_cancelled()) { /// DISPLAY FORM $PAGE->set_title($strforgotten); -$PAGE->set_heading($strforgotten); +$PAGE->set_heading($COURSE->fullname); $PAGE->set_focuscontrol('id_email'); echo $OUTPUT->header(); diff --git a/login/signup.php b/login/signup.php index e1f3fd40a21..686f8b9fd24 100644 --- a/login/signup.php +++ b/login/signup.php @@ -48,7 +48,7 @@ if (!$authplugin->can_signup()) { //HTTPS is potentially required in this page httpsrequired(); - +$PAGE->set_url('/login/signup.php'); $mform_signup = new login_signup_form(); if ($mform_signup->is_cancelled()) { @@ -72,9 +72,9 @@ $login = get_string('login'); $PAGE->navbar->add($login); $PAGE->navbar->add($newaccount); -$PAGE->set_url('/login/signup.php'); + $PAGE->set_title($newaccount); -$PAGE->set_heading($newaccount); +$PAGE->set_heading($SITE->fullname); $PAGE->set_focuscontrol($mform_signup->focus()); echo $OUTPUT->header();