diff --git a/lang/en/moodle.php b/lang/en/moodle.php index f3f79e20407..75018cf0bb0 100644 --- a/lang/en/moodle.php +++ b/lang/en/moodle.php @@ -151,8 +151,7 @@ $string['emailconfirmation'] = "Hi \$a->firstname, A new account has been requested at '\$a->sitename' using your email address. -To confirm your new account, please go to the -following web address: +To confirm your new account, please go to this web address: \$a->link @@ -161,15 +160,40 @@ which you can just click on. If that doesn't work, then cut and paste the address into the address line at the top of your web browser window. -Cheers from the '\$a->sitename' administrator, +If you need help, please contact the site administrator, \$a->admin"; - +$string['emailconfirmationsubject'] = "\$a: account confirmation"; $string['emaildisplay'] = "Email display"; $string['emaildisplayno'] = "Hide my real email address from everyone"; $string['emaildisplayyes'] = "Allow everyone to see my email address"; $string['emaildisplaycourse'] = "Allow only other course members to see my email address"; $string['emailexists'] = "This email address is already registered."; $string['emailmustbereal'] = "Note: your email address must be a real one"; +$string['emailpasswordconfirmation'] = "Hi \$a->firstname, + +Someone (probably you) has requested a new password for your +account on '\$a->sitename'. + +To confirm this and have a new password sent to you via email, +go to the following web address: + + \$a->link + +In most mail programs, this should appear as a blue link +which you can just click on. If that doesn't work, +then cut and paste the address into the address +line at the top of your web browser window. + +If you need help, please contact the site administrator, +\$a->admin"; +$string['emailpasswordconfirmationsubject'] = "\$a: change password confirmation"; +$string['emailpasswordconfirmsent'] = "An email should have been sent to your address at \$a. +
It contains easy instructions to confirm and complete this password change. +If you continue to have difficulty, contact the site administrator."; +$string['emailpasswordsent'] = "Thank you for confirming the change of password. +
An email containing your new password has been sent to your address at \$a->email. +
The new password was automatically generated - you might like to
+link>change your password to something easier to remember.";
$string['enrolmentkey'] = "Enrolment key";
$string['enrolmentkeyfrom'] = "This course requires an 'enrolment key' - a one-time
password that you should have got from \$a";
@@ -431,6 +455,7 @@ $string['outline'] = "Outline";
$string['participants'] = "Participants";
$string['password'] = "Password";
$string['passwordchanged'] = "Password has been changed";
+$string['passwordconfirmchange'] = "Confirm password change";
$string['passwordsdiffer'] = "These passwords do not match";
$string['passwordrecovery'] = "Yes, help me log in";
$string['passwordsent'] = "Password has been sent";
diff --git a/lib/moodlelib.php b/lib/moodlelib.php
index ba0e99e75e0..46ac26a8155 100644
--- a/lib/moodlelib.php
+++ b/lib/moodlelib.php
@@ -771,12 +771,32 @@ function send_confirmation_email($user) {
$data->admin = "$from->firstname $from->lastname ($from->email)";
$message = get_string("emailconfirmation", "", $data);
- $subject = "$site->fullname account confirmation";
+ $subject = get_string("emailconfirmationsubject", "", $site->fullname);
return email_to_user($user, $from, $subject, $message);
}
+function send_password_change_confirmation_email($user) {
+
+ global $CFG;
+
+ $site = get_site();
+ $from = get_admin();
+
+ $data->firstname = $user->firstname;
+ $data->sitename = $site->fullname;
+ $data->link = "$CFG->wwwroot/login/forgot_password.php?p=$user->secret&s=$user->username";
+ $data->admin = "$from->firstname $from->lastname ($from->email)";
+
+ $message = get_string("emailpasswordconfirmation", "", $data);
+ $subject = get_string("emailpasswordconfirmationsubject", "", $site->fullname);
+
+ return email_to_user($user, $from, $subject, $message);
+
+}
+
+
/// FILE HANDLING /////////////////////////////////////////////
diff --git a/lib/weblib.php b/lib/weblib.php
index 738e442d871..5fe0f6f61a5 100644
--- a/lib/weblib.php
+++ b/lib/weblib.php
@@ -715,7 +715,7 @@ function print_navigation ($navigation) {
if (! $site = get_site()) {
$site->shortname = get_string("home");;
}
- echo "framename}\" HREF=\"$CFG->wwwroot/\">$site->shortname -> $navigation";
+ echo "framename}\" href=\"$CFG->wwwroot/\">$site->shortname -> $navigation";
}
}
@@ -725,9 +725,9 @@ function print_heading($text, $align="CENTER", $size=3) {
function print_heading_with_help($text, $helppage, $module="moodle") {
// Centered heading with attached help button (same title text)
- echo "
".stripslashes_safe($text);
+ echo " ".stripslashes_safe($text);
helpbutton($helppage, $text, $module);
- echo "
$message
"; - echo "";
- echo "".get_string("yes")."";
+ print_simple_box_start("center", "60%", "$THEME->cellheading");
+ echo " $message ";
+ echo "".get_string("yes")."";
echo " ";
- echo "".get_string("no")."";
- echo "