: |
|;
$output .= &Apache::loncommon::select_dom_form($defdom,'udom').'
@@ -1325,6 +1399,13 @@ 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,
''.
@@ -1499,7 +1580,7 @@ sub verify_and_change_discussion {
if ($newdisp eq 'unread') {
$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 .= &mt('In discussions: all posts will be displayed.').' ';
&Apache::lonnet::del('environment',['discdisplay']);
@@ -1511,7 +1592,7 @@ sub verify_and_change_discussion {
if ($newmark eq 'ondisp') {
$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.=&mt('In discussions: posts will be identified as "NEW" until marked as read by the reader.').' ';
&Apache::lonnet::del('environment',['discmarkread']);
@@ -1576,7 +1657,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']);
@@ -1818,7 +1899,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',
@@ -1828,6 +1909,37 @@ sub handler {
text => 'Register Clicker'},
printmenu => 'yes',
}));
+ if ($env{'user.adv'}) {
+ 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'})
@@ -1849,7 +1961,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,
@@ -1932,7 +2044,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});
}
}
|