--- loncom/interface/lonpreferences.pm	2008/12/08 23:09:26	1.131
+++ loncom/interface/lonpreferences.pm	2009/05/05 16:01:50	1.158
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Preferences
 #
-# $Id: lonpreferences.pm,v 1.131 2008/12/08 23:09:26 raeburn Exp $
+# $Id: lonpreferences.pm,v 1.158 2009/05/05 16:01:50 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
@@ -126,7 +126,7 @@ $warning
 <label><input type="radio" name="wysiwyg" value="off" $onselect /> $switchoff</label><br />
 <label><input type="radio" name="wysiwyg" value="on" $offselect /> $switchon</label>
 ENDLSCREEN
-    $r->print('<br /><input type="submit" value="'.&mt('Change').'" />');
+    $r->print('<br /><input type="submit" value="'.&mt('Save').'" />');
 }
 
 
@@ -135,9 +135,9 @@ 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>');
+    my $message=&Apache::lonhtmlcommon::confirm_success(&mt('Set [_1] to [_2]','<i>'.&mt('WYSIWYG Editor').'</i>','<tt>'.&mt($newsetting).'</tt>'));
+    $message=&Apache::loncommon::confirmwrapper($message);
+    &print_main_menu($r,$message);
 }
 
 ################################################################
@@ -149,7 +149,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'};
@@ -172,7 +172,7 @@ sub languagechanger {
 <input type="hidden" name="action" value="verify_and_change_languages" />
 <br />$pref: $selectionbox
 ENDLSCREEN
-    $r->print('<br /><input type="submit" value="'.&mt('Change').'" />');
+    $r->print('<br /><input type="submit" value="'.&mt('Save').'" />');
 }
 
 
@@ -187,16 +187,15 @@ 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 [_1] to [_2]','<i>'.&mt('Preferred language').'</i>','<tt>"'.$newlanguage.'"</tt>.'));
     } else {
         &Apache::lonnet::del('environment',['languages']);
-        &Apache::lonnet::delenv('environment\.languages');
-        $message=&mt('Reset preferred language.');
+        &Apache::lonnet::delenv('environment.languages');
+        $message=&Apache::lonhtmlcommon::confirm_success(&mt('Reset [_1]','<i>'.&mt('Preferred language').'</i>'));
     }
-    print_main_menu($r, $message);
-#    $r->print(<<ENDVCSCREEN);
-#$message
-#ENDVCSCREEN
+    $message=&Apache::loncommon::confirmwrapper($message);
+    &Apache::loncommon::flush_langs_cache($user,$domain);
+    &print_main_menu($r, $message);
 }
 
 ################################################################
@@ -207,7 +206,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'};
@@ -226,7 +225,7 @@ sub texenginechanger {
     my %lt=&Apache::lonlocal::texthash(
       'headline' => 'Change Math Preferences',
       'preftxt'  => 'Preferred method to display Math',
-      'change'   => 'Change',
+      'change'   => 'Save',
       'exmpl'    => 'Examples',
       'jsmath'   => 'jsMath:',
       'tth'      => 'tth (TeX to HTML):',
@@ -238,8 +237,9 @@ sub texenginechanger {
 <form name="prefs" action="/adm/preferences" method="post">
 <input type="hidden" name="action" value="verify_and_change_texengine" />
 <p>
-$lt{'preftxt'}:<br />
-$selectionbox <input type="submit" value="$lt{'change'}" />
+$lt{'preftxt'}: $selectionbox 
+<br />
+<input type="submit" value="$lt{'change'}" />
 </p>
 </form>
 <br />
@@ -249,7 +249,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;'
@@ -279,7 +279,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>');
     }
 }
 
@@ -302,18 +302,14 @@ 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 [_1] to [_2]','<i>'.&mt('Preferred method to display Math').'</i>','<tt>"'.$newtexengine.'"</tt>'));
     } else {
         &Apache::lonnet::del('environment',['texengine']);
-        &Apache::lonnet::delenv('environment\.texengine');
-        $message=&mt('Reset preferred math display.');
+        &Apache::lonnet::delenv('environment.texengine');
+        $message=&Apache::lonhtmlcommon::confirm_success(&mt('Reset [_1]','<i>'.&mt('Preferred method to display Math').'</i>'));
     }
