--- loncom/interface/lonpreferences.pm	2009/02/17 10:08:35	1.137
+++ loncom/interface/lonpreferences.pm	2009/02/18 07:06:15	1.139
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Preferences
 #
-# $Id: lonpreferences.pm,v 1.137 2009/02/17 10:08:35 weissno Exp $
+# $Id: lonpreferences.pm,v 1.139 2009/02/18 07:06:15 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -190,7 +190,7 @@ sub verify_and_change_languages {
         $message=&mt('Set new preferred languages to ').'<tt>"'.$newlanguage.'"</tt>.';
     } else {
         &Apache::lonnet::del('environment',['languages']);
-        &Apache::lonnet::delenv('environment\.languages');
+        &Apache::lonnet::delenv('environment.languages');
         $message=&mt('Reset preferred language.');
     }
     &Apache::loncommon::flush_langs_cache($user,$domain);
@@ -307,7 +307,7 @@ sub verify_and_change_texengine {
         $message=&mt('Set new preferred math display to ').'<tt>"'.$newtexengine.'"</tt>.';
     } else {
         &Apache::lonnet::del('environment',['texengine']);
-        &Apache::lonnet::delenv('environment\.texengine');
+        &Apache::lonnet::delenv('environment.texengine');
         $message=&mt('Reset preferred math display.');
     }
 
@@ -452,7 +452,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) {
@@ -556,7 +556,7 @@ sub verify_and_change_screenname {
         $message=&mt('Set new screenname to ').'<tt>"'.$newscreen.'."</tt>.';
     } else {
         &Apache::lonnet::del('environment',['screenname']);
-        &Apache::lonnet::delenv('environment\.screenname');
+        &Apache::lonnet::delenv('environment.screenname');
         $message=&mt('Reset screenname.');
     }
 # Nickname
@@ -569,7 +569,7 @@ sub verify_and_change_screenname {
         $message.=&mt('Set new nickname to ').'<tt>"'.$newscreen.'"</tt>.';
     } else {
         &Apache::lonnet::del('environment',['nickname']);
-        &Apache::lonnet::delenv('environment\.nickname');
+        &Apache::lonnet::delenv('environment.nickname');
         $message.=&mt('Reset nickname.');
     }
     &Apache::lonnet::devalidate_cache_new('namescache',$user.':'.$domain);
@@ -1003,7 +1003,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;
@@ -1043,7 +1043,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) {
@@ -1052,7 +1052,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) {
@@ -1062,7 +1062,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 {
@@ -1071,7 +1071,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 />';
@@ -1116,6 +1116,9 @@ sub colorschanger {
     }
     my $end_data_table = &Apache::loncommon::end_data_table();
     my $pjump_def = &Apache::lonhtmlcommon::pjump_javascript_definition();
+    my $save = &mt('Save');
+    my $rstall = &mt('Reset All');
+    my $resetdefault = &mt('Reset All Colors to Default');
     $r->print(<<ENDCOL);
 <script type="text/javascript">
 
@@ -1154,8 +1157,8 @@ $start_data_table
 $chtable
 $end_data_table
 </table>
-<input type="submit" value="'.&mt('Save').'" />
-<input type="submit" name="resetall" value="'.&mt('Reset All').'" title="'.&mt('Reset All Colors to Default').'" />
+<input type="submit" value="$save" />
+<input type="submit" name="resetall" value="$rstall" title="$resetdefault" />
 </form>
 ENDCOL
 }
@@ -1183,7 +1186,7 @@ sub verify_and_change_colors {
 	    $message.=&mt('Set '.$colortypes{$item}.' to ').'<tt>"'.$color.'"</tt>.<br />';
 	} else {
 	    &Apache::lonnet::del('environment',[$entry]);
-	    &Apache::lonnet::delenv('environment\.'.$entry);
+	    &Apache::lonnet::delenv('environment.'.$entry);
 	    $message.=&mt('Reset '.$colortypes{$item}.'.').'<br />';
 	}
     }
@@ -1689,7 +1692,7 @@ 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'}) ) {
@@ -1701,7 +1704,7 @@ sub verify_and_change_discussion {
         } else {
             $message.=&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);
@@ -1779,7 +1782,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'})) {
@@ -2432,7 +2435,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});
     }