add page heading

This commit is contained in:
Rossiani Wijaya 2010-05-27 09:21:24 +00:00
parent 92ff62362c
commit c93fdc7b71
5 changed files with 13 additions and 11 deletions

View File

@ -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 {

View File

@ -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')) {

View File

@ -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 "<h3>".get_string("thanks").", ". fullname($user) . "</h3>\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 "<h3>".get_string("thanks").", ". fullname($USER) . "</h3>\n";

View File

@ -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();

View File

@ -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();