-
-
-#    $r->print(<<ENDVCSCREEN);
-#$message
-#ENDVCSCREEN
-    print_main_menu($r, $message);
+    $message=&Apache::loncommon::confirmwrapper($message);
+    &print_main_menu($r, $message);
 }
 
 ################################################################
@@ -330,7 +326,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'};
@@ -401,7 +397,7 @@ sub rolesprefchanger {
 </p>
 '.$roles_check_list.'
 <br />
-<input type="submit" value="'.&mt('Change').'" />
+<input type="submit" value="'.&mt('Save').'" />
 </form>');
 }
 
@@ -450,7 +446,7 @@ sub verify_and_change_rolespref {
         $message=&mt('Recent '.$role.'s Hotlist is Enabled');
     } else {
         &Apache::lonnet::del('environment',['recentroles']);
-        &Apache::lonnet::delenv('environment\.recentroles');
+        &Apache::lonnet::delenv('environment.recentroles');
         $message=&mt('Recent '.$role.'s Hotlist is Disabled');
     }
     if ($hotlist_n) {
@@ -480,7 +476,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]','<i>'.$role_text{$role_key}.'</i>'));
 	    &Apache::lonhtmlcommon::store_recent('roles',$role_key,' ',0);
         }
     }
@@ -488,17 +484,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]','<i>'.$role_text{$role_key}.'</i>'));
              &Apache::lonhtmlcommon::store_recent('roles',
                                           $role_key,' ',1);
         }
     }
-    $message .= "<hr /><br />\n";
-
-#    $r->print(<<ENDRPSCREEN);
-#$message
-#ENDRPSCREEN
-    print_main_menu($r, $message);
+    $message=&Apache::loncommon::confirmwrapper($message);
+    &print_main_menu($r, $message);
 }
 
 
@@ -514,27 +507,30 @@ sub screennamechanger {
         ('environment',['screenname','nickname']);
     my $screenname=$userenv{'screenname'};
     my $nickname=$userenv{'nickname'};
-    my %lt = &Apache::lonlocal::texthash(
-                                          text_screenname  => 'New screenname (shown if you post anonymously):',
-                                          text_nickname  => 'New nickname (shown if you post non-anonymously):',
-                                          text_submit => 'Change',
-                                        );
     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(<<ENDSCREEN);
-<form name="prefs" action="/adm/preferences" method="post">
-<input type="hidden" name="action" value="verify_and_change_screenname" />
-<br />$lt{'text_screenname'}
-<input type="text" size="20" value="$screenname" name="screenname" />
-<br />$lt{'text_nickname'}
-<input type="text" size="20" value="$nickname" name="nickname" />
-<br />
-<input type="submit" value="$lt{'text_submit'}" />
-</form>
-ENDSCREEN
+    $r->print('<p>'
+             .&mt('Change the name that is displayed in your posts.')
+             .'</p>'
+    );
+    $r->print('<form name="prefs" action="/adm/preferences" method="post">'
+             .'<input type="hidden" name="action" value="verify_and_change_screenname" />'
+             .&Apache::lonhtmlcommon::start_pick_box()
+             .&Apache::lonhtmlcommon::row_title(&mt('Screenname').' '.&mt('(shown if you post anonymously)'))
+             .'<input type="text" size="20" value="'.$screenname.'" name="screenname" />'
+             .&Apache::lonhtmlcommon::row_closure()
+             .&Apache::lonhtmlcommon::row_title(&mt('Nickname').' '.&mt('(shown if you post non-anonymously)'))
+             .'<input type="text" size="20" value="'.$nickname.'" name="nickname" />'
+             .&Apache::lonhtmlcommon::row_closure()
+             .&Apache::lonhtmlcommon::row_title()
+             .'<input type="submit" value="'.&mt('Save').'" />'
+             .&Apache::lonhtmlcommon::row_closure(1)
+             .&Apache::lonhtmlcommon::end_pick_box()
+             .'</form>'
+    );
 }
 
 sub verify_and_change_screenname {
@@ -548,11 +544,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 [_1] to [_2]','<i>'.&mt('Screenname').'</i>','<tt>"'.$newscreen.'."</tt>'));
     } else {
         &Apache::lonnet::del('environment',['screenname']);
-        &Apache::lonnet::delenv('environment\.screenname');
-        $message=&mt('Reset screenname.');
+        &Apache::lonnet::delenv('environment.screenname');
+        $message=&Apache::lonhtmlcommon::confirm_success(&mt('Reset [_1]','<i>'.&mt('Screenname').'</i>'));
     }
 # Nickname
     $message.='<br />';
