$lt{'domain'} :
|;
$output .= &Apache::loncommon::select_dom_form($defdom,'udom').'
@@ -1314,26 +1496,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 +1534,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
@@ -1361,12 +1550,18 @@ ENDERROR
my $result = &Apache::lonnet::changepass
($user,$domain,$currentpass,$newpass1,$homeserver,$caller);
# Inform the user the password has (not?) been changed
+ my $message;
if ($result =~ /^ok$/) {
- $r->print("".&mt('The password for [_1] was successfully changed',$user)." ");
+ $message = &mt('The password for [_1] was successfully changed',$user);
+ print_main_menu($r, $message);
+# $r->print("".&mt('The password for [_1] was successfully changed',$user)." ");
} 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').'.');
+ $message = &mt("The password for [_1] was not changed",$user)
+ .&mt('Please make sure your old password was entered correctly.');
+ print_main_menu($r, $message);
+# $r->print("".&mt("The password for [_1] was not changed",$user)." ".
+# &mt('Please make sure your old password was entered correctly.'));
return 1;
}
return;
@@ -1377,6 +1572,11 @@ ENDERROR
################################################################
sub discussionchanger {
my $r = shift;
+ Apache::lonhtmlcommon::add_breadcrumb(
+ { href => '/adm/preferences?action=changediscussions',
+ text => 'Change Discussion Preferences'});
+ $r->print(Apache::loncommon::start_page('Change Discussion Preferences'));
+ $r->print(Apache::lonhtmlcommon::breadcrumbs('Change Discussion Preferences'));
my $user = $env{'user.name'};
my $domain = $env{'user.domain'};
my %userenv = &Apache::lonnet::get
@@ -1405,9 +1605,9 @@ sub discussionchanger {
'pref' => 'Display Preference',
'curr' => 'Current setting ',
'actn' => 'Action',
- 'sdpf' => 'Set display preferences for discussion posts for both bulletin boards and individual resources in all your courses.',
+ 'sdpf' => 'Set display preferences for discussion posts for both discussion boards and individual resources in all your courses.',
'prca' => 'Preferences can be set that determine',
- 'whpo' => 'Which posts are displayed when you display a bulletin board or resource, and',
+ 'whpo' => 'Which posts are displayed when you display a discussion board or resource, and',
'unwh' => 'Under what circumstances posts are identfied as "New"',
'allposts' => 'All posts',
'unread' => 'New posts only',
@@ -1467,15 +1667,8 @@ END
END
$r->print(&Apache::loncommon::end_data_table_row().
&Apache::loncommon::end_data_table());
- $r->print(<<"END");
-
-
-
-
-
-Note: $lt{'thde'}
-
-END
+
+ $r->print(' '.&mt('Note').': '.$lt{'thde'}.'');
}
sub verify_and_change_discussion {
@@ -1486,30 +1679,31 @@ 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');
+ &Apache::lonnet::delenv('environment.discdisplay');
}
}
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');
+ &Apache::lonnet::delenv('environment.discmarkread');
}
}
- $r->print(<print(< '/adm/preferences?action=changecourseinit',
+ text => 'Change Course Init. Pref.'});
+ $r->print(Apache::loncommon::start_page('Change Course Initialization Preference'));
+ $r->print(Apache::lonhtmlcommon::breadcrumbs('Change Course Init. Pref.'));
my $user = $env{'user.name'};
my $domain = $env{'user.domain'};
my %userenv = &Apache::lonnet::get('environment',['course_init_display']);
@@ -1530,14 +1729,21 @@ sub coursedisplaychanger {
$whatsnewselect = '';
}
}
- my %pagenames = (
+ my %pagenames = &Apache::lonlocal::texthash(
firstres => 'First resource',
- whatsnew => "What's new page",
+ whatsnew => "What's New page",
);
- my $whatsnew_off=&mt('Display the [_1] in the course.','first resource ');
- my $whatsnew_on=&mt('Display the "[_1]" page - a summary of items in the course which require attention.',"What's New ");
+ my $whatsnew_off=&mt('Display the [_1]first resource[_2] in the course.','',' ');
+ my $whatsnew_on=&mt("Display the [_1]What's New page[_2] - a summary of items in the course which require attention.",'',' ');
- $r->print(''.&mt('Set the default page to be displayed when you select a course role').' '.&mt('(Currently: [_1])',$pagenames{$currvalue}).' '.&mt('The global user preference you set for your courses can be overridden in an individual course by setting a course specific setting via the "[_1]" page in the course',"What's New ").' ');
+ $r->print(''
+ .&mt('Set the default page to be displayed when you select a course role')
+ .' '
+ .&mt('(Currently: [_1])',$pagenames{$currvalue})
+ .' '
+ .&mt("The global user preference you set for your courses can be overridden in an individual course by setting a course specific setting via the [_1]What's New page[_2] in the course.",'',' ')
+ .' '
+ );
$r->print(<
@@ -1545,7 +1751,7 @@ sub coursedisplaychanger {
$whatsnew_off
$whatsnew_on
ENDLSCREEN
- $r->print('
+ $r->print('
');
}
@@ -1565,11 +1771,11 @@ 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']);
- &Apache::lonnet::delenv('environment\.course_init_display');
+ &Apache::lonnet::delenv('environment.course_init_display');
}
my $refpage = $env{'form.refpage'};
if (($env{'request.course.fn'}) && ($env{'request.course.id'})) {
@@ -1584,12 +1790,199 @@ sub verify_and_change_coursepage {
$refpage.'">'.$lt{'dasp'}.'';
}
}
- $r->print(<
-ENDVCSCREEN
+# $r->print(<
+#ENDVCSCREEN
+ print_main_menu($r, $message);
}
+sub print_main_menu {
+ my ($r, $message) = @_;
+ # Determine current authentication method
+ my $user = $env{'user.name'};
+ my $domain = $env{'user.domain'};
+ my $currentauth=&Apache::lonnet::queryauthenticate($user,$domain);
+
+ # build the data structure for menu generation
+my $aboutmeurl='/adm/'.$env{'user.domain'}.'/'.$env{'user.name'}.'/aboutme';
+my $role = ($env{'user.adv'} ? 'Roles' : 'Course');
+my %permissions;
+if (&Apache::lonnet::usertools_access($user,$domain,'aboutme')) {
+ $permissions{'aboutme'} = 'F';
+}
+my @menu=
+ ({ categorytitle=>'Personal Data',
+ items =>[
+ { linktext => 'Personal Information Page',
+ url => $aboutmeurl,
+ permission => $permissions{'aboutme'},
+ #help => 'Prefs_About_Me',
+ icon => 'system-users.png',
+ linktitle => 'Edit information about yourself that should be displayed on your public profile.'
+ },
+ { linktext => 'Screen Name',
+ url => '/adm/preferences?action=changescreenname',
+ permission => 'F',
+ #help => 'Prefs_Screen_Name_Nickname',
+ icon => 'preferences-desktop-font.png',
+ linktitle => 'Change the name that is displayed in your posts.'
+ },
+ ]
+ },
+ { categorytitle=>'Page Display Settings',
+ items =>[
+ { linktext => 'Color Scheme',
+ url => '/adm/preferences?action=changecolors',
+ permission => 'F',
+ #help => 'Change_Colors',
+ icon => 'preferences-desktop-theme.png',
+ linktitle => 'Change LON-CAPA default colors.'
+ },
+ { linktext => 'Menu Display',
+ url => '/adm/preferences?action=changeicons',
+ permission => 'F',
+ #help => '',
+ icon => 'preferences-system-windows.png',
+ linktitle => 'Change whether the menus are displayed with buttons, icons or icons and text.'
+ }
+
+ ]
+ },
+ { categorytitle=>'Content Display Settings',
+ items =>[
+ { linktext => 'Language',
+ url => '/adm/preferences?action=changelanguages',
+ permission => 'F',
+ #help => 'Prefs_Language',
+ icon => 'preferences-desktop-locale.png',
+ linktitle => 'Choose the default language for this user.'
+ },
+ { linktext => 'WYSIWYG Editor',
+ url => '/adm/preferences?action=changewysiwyg',
+ permission => 'F',
+ #help => '',
+ icon => 'edit-select-all.png',
+ linktitle => 'Enable or disable the WYSIWYG-Editor.'
+ },
+ { linktext => $role.' Page',
+ url => '/adm/preferences?action=changerolespref',
+ permission => 'F',
+ #help => '',
+ icon => 'sctr.png',
+ linktitle => 'Configure the roles hotlist.'
+ },
+ { linktext => 'Display of Scientific Equations',
+ url => '/adm/preferences?action=changetexenginepref',
+ permission => 'F',
+ #help => '',
+ icon => 'stat.png',
+ linktitle => 'Change how Scientific Equations are displayed.'
+ },
+ ]
+ },
+ { categorytitle=>'Message Management',
+ items =>[
+ { linktext => 'Messages & Notifications',
+ url => '/adm/preferences?action=changemsgforward',
+ permission => 'F',
+ #help => 'Prefs_Messages',
+ icon => 'mail-reply-all.png',
+ linktitle => 'Change messageforwarding or notifications settings.'
+ },
+ { linktext => 'Discussion Display',
+ url => '/adm/preferences?action=changediscussions',
+ permission => 'F',
+ #help => 'Change_Discussion_Display',
+ icon => 'mail-message-new.png',
+ linktitle => 'Set display preferences for discussion posts for both discussion boards and individual resources in all your courses.'
+ },
+ ]
+ },
+ { categorytitle=>'Other',
+ items =>[
+ { linktext => 'Register Response Devices ("Clickers")',
+ url => '/adm/preferences?action=changeclicker',
+ permission => 'F',
+ #help => '',
+ icon => 'network-workgroup.png',
+ linktitle => 'Register your clicker.'
+ },
+ ]
+ },
+ );
+
+ if ($currentauth =~ /^(unix|internal):/) {
+push(@{ $menu[0]->{items} }, {
+ linktext => 'Password',
+ url => '/adm/preferences?action=changepass',
+ permission => 'F',
+ #help => 'Change_Password',
+ icon => 'emblem-readonly.png',
+ linktitle => 'Change your password.',
+ });
+ }
+ if ($env{'environment.remote'} eq 'off') {
+push(@{ $menu[1]->{items} }, {
+ linktext => 'Launch Remote Control',
+ url => '/adm/remote?url=/adm/preferences?action=launch',
+ permission => 'F',
+ #help => '',
+ icon => 'network-wireless.png',
+ linktitle => 'Launch the remote control for LON-CAPA.',
+ });
+ }else{
+push(@{ $menu[1]->{items} }, {
+ linktext => 'Collapse Remote Control',
+ url => '/adm/remote?url=/adm/preferences?action=collapse',
+ permission => 'F',
+ #help => '',
+ icon => 'network-wireless.png',
+ linktitle => 'Collapse the remote control for LON-CAPA.',
+ });
+ }
+ my %author_roles = &Apache::lonnet::get_my_roles($user,$domain,'userroles','',['au']);
+ if (keys(%author_roles) > 0) {
+push(@{ $menu[4]->{items} }, {
+ linktext => 'Restrict Domain Coordinator Access',
+ url => '/adm/preferences?action=changedomcoord',
+ permission => 'F',
+ #help => '',
+ icon => 'system-lock-screen.png',
+ linktitle => 'Restrict domain coordinator access.',
+ });
+ }
+
+ if (&Apache::lonnet::allowed('whn',$env{'request.course.id'})
+ || &Apache::lonnet::allowed('whn',$env{'request.course.id'}.'/'
+ .$env{'request.course.sec'})) {
+push(@{ $menu[4]->{items} }, {
+ linktext => 'Course Initialization',
+ url => '/adm/preferences?action=changecourseinit',
+ permission => 'F',
+ #help => '',
+ icon => 'edit-copy.png',
+ linktitle => 'Set the default page to be displayed when you select a course role.',
+ });
+
+ }
+ if ($env{'user.name'} =~ /^(albertel|fox|foxr|kortemey|korte|raeburn)$/) {
+push(@{ $menu[4]->{items} }, {
+ linktext => 'Toggle Debug Messages (Current:'.$env{'user.debug'}.')',
+ url => '/adm/preferences?action=debugtoggle',
+ permission => 'F',
+ #help => '',
+ icon => 'blog.png',
+ linktitle => 'Toggle Debug Messages.',
+ });
+ }
+
+ $r->print(&Apache::loncommon::start_page('Change Preferences'));
+ $r->print(Apache::lonhtmlcommon::breadcrumbs('Change Preferences'));
+ $r->print($message);
+ $r->print(Apache::lonhtmlcommon::generate_menu(@menu));
+ $r->print(Apache::loncommon::end_page());
+}
######################################################
# other handler subroutines #
@@ -1598,7 +1991,91 @@ ENDVCSCREEN
################################################################
# Main handler #
################################################################
-sub handler {
+sub handler {
+ my $r = shift;
+ Apache::loncommon::content_type($r,'text/html');
+ # Some pages contain DES keys and should not be cached.
+ Apache::loncommon::no_cache($r);
+ $r->send_http_header;
+ return OK if $r->header_only;
+ #
+ Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'},
+ ['action','wysiwyg','returnurl','refpage']);
+ #
+ Apache::lonhtmlcommon::clear_breadcrumbs();
+ Apache::lonhtmlcommon::add_breadcrumb
+ ({href => '/adm/preferences',
+ text => 'Set User Preferences'});
+ if(!exists $env{'form.action'}) {
+ &print_main_menu($r);
+ }elsif($env{'form.action'} eq 'changepass'){
+ &passwordchanger($r);
+ }elsif($env{'form.action'} eq 'verify_and_change_pass'){
+ &verify_and_change_password($r);
+ }elsif($env{'form.action'} eq 'changescreenname'){
+ &screennamechanger($r);
+ }elsif($env{'form.action'} eq 'verify_and_change_screenname'){
+ &verify_and_change_screenname($r);
+ }elsif($env{'form.action'} eq 'changemsgforward'){
+ &msgforwardchanger($r);
+ }elsif($env{'form.action'} eq 'verify_and_change_msgforward'){
+ &verify_and_change_msgforward($r);
+ }elsif($env{'form.action'} eq 'changecolors'){
+ &colorschanger($r);
+ }elsif($env{'form.action'} eq 'verify_and_change_colors'){
+ &verify_and_change_colors($r);
+ }elsif($env{'form.action'} eq 'changelanguages'){
+ &languagechanger($r);
+ }elsif($env{'form.action'} eq 'verify_and_change_languages'){
+ &verify_and_change_languages($r);
+ }elsif($env{'form.action'} eq 'changewysiwyg'){
+ &wysiwygchanger($r);
+ }elsif($env{'form.action'} eq 'set_wysiwyg'){
+ &verify_and_change_wysiwyg($r);
+ }elsif($env{'form.action'} eq 'changediscussions'){
+ &discussionchanger($r);
+ }elsif($env{'form.action'} eq 'verify_and_change_discussion'){
+ &verify_and_change_discussion($r);
+ }elsif($env{'form.action'} eq 'changerolespref'){
+ &rolesprefchanger($r);
+ }elsif($env{'form.action'} eq 'verify_and_change_rolespref'){
+ &verify_and_change_rolespref($r);
+ }elsif($env{'form.action'} eq 'changetexenginepref'){
+ &texenginechanger($r);
+ }elsif($env{'form.action'} eq 'verify_and_change_texengine'){
+ &verify_and_change_texengine($r);
+ }elsif($env{'form.action'} eq 'changeicons'){
+ &iconchanger($r);
+ }elsif($env{'form.action'} eq 'verify_and_change_icons'){
+ &verify_and_change_icons($r);
+ }elsif($env{'form.action'} eq 'changeclicker'){
+ &clickerchanger($r);
+ }elsif($env{'form.action'} eq 'verify_and_change_clicker'){
+ &verify_and_change_clicker($r);
+ }elsif($env{'form.action'} eq 'changedomcoord'){
+ &domcoordchanger($r);
+ }elsif($env{'form.action'} eq 'verify_and_change_domcoord'){
+ &verify_and_change_domcoord($r);
+ }elsif($env{'form.action'} eq 'lockwarning'){
+ &lockwarning($r);
+ }elsif($env{'form.action'} eq 'verify_and_change_locks'){
+ &verify_and_change_lockwarning($r);
+ }elsif($env{'form.action'} eq 'changecourseinit'){
+ &coursedisplaychanger($r);
+ }elsif($env{'form.action'} eq 'verify_and_change_coursepage'){
+ &verify_and_change_coursepage($r);
+ }elsif($env{'form.action'} eq 'debugtoggle'){
+ toggle_debug();
+ print_main_menu($r);
+ }
+
+ return OK;
+
+
+}
+#remove when done
+#old handler routine
+sub handler2 {
my $r = shift;
my $user = $env{'user.name'};
my $domain = $env{'user.domain'};
@@ -1655,25 +2132,26 @@ sub handler {
}));
push (@Options,({ action => 'changemsgforward',
- linktext => 'Change Message Forwarding and Notification Email Addresses',
+ linktext => 'Change Message Forwarding and Notification E-mail 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'},
- printmenu => 'no',
+ text => 'Change Message Forwarding/Notification'},
+ printmenu => 'yes',
subroutine => \&verify_and_change_msgforward }));
my $aboutmeaction=
'/adm/'.$env{'user.domain'}.'/'.$env{'user.name'}.'/aboutme';
push (@Options,{ action => 'none',
linktext =>
- q{Edit the 'About Me' Personal Information Screen},
+ q{Edit the Personal Information Page},
help => 'Prefs_About_Me',
href => $aboutmeaction});
push (@Options,({ action => 'changecolors',
@@ -1801,21 +2279,53 @@ sub handler {
printmenu => 'yes',
}));
-# push (@Options,({ action => 'changeclicker',
-# linktext => 'Register Response Devices ("Clickers")',
-# href => '/adm/preferences',
-# subroutine => \&clickerchanger,
-# breadcrumb =>
-# { href => '/adm/preferences?action=changeicons',
-# text => 'Register Clicker'},
-# },
-# { action => 'verify_and_change_clicker',
-# subroutine => \&verify_and_change_clicker,
-# breadcrumb =>
-# { href => '/adm/preferences?action=changeclicker',
-# text => 'Register Clicker'},
-# printmenu => 'yes',
-# }));
+ push (@Options,({ action => 'changeclicker',
+ linktext => 'Register Response Devices ("Clickers")',
+ href => '/adm/preferences',
+ subroutine => \&clickerchanger,
+ breadcrumb =>
+ { href => '/adm/preferences?action=changeclicker',
+ text => 'Register Clicker'},
+ },
+ { action => 'verify_and_change_clicker',
+ subroutine => \&verify_and_change_clicker,
+ breadcrumb =>
+ { href => '/adm/preferences?action=changeclicker',
+ 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'})
@@ -1837,7 +2347,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,
@@ -1918,9 +2428,9 @@ sub handler {
sub toggle_debug {
if ($env{'user.debug'}) {
- &Apache::lonnet::delenv('user\.debug');
+ &Apache::lonnet::delenv('user.debug');
} else {
- &Apache::lonnet::appenv('user.debug' => 1);
+ &Apache::lonnet::appenv({'user.debug' => 1});
}
}