--- loncom/interface/lonpreferences.pm 2009/04/25 17:14:24 1.153 +++ loncom/interface/lonpreferences.pm 2009/05/04 19:35:31 1.156 @@ -1,7 +1,7 @@ # The LearningOnline Network # Preferences # -# $Id: lonpreferences.pm,v 1.153 2009/04/25 17:14:24 www Exp $ +# $Id: lonpreferences.pm,v 1.156 2009/05/04 19:35:31 tempelho Exp $ # # Copyright Michigan State University Board of Trustees # @@ -473,7 +473,7 @@ sub verify_and_change_rolespref { # Unset any roles that were previously frozen but aren't in list foreach my $role_key (sort(keys(%recent_roles))) { if (($frozen_roles{$role_key}) && (!exists($freeze{$role_key}))) { - $message .= "
".&mt('Unfreezing '.$role.': [_1]',$role_text{$role_key})."\n"; + $message .= "
".&Apache::lonhtmlcommon::confirm_success(&mt('Unfreezing '.$role.': [_1]',$role_text{$role_key}))."\n"; &Apache::lonhtmlcommon::store_recent('roles',$role_key,' ',0); } } @@ -481,7 +481,8 @@ sub verify_and_change_rolespref { # Freeze selected roles foreach my $role_key (@freeze_list) { if (!$frozen_roles{$role_key}) { - $message .= "
".&mt('Freezing '.$role.': [_1]',$role_text{$role_key})."\n"; + $message .= "
". + &Apache::lonhtmlcommon::confirm_success(&mt('Freezing '.$role.': [_1]',$role_text{$role_key}))."\n"; &Apache::lonhtmlcommon::store_recent('roles', $role_key,' ',1); } @@ -568,7 +569,7 @@ sub verify_and_change_screenname { ################################################################ sub iconchanger { my $r = shift; - Apache::lonhtmlcommon::add_breadcrumb( + &Apache::lonhtmlcommon::add_breadcrumb( { href => '/adm/preferences?action=changeicons', text => 'Change Main Menu'}); $r->print(Apache::loncommon::start_page('Page Display Settings')); @@ -669,7 +670,7 @@ sub verify_and_change_clicker { sub domcoordchanger { my $r = shift; - Apache::lonhtmlcommon::add_breadcrumb( + &Apache::lonhtmlcommon::add_breadcrumb( { href => '/adm/preferences?action=changedomcoord', text => 'Restrict Domain Coordinator Access'}); $r->print(Apache::loncommon::start_page('Restrict Domain Coordinator Access')); @@ -1080,6 +1081,7 @@ sub colorschanger { 'tabbg' => 'Header Background', 'sidebg'=> 'Header Border', 'font' => 'Font', + 'fontmenu' => 'Font Menu', 'link' => 'Un-Visited Link', 'vlink' => 'Visited Link', 'alink' => 'Active Link'); @@ -1154,6 +1156,7 @@ sub verify_and_change_colors { 'tabbg' => 'Header Background', 'sidebg'=> 'Header Border', 'font' => 'Font', + 'fontmenu' => 'Font Menu', 'link' => 'Un-Visited Link', 'vlink' => 'Visited Link', 'alink' => 'Active Link'); @@ -1205,7 +1208,9 @@ sub passwordchanger { $defdom = $r->dir_config('lonDefDomain'); my %data = &Apache::lonnet::tmpget($mailtoken); if (keys(%data) == 0) { - $r->print(&mt('Sorry, the URL you provided to complete the reset of your password was invalid. Either the token included in the URL has been deleted or the URL you provided was invalid. Please submit a new request for a password reset, and follow the link to the new URL included in the e-mail that will be sent to you, to allow you to enter a new password.')); + $r->print(&mt('Sorry, the URL you provided to complete the reset of your password was invalid. Either the token included in the URL has been deleted or the URL you provided was invalid. Please submit a [_1]new request[_2] for a password reset, and follow the link to the new URL included in the e-mail that will be sent to you, to allow you to enter a new password.' + ,'','') + ); return; } if (defined($data{time})) { @@ -1538,7 +1543,8 @@ ENDERROR } } else { # error error: run in circles, scream and shout - $message = &mt("The password for [_1] was not changed.",$user).' '.&mt('Please make sure your old password was entered correctly.'); + $message = &Apache::lonhtmlcommon::confirm_success( + &mt("The password for [_1] was not changed.",$user).' '.&mt('Please make sure your old password was entered correctly.'),1); unless ($caller eq 'reset_by_email') { &print_main_menu($r, $message); } @@ -2040,8 +2046,8 @@ sub handler { }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); + &toggle_debug(); + &print_main_menu($r); } return OK; @@ -2322,7 +2328,8 @@ sub handler2 { })); } - if ($env{'user.name'} =~ /^(albertel|fox|foxr|kortemey|korte|raeburn)$/) { + if (($env{'user.name'} =~ /^(albertel|fox|foxr|kortemey|korte|raeburn)$/) + && ($env{'user.domain'} =~/^(msu|gerd)$/)){ push (@Options,({ action => 'debugtoggle', printmenu => 'yes', subroutine => \&toggle_debug,