@@ -561,17 +557,15 @@ 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 [_1] to [_2]','<i>'.&mt('Nickname').'</i>','<tt>"'.$newscreen.'"</tt>.'));
     } else {
         &Apache::lonnet::del('environment',['nickname']);
-        &Apache::lonnet::delenv('environment\.nickname');
-        $message.=&mt('Reset nickname.');
+        &Apache::lonnet::delenv('environment.nickname');
+        $message.=&Apache::lonhtmlcommon::confirm_success(&mt('Reset [_1]','<i>'.&mt('Nickname').'</i>'));
     }
     &Apache::lonnet::devalidate_cache_new('namescache',$user.':'.$domain);
-#    $r->print(<<ENDVCSCREEN);
-#$message
-#ENDVCSCREEN
-    print_main_menu($r, $message);
+    $message=&Apache::loncommon::confirmwrapper($message);
+    &print_main_menu($r, $message);
 }
 
 ################################################################
@@ -579,10 +573,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'};
@@ -603,7 +597,7 @@ sub iconchanger {
     my $useicons=&mt('Use icons and text');
     my $usebuttons=&mt('Use buttons and text');
     my $useicononly=&mt('Use icons only');
-    my $change=&mt('Change');
+    my $change=&mt('Save');
     $r->print(<<ENDSCREEN);
 <form name="prefs" action="/adm/preferences" method="post">
 <input type="hidden" name="action" value="verify_and_change_icons" />
@@ -619,12 +613,13 @@ sub verify_and_change_icons {
     my $r = shift;
     my $user       = $env{'user.name'};
     my $domain     = $env{'user.domain'};
-    my $newicons  = $env{'form.menumode'};
+    my $newicons   = $env{'form.menumode'};
 
     &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));
+    my $message=&Apache::lonhtmlcommon::confirm_success(&mt('Set [_1] to [_2]','<i>'.&mt('Menu Display').'</i>','<tt>'.$newicons.'</tt>'));
+    $message=&Apache::loncommon::confirmwrapper($message);
+    &print_main_menu($r, $message);
 }
 
 ################################################################
@@ -633,10 +628,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'};
@@ -645,14 +640,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
@@ -671,8 +667,9 @@ 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));
+    my $message=&Apache::lonhtmlcommon::confirm_success(&mt('Registering clickers: [_1]',$newclickers));
+    $message=&Apache::loncommon::confirmwrapper($message);
+    &print_main_menu($r, $message);
 }
 
 ################################################################
@@ -681,7 +678,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'));
@@ -696,7 +693,7 @@ sub domcoordchanger {
     }
     my $text=&mt('By default, the Domain Coordinator can enter your construction space.');
     my $construction=&mt('Block access to construction space');
-    my $change=&mt('Change');
+    my $change=&mt('Save');
     $r->print(<<ENDSCREEN);
 <form name="prefs" action="/adm/preferences" method="post">
 <input type="hidden" name="action" value="verify_and_change_domcoord" />
@@ -715,8 +712,15 @@ 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.'));
+    my $status='';
+    if ($domcoord{'domcoord.author'} eq 'blocked') {
+        $status=&mt('on');
+    } else {
+        $status=&mt('off');
+    }
+    my $message=&Apache::lonhtmlcommon::confirm_success(&mt('Set [_1] to [_2]','<i>'.&mt('Block access to construction space').'</i>','<tt>'.$status.'</tt>'));
+    $message=&Apache::loncommon::confirmwrapper($message);
+    &print_main_menu($r,$message);
 }
 
 #################################################################
@@ -775,16 +779,16 @@ sub msgforwardchanger {
                                           mnot  => 'E-mail Address(es) which should be notified about new LON-CAPA messages',
  # old: 'Message Notification Email Address(es)',
                                           mnot_exmpl => 'e.g. <tt>joe@doe.com</tt>',
-                                          chg   => 'Change',
+                                          chg   => 'Save',
                                           email => 'The e-mail address entered in row ',
                                           notv => 'is not a valid e-mail address',
                                           toen => "To enter multiple addresses, enter one address at a time, click 'Change' and then add the next one", 
-                                          prme => 'Back to preferences menu',
+                                          prme => 'Back',
                                         );
     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");
