$lt{'domain'} :
|;
$output .= &Apache::loncommon::select_dom_form($defdom,'udom').'
@@ -1317,26 +1419,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;
}
#
@@ -1348,7 +1457,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
@@ -1369,7 +1478,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;
@@ -1489,11 +1598,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');
}
@@ -1501,11 +1610,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');
}
@@ -1568,7 +1677,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']);
@@ -1660,16 +1769,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=
@@ -1809,7 +1919,7 @@ sub handler {
href => '/adm/preferences',
subroutine => \&clickerchanger,
breadcrumb =>
- { href => '/adm/preferences?action=changeicons',
+ { href => '/adm/preferences?action=changeclicker',
text => 'Register Clicker'},
},
{ action => 'verify_and_change_clicker',
@@ -1819,6 +1929,38 @@ sub handler {
text => 'Register Clicker'},
printmenu => 'yes',
}));
+ my %author_roles = &Apache::lonnet::get_my_roles($user,$domain,'userroles','',['au']);
+ if (keys(%author_roles) > 0) {
+ push (@Options,({ action => 'changedomcoord',
+ linktext => 'Restrict Domain Coordinator Access',
+ href => '/adm/preferences',
+ subroutine => \&domcoordchanger,
+ breadcrumb =>
+ { href => '/adm/preferences?action=changedomcoord',
+ text => 'Restrict Domain Coordinator Access'},
+ },
+ { action => 'verify_and_change_domcoord',
+ subroutine => \&verify_and_change_domcoord,
+ breadcrumb =>
+ { href => '/adm/preferences?action=changedomcoord',
+ text => 'Restrict Domain Coordinator Access'},
+ printmenu => 'yes',
+ }));
+ }
+
+ push (@Options,({ action => 'lockwarning',
+ subroutine => \&lockwarning,
+ breadcrumb =>
+ { href => '/adm/preferences?action=lockwarning',
+ text => 'Lock Warnings'},
+ },
+ { action => 'verify_and_change_locks',
+ subroutine => \&verify_and_change_lockwarning,
+ breadcrumb =>
+ { href => '/adm/preferences?action=lockwarning',
+ text => 'Lockwarnings'},
+ printmenu => 'yes',
+ }));
if (&Apache::lonnet::allowed('whn',$env{'request.course.id'})
@@ -1840,7 +1982,7 @@ sub handler {
}));
}
- if ($env{'user.name'} =~ /^(albertel|fox|foxr|koretemey|korte|hallmat3|turtle|raeburn)$/) {
+ if ($env{'user.name'} =~ /^(albertel|fox|foxr|kortemey|korte|raeburn)$/) {
push (@Options,({ action => 'debugtoggle',
printmenu => 'yes',
subroutine => \&toggle_debug,
@@ -1923,7 +2065,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});
}
}