: |
|;
$output .= &Apache::loncommon::select_dom_form($defdom,'udom').'
@@ -1314,26 +1325,33 @@ ENDERROR
#
if ($caller eq 'reset_by_email') {
my %data = &Apache::lonnet::tmpget($mailtoken);
+ if (keys(%data) == 0) {
+ &passwordchanger($r,
+ ''.
+ &mt('Could not verify current authentication.').' '.
+ &mt('Please try again.').'',$caller,$mailtoken);
+ return 1;
+ }
if ($currentpass ne $data{'temppasswd'}) {
&passwordchanger($r,
''.
- &mt('Could not verify current authentication').'. '.
- &mt('Please try again').'.',$caller,$mailtoken);
+ &mt('Could not verify current authentication.').' '.
+ &mt('Please try again.').'',$caller,$mailtoken);
return 1;
}
}
if ($newpass1 ne $newpass2) {
&passwordchanger($r,
''.
- &mt('The new passwords you entered do not match').'. '.
- &mt('Please try again').'.',$caller,$mailtoken);
+ &mt('The new passwords you entered do not match.').' '.
+ &mt('Please try again.').'',$caller,$mailtoken);
return 1;
}
if (length($newpass1) < 7) {
&passwordchanger($r,
''.
- &mt('Passwords must be a minimum of 7 characters long').'. '.
- &mt('Please try again').'.',$caller,$mailtoken);
+ &mt('Passwords must be a minimum of 7 characters long.').' '.
+ &mt('Please try again.').'',$caller,$mailtoken);
return 1;
}
#
@@ -1345,7 +1363,7 @@ ENDERROR
if ($badpassword) {
# I can't figure out how to enter bad characters on my browser.
my $errormessage =''.
- &mt('The password you entered contained illegal characters').'. '.
+ &mt('The password you entered contained illegal characters.').' '.
&mt('Valid characters are').(<<"ENDERROR");
: space and
@@ -1366,7 +1384,7 @@ ENDERROR
} else {
# error error: run in circles, scream and shout
$r->print("".&mt("The password for [_1] was not changed",$user)."".
- &mt('Please make sure your old password was entered correctly').'.');
+ &mt('Please make sure your old password was entered correctly.'));
return 1;
}
return;
@@ -1486,11 +1504,11 @@ sub verify_and_change_discussion {
if (defined($env{'form.discdisp'}) ) {
my $newdisp = $env{'form.newdisp'};
if ($newdisp eq 'unread') {
- $message .='In discussions: only new posts will be displayed. ';
+ $message .=&mt('In discussions: only new posts will be displayed.').' ';
&Apache::lonnet::put('environment',{'discdisplay' => $newdisp});
- &Apache::lonnet::appenv('environment.discdisplay' => $newdisp);
+ &Apache::lonnet::appenv({'environment.discdisplay' => $newdisp});
} else {
- $message .= 'In discussions: all posts will be displayed. ';
+ $message .= &mt('In discussions: all posts will be displayed.').' ';
&Apache::lonnet::del('environment',['discdisplay']);
&Apache::lonnet::delenv('environment\.discdisplay');
}
@@ -1498,11 +1516,11 @@ sub verify_and_change_discussion {
if (defined($env{'form.discmark'}) ) {
my $newmark = $env{'form.newmark'};
if ($newmark eq 'ondisp') {
- $message.='In discussions: new posts will be cease to be identified as "new" after display. ';
+ $message.=&mt('In discussions: new posts will be cease to be identified as "NEW" after display.').' ';
&Apache::lonnet::put('environment',{'discmarkread' => $newmark});
- &Apache::lonnet::appenv('environment.discmarkread' => $newmark);
+ &Apache::lonnet::appenv({'environment.discmarkread' => $newmark});
} else {
- $message.='In discussions: posts will be identified as "new" until marked as read by the reader. ';
+ $message.=&mt('In discussions: posts will be identified as "NEW" until marked as read by the reader.').' ';
&Apache::lonnet::del('environment',['discmarkread']);
&Apache::lonnet::delenv('environment\.discmarkread');
}
@@ -1565,7 +1583,7 @@ sub verify_and_change_coursepage {
if ($newdisp eq 'firstres') {
$message .= $lt{'ywbt'}.' ';
&Apache::lonnet::put('environment',{'course_init_display' => $newdisp});
- &Apache::lonnet::appenv('environment.course_init_display' => $newdisp);
+ &Apache::lonnet::appenv({'environment.course_init_display' => $newdisp});
} else {
$message .= $lt{'apwb'}.' ';
&Apache::lonnet::del('environment',['course_init_display']);
@@ -1657,16 +1675,17 @@ sub handler {
push (@Options,({ action => 'changemsgforward',
linktext => 'Change Message Forwarding and Notification Email Addresses',
href => '/adm/preferences',
- help => 'Prefs_Forwarding',
+ help => 'Prefs_Messages',
breadcrumb =>
{ href => '/adm/preferences?action=changemsgforward',
- text => 'Change Message Forwarding'},
+ text => 'Change Message Forwarding/Notification'},
subroutine => \&msgforwardchanger,
},
{ action => 'verify_and_change_msgforward',
+ help => 'Prefs_Messages',
breadcrumb =>
{ href => '/adm/preferences?action=changemsgforward',
- text => 'Change Message Forwarding'},
+ text => 'Change Message Forwarding/Notification'},
printmenu => 'no',
subroutine => \&verify_and_change_msgforward }));
my $aboutmeaction=
@@ -1920,7 +1939,7 @@ sub toggle_debug {
if ($env{'user.debug'}) {
&Apache::lonnet::delenv('user\.debug');
} else {
- &Apache::lonnet::appenv('user.debug' => 1);
+ &Apache::lonnet::appenv({'user.debug' => 1});
}
}
|