--- loncom/interface/lonpreferences.pm 2009/02/18 19:34:08 1.140 +++ loncom/interface/lonpreferences.pm 2009/04/29 16:57:29 1.155 @@ -1,7 +1,7 @@ # The LearningOnline Network # Preferences # -# $Id: lonpreferences.pm,v 1.140 2009/02/18 19:34:08 schafran Exp $ +# $Id: lonpreferences.pm,v 1.155 2009/04/29 16:57:29 bisitz Exp $ # # Copyright Michigan State University Board of Trustees # @@ -101,7 +101,7 @@ sub wysiwygchanger { Apache::lonhtmlcommon::add_breadcrumb( { href => '/adm/preferences?action=changewysiwyg', text => 'Change WYSIWYG Preferences'}); - $r->print(Apache::loncommon::start_page('Change WYSIWYG Preferences')); + $r->print(Apache::loncommon::start_page('Content Display Settings')); $r->print(Apache::lonhtmlcommon::breadcrumbs('Change WYSIWYG Preferences')); my %userenv = &Apache::lonnet::get @@ -135,9 +135,8 @@ sub verify_and_change_wysiwyg { my $newsetting=$env{'form.wysiwyg'}; &Apache::lonnet::put('environment',{'wysiwygeditor' => $newsetting}); &Apache::lonnet::appenv({'environment.wysiwygeditor' => $newsetting}); -# $r->print('<p>'.&mt('Setting WYSIWYG editor to:').' '.&mt($newsetting).'</p>'); - print_main_menu($r,'<p>'.&mt('Setting WYSIWYG editor to:').' ' - .&mt($newsetting).'</p>'); + &print_main_menu($r,'<p>'.&Apache::lonhtmlcommon::confirm_success(&mt('Setting WYSIWYG editor to:').' ' + .&mt($newsetting)).'</p>'); } ################################################################ @@ -149,7 +148,7 @@ sub languagechanger { Apache::lonhtmlcommon::add_breadcrumb( { href => '/adm/preferences?action=changelanguages', text => 'Change Language'}); - $r->print(Apache::loncommon::start_page('Change Language')); + $r->print(Apache::loncommon::start_page('Content Display Settings')); $r->print(Apache::lonhtmlcommon::breadcrumbs('Change Language')); my $user = $env{'user.name'}; my $domain = $env{'user.domain'}; @@ -187,17 +186,14 @@ sub verify_and_change_languages { if ($newlanguage) { &Apache::lonnet::put('environment',{'languages' => $newlanguage}); &Apache::lonnet::appenv({'environment.languages' => $newlanguage}); - $message=&mt('Set new preferred languages to ').'<tt>"'.$newlanguage.'"</tt>.'; + $message=&Apache::lonhtmlcommon::confirm_success(&mt('Set new preferred languages to ').'<tt>"'.$newlanguage.'"</tt>.'); } else { &Apache::lonnet::del('environment',['languages']); &Apache::lonnet::delenv('environment.languages'); - $message=&mt('Reset preferred language.'); + $message=&Apache::lonhtmlcommon::confirm_success(&mt('Reset preferred language.')); } &Apache::loncommon::flush_langs_cache($user,$domain); - print_main_menu($r, $message); -# $r->print(<<ENDVCSCREEN); -#$message -#ENDVCSCREEN + &print_main_menu($r, $message); } ################################################################ @@ -208,7 +204,7 @@ sub texenginechanger { Apache::lonhtmlcommon::add_breadcrumb( { href => '/adm/preferences?action=changetexenginepref', text => 'Change How Math Equations Are Displayed'}); - $r->print(Apache::loncommon::start_page('Change How Math Equations Are Displayed')); + $r->print(Apache::loncommon::start_page('Content Display Settings')); $r->print(Apache::lonhtmlcommon::breadcrumbs('Change How Math Equations Are Displayed')); my $user = $env{'user.name'}; my $domain = $env{'user.domain'}; @@ -251,7 +247,7 @@ $lt{'exmpl'} <h3>$lt{'jsmath'}</h3> <p> $jsMath_start -<script type="text/javascript"> +<script type="text/javascript" language="JavaScript"> if (jsMath.nofonts == 1) { document.writeln ('<div style="padding: 10; border-style: solid; border-width:3;' @@ -281,7 +277,7 @@ if (jsMath.nofonts == 1) { </p> ENDLSCREEN if ($env{'environment.texengine'} ne 'jsMath') { - $r->print('<script type="text/javascript">jsMath.Process()</script>'); + $r->print('<script type="text/javascript" language="JavaScript">jsMath.Process()</script>'); } } @@ -304,18 +300,13 @@ sub verify_and_change_texengine { if ($newtexengine) { &Apache::lonnet::put('environment',{'texengine' => $newtexengine}); &Apache::lonnet::appenv({'environment.texengine' => $newtexengine}); - $message=&mt('Set new preferred math display to ').'<tt>"'.$newtexengine.'"</tt>.'; + $message=&Apache::lonhtmlcommon::confirm_success(&mt('Set new preferred math display to ').'<tt>"'.$newtexengine.'"</tt>.'); } else { &Apache::lonnet::del('environment',['texengine']); &Apache::lonnet::delenv('environment.texengine'); - $message=&mt('Reset preferred math display.'); + $message=&Apache::lonhtmlcommon::confirm_success(&mt('Reset preferred math display.')); } - - -# $r->print(<<ENDVCSCREEN); -#$message -#ENDVCSCREEN - print_main_menu($r, $message); + &print_main_menu($r, $message); } ################################################################ @@ -332,7 +323,7 @@ sub rolesprefchanger { Apache::lonhtmlcommon::add_breadcrumb( { href => '/adm/preferences?action=changerolespref', text => 'Change '.$role.' Page Pref'}); - $r->print(Apache::loncommon::start_page('Change '.$role.' Page Pref')); + $r->print(Apache::loncommon::start_page('Content Display Settings')); $r->print(Apache::lonhtmlcommon::breadcrumbs('Change '.$role.' Page Pref')); my $hotlist_flag=$userenv{'recentroles'}; my $hotlist_n=$userenv{'recentrolesn'}; @@ -482,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 .= "<br />".&mt('Unfreezing '.$role.': [_1]',$role_text{$role_key})."\n"; + $message .= "<br />".&Apache::lonhtmlcommon::confirm_success(&mt('Unfreezing '.$role.': [_1]',$role_text{$role_key}))."\n"; &Apache::lonhtmlcommon::store_recent('roles',$role_key,' ',0); } } @@ -490,17 +481,14 @@ sub verify_and_change_rolespref { # Freeze selected roles foreach my $role_key (@freeze_list) { if (!$frozen_roles{$role_key}) { - $message .= "<br />".&mt('Freezing '.$role.': [_1]',$role_text{$role_key})."\n"; + $message .= "<br />". + &Apache::lonhtmlcommon::confirm_success(&mt('Freezing '.$role.': [_1]',$role_text{$role_key}))."\n"; &Apache::lonhtmlcommon::store_recent('roles', $role_key,' ',1); } } $message .= "<hr /><br />\n"; - -# $r->print(<<ENDRPSCREEN); -#$message -#ENDRPSCREEN - print_main_menu($r, $message); + &print_main_menu($r, $message); } @@ -519,7 +507,7 @@ sub screennamechanger { Apache::lonhtmlcommon::add_breadcrumb( { href => '/adm/preferences?action=changescreenname', text => 'Change Screen Name'}); - $r->print(Apache::loncommon::start_page('Change Screen Name')); + $r->print(Apache::loncommon::start_page('Personal Data')); $r->print(Apache::lonhtmlcommon::breadcrumbs('Change Screen Name')); $r->print('<p>' .&mt('Change the name that is displayed in your posts.') @@ -553,11 +541,11 @@ sub verify_and_change_screenname { if ($newscreen) { &Apache::lonnet::put('environment',{'screenname' => $newscreen}); &Apache::lonnet::appenv({'environment.screenname' => $newscreen}); - $message=&mt('Set new screenname to ').'<tt>"'.$newscreen.'."</tt>.'; + $message=&Apache::lonhtmlcommon::confirm_success(&mt('Set new screenname to ').'<tt>"'.$newscreen.'."</tt>.'); } else { &Apache::lonnet::del('environment',['screenname']); &Apache::lonnet::delenv('environment.screenname'); - $message=&mt('Reset screenname.'); + $message=&Apache::lonhtmlcommon::confirm_success(&mt('Reset screenname.')); } # Nickname $message.='<br />'; @@ -566,17 +554,14 @@ sub verify_and_change_screenname { if ($newscreen) { &Apache::lonnet::put('environment',{'nickname' => $newscreen}); &Apache::lonnet::appenv({'environment.nickname' => $newscreen}); - $message.=&mt('Set new nickname to ').'<tt>"'.$newscreen.'"</tt>.'; + $message.=&Apache::lonhtmlcommon::confirm_success(&mt('Set new nickname to ').'<tt>"'.$newscreen.'"</tt>.'); } else { &Apache::lonnet::del('environment',['nickname']); &Apache::lonnet::delenv('environment.nickname'); - $message.=&mt('Reset nickname.'); + $message.=&Apache::lonhtmlcommon::confirm_success(&mt('Reset nickname.')); } &Apache::lonnet::devalidate_cache_new('namescache',$user.':'.$domain); -# $r->print(<<ENDVCSCREEN); -#$message -#ENDVCSCREEN - print_main_menu($r, $message); + &print_main_menu($r, $message); } ################################################################ @@ -584,10 +569,10 @@ 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('Change Main Menu')); + $r->print(Apache::loncommon::start_page('Page Display Settings')); $r->print(Apache::lonhtmlcommon::breadcrumbs('Change Main Menu')); my $user = $env{'user.name'}; @@ -628,8 +613,7 @@ sub verify_and_change_icons { &Apache::lonnet::put('environment',{'icons' => $newicons}); &Apache::lonnet::appenv({'environment.icons' => $newicons}); -# $r->print(&mt('Set menu mode to [_1].',$newicons)); - print_main_menu($r, &mt('Set menu mode to [_1].',$newicons)); + &print_main_menu($r, &Apache::lonhtmlcommon::confirm_success(&mt('Set menu mode to [_1].',$newicons))); } ################################################################ @@ -638,10 +622,10 @@ sub verify_and_change_icons { sub clickerchanger { my $r = shift; - Apache::lonhtmlcommon::add_breadcrumb( + &Apache::lonhtmlcommon::add_breadcrumb( { href => '/adm/preferences?action=changeclicker', text => 'Register Clicker'}); - $r->print(Apache::loncommon::start_page('Register Clicker')); + $r->print(Apache::loncommon::start_page('Other')); $r->print(Apache::lonhtmlcommon::breadcrumbs('Register Clicker')); my $user = $env{'user.name'}; my $domain = $env{'user.domain'}; @@ -650,14 +634,15 @@ sub clickerchanger { my $clickers=$userenv{'clickers'}; $clickers=~s/\,/\n/gs; my $text=&mt('Enter response device ("clicker") numbers'); - my $change=&mt('Register'); + my $change=&mt('Save'); my $helplink=&Apache::loncommon::help_open_topic('Clicker_Registration',&mt('Locating your clicker ID')); $r->print(<<ENDSCREEN); <form name="prefs" action="/adm/preferences" method="post"> <input type="hidden" name="action" value="verify_and_change_clicker" /> -<label>$text $helplink<br /> +<label>$helplink<br /><br />$text<br /> <textarea name="clickers" rows="5" cols="20">$clickers</textarea> </label> +<br /> <input type="submit" value="$change" /> </form> ENDSCREEN @@ -676,8 +661,7 @@ sub verify_and_change_clicker { $newclickers=~s/\,$//; &Apache::lonnet::put('environment',{'clickers' => $newclickers}); &Apache::lonnet::appenv({'environment.clickers' => $newclickers}); -# $r->print(&mt('Registering clickers: [_1]',$newclickers)); - print_main_menu($r, &mt('Registering clickers: [_1]',$newclickers)); + &print_main_menu($r, &Apache::lonhtmlcommon::confirm_success(&mt('Registering clickers: [_1]',$newclickers))); } ################################################################ @@ -686,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')); @@ -720,8 +704,7 @@ sub verify_and_change_domcoord { if ($env{'form.construction'}) { $domcoord{'domcoord.author'}='blocked'; } &Apache::lonnet::put('environment',\%domcoord); &Apache::lonnet::appenv({'environment.domcoord.author' => $domcoord{'domcoord.author'}}); -# $r->print(&mt('Registering Domain Coordinator access restrictions.')); - print_main_menu($r, &mt('Registering Domain Coordinator access restrictions.')); + &print_main_menu($r,&Apache::lonhtmlcommon::confirm_success(&mt('Registering Domain Coordinator access restrictions.'))); } ################################################################# @@ -789,7 +772,7 @@ sub msgforwardchanger { Apache::lonhtmlcommon::add_breadcrumb( { href => '/adm/preferences?action=changemsgforward', text => 'Change Message Forwarding/Notification'}); - $r->print(Apache::loncommon::start_page('Change Message Forwarding/Notification')); + $r->print(Apache::loncommon::start_page('Message Management')); $r->print(Apache::lonhtmlcommon::breadcrumbs('Change Message Forwarding/Notification')); my $forwardingHelp = &Apache::loncommon::help_open_topic("Prefs_Forwarding"); my $notificationHelp = &Apache::loncommon::help_open_topic("Prefs_Notification"); @@ -798,7 +781,7 @@ sub msgforwardchanger { my %allnot = &get_notifications(\%userenv); my $validatescript = &Apache::lonhtmlcommon::javascript_valid_email(); my $jscript = qq| -<script type="text/javascript"> +<script type="text/javascript" language="JavaScript"> function validate() { for (var i=0; i<document.prefs.numnotify.value; i++) { var checkaddress = 0; @@ -1089,7 +1072,7 @@ sub colorschanger { Apache::lonhtmlcommon::add_breadcrumb( { href => '/adm/preferences?action=changecolors', text => 'Change Colors'}); - $r->print(Apache::loncommon::start_page('Change Colors')); + $r->print(Apache::loncommon::start_page('Page Display Settings')); $r->print(Apache::lonhtmlcommon::breadcrumbs('Change Colors')); # figure out colors my $function=&Apache::loncommon::get_users_function(); @@ -1120,7 +1103,7 @@ sub colorschanger { my $rstall = &mt('Reset All'); my $resetdefault = &mt('Reset All Colors to Default'); $r->print(<<ENDCOL); -<script type="text/javascript"> +<script type="text/javascript" language="JavaScript"> function pclose() { parmwin=window.open("/adm/rat/empty.html","LONCAPAparms", @@ -1183,24 +1166,18 @@ sub verify_and_change_colors { if (($color=~/^\#[0-9A-Fa-f]{6}$/) && (!$env{'form.resetall'})) { &Apache::lonnet::put('environment',{$entry => $color}); &Apache::lonnet::appenv({'environment.'.$entry => $color}); - $message.=&mt('Set '.$colortypes{$item}.' to ').'<tt>"'.$color.'"</tt>.<br />'; + $message.=&Apache::lonhtmlcommon::confirm_success(&mt('Set '.$colortypes{$item}.' to ').'<tt>"'.$color.'"</tt>').'<br />'; } else { &Apache::lonnet::del('environment',[$entry]); &Apache::lonnet::delenv('environment.'.$entry); - $message.=&mt('Reset '.$colortypes{$item}.'.').'<br />'; + $message.=&Apache::lonhtmlcommon::confirm_success(&mt('Reset '.$colortypes{$item}.'.')).'<br />'; } } my $now = time; &Apache::lonnet::put('environment',{'color.timestamp' => $now}); &Apache::lonnet::appenv({'environment.color.timestamp' => $now}); - print_main_menu($r, $message); -# $r->print(<<ENDVCCOL); -#$message -#<form name="client" action="/adm/preferences" method="post"> -#<input type="hidden" name="action" value="changecolors" /> -#</form> -#ENDVCCOL + &print_main_menu($r, $message); } ###################################################### @@ -1212,11 +1189,13 @@ sub passwordchanger { # Passwords are encrypted using londes.js (DES encryption) $errormessage = ($errormessage || ''); my ($user,$domain,$currentpass,$defdom); - Apache::lonhtmlcommon::add_breadcrumb( + &Apache::lonhtmlcommon::add_breadcrumb( { href => '/adm/preferences?action=changepass', text => 'Change Password'}); - $r->print(Apache::loncommon::start_page('Change Password')); - $r->print(Apache::lonhtmlcommon::breadcrumbs('Change Password')); + unless ($caller eq 'reset_by_email') { + $r->print(Apache::loncommon::start_page('Personal Data')); + $r->print(Apache::lonhtmlcommon::breadcrumbs('Change Password')); + } if ((!defined($caller)) || ($caller eq 'preferences')) { $user = $env{'user.name'}; $domain = $env{'user.domain'}; @@ -1227,7 +1206,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 <a href="/adm/resetpw">new request</a> 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.' + ,'<a href="/adm/resetpw">','</a>') + ); return; } if (defined($data{time})) { @@ -1296,7 +1277,7 @@ ENDFORM sub jscript_send { my ($caller) = @_; my $output = qq| -<script language="JavaScript"> +<script type="text/javascript" language="JavaScript"> function send() { uextkey=this.document.client.elements.ukey_cpass.value; @@ -1376,7 +1357,7 @@ sub client_form { <tr><td class="LC_preferences_labeltext"><label for="newpass_2">$lt{'confirmpass'}</label></td> <td><input type="password" name="newpass_2" size="10" /> </td></tr> <tr><td colspan="2" align="center"> - <input type="button" value="$lt{'changepass'}" onClick="send();"> + <input type="button" value="$lt{'changepass'}" onClick="send();" /> </table> <input type="hidden" name="ukey_cpass" value="$hexkey->{'ukey_cpass'}" /> <input type="hidden" name="lkey_cpass" value="$hexkey->{'lkey_cpass'}" /> @@ -1552,16 +1533,19 @@ ENDERROR # Inform the user the password has (not?) been changed my $message; if ($result =~ /^ok$/) { - $message = &mt('The password for [_1] was successfully changed',$user); - print_main_menu($r, $message); -# $r->print("<h3>".&mt('The password for [_1] was successfully changed',$user)."</h3>"); + $message = &Apache::lonhtmlcommon::confirm_success(&mt('The password for [_1] was successfully changed.',$user)); + if ($caller eq 'reset_by_email') { + $r->print($message.'<br />'); + } else { + &print_main_menu($r, $message); + } } 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.'); - print_main_menu($r, $message); -# $r->print("<h3><span class='LC_error'>".&mt("The password for [_1] was not changed",$user)."</span></h3>". -# &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); + } return 1; } return; @@ -1575,7 +1559,7 @@ sub discussionchanger { 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::loncommon::start_page('Message Management')); $r->print(Apache::lonhtmlcommon::breadcrumbs('Change Discussion Preferences')); my $user = $env{'user.name'}; my $domain = $env{'user.domain'}; @@ -1667,15 +1651,8 @@ END END $r->print(&Apache::loncommon::end_data_table_row(). &Apache::loncommon::end_data_table()); - $r->print(<<"END"); -<br /> -<br /> -<input type="submit" name="sub" value="Save" /> -<br /> -<br /> -Note: $lt{'thde'} -</form> -END + + $r->print('<br /><br /><input type="submit" name="sub" value="'.&mt('Save').'" /><br /><br />'.&mt('Note').': '.$lt{'thde'}.'</form>'); } sub verify_and_change_discussion { @@ -1698,19 +1675,16 @@ sub verify_and_change_discussion { if (defined($env{'form.discmark'}) ) { my $newmark = $env{'form.newmark'}; if ($newmark eq 'ondisp') { - $message.=&mt('In discussions: new posts will be cease to be identified as "NEW" after display.').'<br />'; + $message.=&Apache::lonhtmlcommon::confirm_success(&mt('In discussions: new posts will be cease to be identified as "NEW" after display.')).'<br />'; &Apache::lonnet::put('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.').'<br />'; + $message.=&Apache::lonhtmlcommon::confirm_success(&mt('In discussions: posts will be identified as "NEW" until marked as read by the reader.')).'<br />'; &Apache::lonnet::del('environment',['discmarkread']); &Apache::lonnet::delenv('environment.discmarkread'); } } -# $r->print(<<ENDVCSCREEN); -#$message -#ENDVCSCREEN - print_main_menu($r, $message); + &print_main_menu($r, $message); } ################################################################ @@ -1718,7 +1692,7 @@ sub verify_and_change_discussion { ################################################################ sub coursedisplaychanger { my $r = shift; - Apache::lonhtmlcommon::add_breadcrumb( + &Apache::lonhtmlcommon::add_breadcrumb( { href => '/adm/preferences?action=changecourseinit', text => 'Change Course Init. Pref.'}); $r->print(Apache::loncommon::start_page('Change Course Initialization Preference')); @@ -1738,17 +1712,17 @@ sub coursedisplaychanger { } 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]first resource[_2] in the course.','<b>','</b>'); - my $whatsnew_on=&mt("Display the [_1]What's New page[_2] - a summary of items in the course which require attention.",'<b>','</b>'); + my $whatsnew_on=&mt("Display the [_1]What's New Page[_2] - a summary of items in the course which require attention.",'<b>','</b>'); $r->print('<br /><b>' .&mt('Set the default page to be displayed when you select a course role') .'</b> ' .&mt('(Currently: [_1])',$pagenames{$currvalue}) .'<br />' - .&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.",'<i>','</i>') + .&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.",'<i>','</i>') .'<br /><br />' ); $r->print(<<ENDLSCREEN); @@ -1771,7 +1745,7 @@ sub verify_and_change_coursepage { 'ywbt' => 'you will be taken to the start of the course.', 'apwb' => 'a page will be displayed that lists items in the course that may require action from you.', 'gtts' => 'Go to the start of the course', - 'dasp' => "Display the What's New page listing course action items", + 'dasp' => "Display the What's New Page", ); my $newdisp = $env{'form.newdisp'}; $message = '<b>'.$lt{'defs'}.'</b>: '.$lt{'when'}.', '; @@ -1797,11 +1771,7 @@ sub verify_and_change_coursepage { $refpage.'">'.$lt{'dasp'}.'</a></font>'; } } -# $r->print(<<ENDVCSCREEN); -#$message -#<br /><br /> -#ENDVCSCREEN - print_main_menu($r, $message); + &print_main_menu($r, &Apache::lonhtmlcommon::confirm_success($message)); } sub print_main_menu { @@ -1821,7 +1791,7 @@ if (&Apache::lonnet::usertools_access($u my @menu= ({ categorytitle=>'Personal Data', items =>[ - { linktext => 'Personal Homepage', + { linktext => 'Personal Information Page', url => $aboutmeurl, permission => $permissions{'aboutme'}, #help => 'Prefs_About_Me', @@ -1890,7 +1860,7 @@ my @menu= }, { categorytitle=>'Message Management', items =>[ - { linktext => 'Messages & Notifications', + { linktext => 'Messages & Notifications', url => '/adm/preferences?action=changemsgforward', permission => 'F', #help => 'Prefs_Messages', @@ -1908,7 +1878,7 @@ my @menu= }, { categorytitle=>'Other', items =>[ - { linktext => 'Register Response Devices ("Clickers")', + { linktext => 'Register Response Devices ("Clickers")', url => '/adm/preferences?action=changeclicker', permission => 'F', #help => '', @@ -1984,7 +1954,7 @@ push(@{ $menu[4]->{items} }, { }); } - $r->print(&Apache::loncommon::start_page('Change Preferences')); + $r->print(&Apache::loncommon::start_page('My Space')); $r->print(Apache::lonhtmlcommon::breadcrumbs('Change Preferences')); $r->print($message); $r->print(Apache::lonhtmlcommon::generate_menu(@menu)); @@ -2012,9 +1982,11 @@ sub handler { Apache::lonhtmlcommon::clear_breadcrumbs(); Apache::lonhtmlcommon::add_breadcrumb ({href => '/adm/preferences', - text => 'Set User Preferences'}); + text => 'Set User Preferences', + help => + 'Prefs_About_Me,Prefs_Language,Prefs_Screen_Name_Nickname,Change_Colors,Change_Password,Prefs_Messages,Change_Discussion_Display'}); if(!exists $env{'form.action'}) { - &print_main_menu($r); + &print_main_menu($r); }elsif($env{'form.action'} eq 'changepass'){ &passwordchanger($r); }elsif($env{'form.action'} eq 'verify_and_change_pass'){ @@ -2072,8 +2044,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; @@ -2158,7 +2130,7 @@ sub handler2 { '/adm/'.$env{'user.domain'}.'/'.$env{'user.name'}.'/aboutme'; push (@Options,{ action => 'none', linktext => - q{Edit the Personal Homepage}, + q{Edit the Personal Information Page}, help => 'Prefs_About_Me', href => $aboutmeaction}); push (@Options,({ action => 'changecolors', @@ -2354,7 +2326,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,