@@ -793,7 +797,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;
@@ -951,8 +955,8 @@ ENDMSG
     $r->print(qq|
 <br /><hr />
 <input type="hidden" name="numnotify" value="$num" />
-<input type="button" value="$lt{'chg'}" onclick="javascript:validate()" />
 <input type="button" value="$lt{'prme'}" onclick="location.href='/adm/preferences'" />
+<input type="button" value="$lt{'chg'}" onclick="javascript:validate()" />
 </form>
 |);
 
@@ -998,7 +1002,7 @@ sub verify_and_change_msgforward {
                     .'<br />';
     } else {
         &Apache::lonnet::del('environment',['msgforward']);
-        &Apache::lonnet::delenv('environment\.msgforward');
+        &Apache::lonnet::delenv('environment.msgforward');
         $message.= &mt("Set message forwarding to 'off'.").'<br />';
     }
     my $critnotification;
@@ -1038,7 +1042,7 @@ sub verify_and_change_msgforward {
         $message.=&mt('Set non-critical message notification address(es) to ').'<tt>"'.$notification.'"</tt>.<br />';
     } else {
         &Apache::lonnet::del('environment',['notification']);
-        &Apache::lonnet::delenv('environment\.notification');
+        &Apache::lonnet::delenv('environment.notification');
         $message.=&mt("Set non-critical message notification to 'off'.").'<br />';
     }
     if ($critnotification) {
@@ -1047,7 +1051,7 @@ sub verify_and_change_msgforward {
         $message.=&mt('Set critical message notification address(es) to ').'<tt>"'.$critnotification.'"</tt>.<br />';
     } else {
         &Apache::lonnet::del('environment',['critnotification']);
-        &Apache::lonnet::delenv('environment\.critnotification');
+        &Apache::lonnet::delenv('environment.critnotification');
         $message.=&mt("Set critical message notification to 'off'.").'<br />';
     }
     if ($critnotification || $notification) {
@@ -1057,7 +1061,7 @@ sub verify_and_change_msgforward {
             $message.=&mt('Set address(es) to receive excerpts with html retained ').'<tt>"'.$notify_with_html.'"</tt>.';
         } else {
             &Apache::lonnet::del('environment',['notifywithhtml']);
-            &Apache::lonnet::delenv('environment\.notifywithhtml');
+            &Apache::lonnet::delenv('environment.notifywithhtml');
             if ($totaladdresses == 1) {
                 $message.=&mt("Set notification address to receive excerpts with html stripped.");
             } else {
@@ -1066,7 +1070,7 @@ sub verify_and_change_msgforward {
         }
     } else {
         &Apache::lonnet::del('environment',['notifywithhtml']);
-        &Apache::lonnet::delenv('environment\.notifywithhtml');
+        &Apache::lonnet::delenv('environment.notifywithhtml');
     }
     if ($message) {
         $message .= '<br /><hr />';
@@ -1084,18 +1088,21 @@ 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();
     my $domain=&Apache::loncommon::determinedomain();
-    my %colortypes=('pgbg'  => 'Page Background',
-                    'tabbg' => 'Header Background',
-                    'sidebg'=> 'Header Border',
-                    'font'  => 'Font',
-                    'link'  => 'Un-Visited Link',
-                    'vlink' => 'Visited Link',
-                    'alink' => 'Active Link');
+    my %colortypes=&Apache::lonlocal::texthash(
+        'pgbg'     => 'Page Background Color',
+        'tabbg'    => 'Header Background Color',
+        'sidebg'   => 'Header Border Color',
+        'font'     => 'Font Color',
+        'fontmenu' => 'Font Menu Color',
+        'link'     => 'Un-Visited Link Color',
+        'vlink'    => 'Visited Link Color',
+        'alink'    => 'Active Link Color',
+    );
     my $start_data_table = &Apache::loncommon::start_data_table();
     my $chtable='';
     foreach my $item (sort(keys(%colortypes))) {
@@ -1106,13 +1113,16 @@ sub colorschanger {
         '" size="10" value="'.$curcol.
 '" /></td><td><a href="javascript:pjump('."'color_custom','".$colortypes{$item}.
 "','".$curcol."','"
-	    .$item."','parmform.pres','psub'".');">Select</a></td>'.
+	    .$item."','parmform.pres','psub'".');">'.&mt('Select').'</a></td>'.
 	    &Apache::loncommon::end_data_table_row()."\n";
     }
     my $end_data_table = &Apache::loncommon::end_data_table();
     my $pjump_def = &Apache::lonhtmlcommon::pjump_javascript_definition();
+    my $savebutton = &mt('Save');
+    my $resetbutton = &mt('Reset All');
+    my $resetbuttondesc = &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",
@@ -1149,8 +1159,10 @@ $start_data_table
 $chtable
 $end_data_table
 </table>
-<input type="submit" value="Change Custom Colors" />
-<input type="submit" name="resetall" value="Reset All Colors to Default" />
+<p>
+<input type="submit" value="$savebutton" />
+<input type="submit" name="resetall" value="$resetbutton" title="$resetbuttondesc" />
+</p>
 </form>
 ENDCOL
 }
@@ -1160,13 +1172,16 @@ sub verify_and_change_colors {
 # figure out colors
     my $function=&Apache::loncommon::get_users_function();
     my $domain=&Apache::loncommon::determinedomain();
-    my %colortypes=('pgbg'  => 'Page Background',
-                    'tabbg' => 'Header Background',
-                    'sidebg'=> 'Header Border',
-                    'font'  => 'Font',
-                    'link'  => 'Un-Visited Link',
-                    'vlink' => 'Visited Link',
-                    'alink' => 'Active Link');
+    my %colortypes=&Apache::lonlocal::texthash(
+        'pgbg'     => 'Page Background Color',
+        'tabbg'    => 'Header Background Color',
+        'sidebg'   => 'Header Border Color',
+        'font'     => 'Font Color',
+	'fontmenu' => 'Font Menu Color',
+        'link'     => 'Un-Visited Link Color',
+        'vlink'    => 'Visited Link Color',
+        'alink'    => 'Active Link Color',
+    );
 
     my $message='';
     foreach my $item (keys %colortypes) {
@@ -1175,24 +1190,22 @@ 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 [_1] to [_2]','<i>'.$colortypes{$item}.'</i>','<tt>"'.$color.'"</tt>'))
+                    .'<br />';
 	} else {
 	    &Apache::lonnet::del('environment',[$entry]);
-	    &Apache::lonnet::delenv('environment\.'.$entry);
-	    $message.=&mt('Reset '.$colortypes{$item}.'.').'<br />';
+	    &Apache::lonnet::delenv('environment.'.$entry);
+            $message.=&Apache::lonhtmlcommon::confirm_success(&mt('Reset [_1]','<i>'.$colortypes{$item}.'</i>'))
+                     .'<br />';
 	}
     }
+    $message=&Apache::loncommon::confirmwrapper($message);
+
     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);
 }
 
 ######################################################
@@ -1204,11 +1217,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'};
@@ -1219,7 +1234,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})) {
@@ -1288,7 +1305,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;
@@ -1334,7 +1351,7 @@ sub client_form {
                 'currentpass' => 'Current Password',
                 'newpass' => 'New Password',
                 'confirmpass' => 'Confirm Password',
-                'changepass' => 'Change Password');
+                'changepass' => 'Save');
 
     my $output = qq|
 <form name="client" >
@@ -1368,7 +1385,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'}" />
@@ -1544,16 +1561,20 @@ 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 user [_1] was successfully changed.','<i>'.$user.'<i>'));
+        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 user [_1] was not changed.",'<i>'.$user.'</i>').' '.&mt('Please make sure your old password was entered correctly.'),1);
+        unless ($caller eq 'reset_by_email') {
+            $message=&Apache::loncommon::confirmwrapper($message);
+            &print_main_menu($r, $message);
+        }
         return 1;
     }
     return;
@@ -1567,7 +1588,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'};
@@ -1597,9 +1618,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',
@@ -1632,9 +1653,10 @@ sub discussionchanger {
 <input type="hidden" name="action" value="verify_and_change_discussion" />
 <br />
 $lt{'sdpf'}<br /> $lt{'prca'}  <ol><li>$lt{'whpo'}</li><li>$lt{'unwh'}</li></ol> 
-<br />
-<br />
 END
+
+    $r->print('<p class="LC_info">'.$lt{'thde'}.'</p>');
+
     $r->print(&Apache::loncommon::start_data_table());
     $r->print(<<"END");
        <tr>
@@ -1659,15 +1681,11 @@ 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 Changes" />
-<br />
-<br />
-Note: $lt{'thde'}
-</form>
-END
+
+    $r->print('<br />'
+             .'<input type="submit" name="sub" value="'.&mt('Save').'" />'
+             .'</form>'
+    );
 }
                                                                                                                 
 sub verify_and_change_discussion {
@@ -1684,25 +1702,23 @@ sub verify_and_change_discussion {
         } else {
             $message .= &mt('In discussions: all posts will be displayed.').'<br />';
             &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.=&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');
+            &Apache::lonnet::delenv('environment.discmarkread');
         }
     }
-#    $r->print(<<ENDVCSCREEN);
-#$message
-#ENDVCSCREEN
-    print_main_menu($r, $message);
+    $message=&Apache::loncommon::confirmwrapper($message);
+    &print_main_menu($r, $message);
 }
 
 ################################################################
@@ -1710,7 +1726,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'));
@@ -1728,14 +1744,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.','<b>first resource</b>');
-    my $whatsnew_on=&mt('Display the "[_1]" page - a summary of items in the course which require attention.',"<b>What's New</b>");
+    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>');
 
-    $r->print('<br /><b>'.&mt('Set the default page to be displayed when you select a course role').'</b>&nbsp;'.&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]" page in the course',"<i>What's New</i>").'<br /><br />');
+    $r->print('<br /><b>'
+             .&mt('Set the default page to be displayed when you select a course role')
+             .'</b>&nbsp;'
+             .&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>')
+             .'<br /><br />'
+    );
     $r->print(<<ENDLSCREEN);
 <form name="prefs" action="/adm/preferences" method="post">
 <input type="hidden" name="action" value="verify_and_change_coursepage" />
@@ -1743,7 +1766,7 @@ sub coursedisplaychanger {
 <label><input type="radio" name="newdisp" value="firstres" $firstselect /> $whatsnew_off</label><br />
 <label><input type="radio" name="newdisp" value="whatsnew" $whatsnewselect /> $whatsnew_on</label><input type="hidden" name="refpage" value="$env{'form.refpage'}" />
 ENDLSCREEN
-    $r->print('<br /><br /><input type="submit" value="'.&mt('Change').'" />
+    $r->print('<br /><br /><input type="submit" value="'.&mt('Save').'" />
 </form>');
 }
 
@@ -1756,7 +1779,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'}.', ';
@@ -1767,7 +1790,7 @@ sub verify_and_change_coursepage {
     } else {
         $message .= $lt{'apwb'}.'<br />';
         &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'})) {
@@ -1782,11 +1805,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 {
@@ -1806,7 +1825,7 @@ if (&Apache::lonnet::usertools_access($u
 my @menu=
     ({	categorytitle=>'Personal Data',
 	items =>[
-	    {	linktext => 'About Me',
+	    {	linktext => 'Personal Information Page',
 		url => $aboutmeurl,
 		permission => $permissions{'aboutme'},
 		#help => 'Prefs_About_Me',
@@ -1875,7 +1894,7 @@ my @menu=
     },
     {	categorytitle=>'Message Management',
 	items =>[
-	    {	linktext => 'Messages & Notifications',
+	    {	linktext => 'Messages &amp; Notifications',
 		url => '/adm/preferences?action=changemsgforward',
 		permission => 'F',
 		#help => 'Prefs_Messages',
@@ -1887,13 +1906,13 @@ my @menu=
 		permission => 'F',
 		#help => 'Change_Discussion_Display',
 		icon => 'mail-message-new.png',
-		linktitle => 'Set display preferences for discussion posts for both bulletin boards and individual resources in all your courses.'
+		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")',
+	    {	linktext => 'Register Response Devices (&quot;Clickers&quot;)',
 		url => '/adm/preferences?action=changeclicker',
 		permission => 'F',
 		#help => '',
@@ -1969,7 +1988,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));
@@ -1997,9 +2016,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'){
@@ -2057,8 +2078,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;
@@ -2143,7 +2164,7 @@ sub handler2 {
         '/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',
@@ -2339,7 +2360,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,
@@ -2420,7 +2442,7 @@ sub handler2 {
 
 sub toggle_debug {
     if ($env{'user.debug'}) {
-        &Apache::lonnet::delenv('user\.debug');
+        &Apache::lonnet::delenv('user.debug');
     } else {
         &Apache::lonnet::appenv({'user.debug' => 1});
     }