[LON-CAPA-cvs] cvs: rat / lonuserstate.pm loncom/homework edit.pm grades.pm imagechoice.pm loncom/interface londocs.pm lonfeedback.pm lonpreferences.pm lonprintout.pm

raeburn raeburn@source.lon-capa.org
Wed, 18 Feb 2009 07:06:19 -0000


This is a MIME encoded message

--raeburn1234940779
Content-Type: text/plain

raeburn		Wed Feb 18 07:06:19 2009 EDT

  Modified files:              
    /loncom/homework	edit.pm grades.pm imagechoice.pm 
    /loncom/interface	londocs.pm lonfeedback.pm lonpreferences.pm 
                     	lonprintout.pm 
    /rat	lonuserstate.pm 
  Log:
  - Starting with lonnet.pm rev 1.981, default for &lonnet::delenv() has been to \Q escape arg in regexp used to identify items in environment to delete.
    - No longer need to escape special characters in arg passed to lonnet::delenv().
  - Call to lonnet::delenv() in rat/lonuserstate now includes second arg, because in this case first arg is to be treated as a regexp (so \Q escape is not wanted).
  
  
--raeburn1234940779
Content-Type: text/plain
Content-Disposition: attachment; filename="raeburn-20090218070619.txt"

Index: loncom/homework/edit.pm
diff -u loncom/homework/edit.pm:1.121 loncom/homework/edit.pm:1.122
--- loncom/homework/edit.pm:1.121	Wed Dec 10 21:59:43 2008
+++ loncom/homework/edit.pm	Wed Feb 18 07:06:12 2009
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA 
 # edit mode helpers
 #
-# $Id: edit.pm,v 1.121 2008/12/10 21:59:43 raeburn Exp $
+# $Id: edit.pm,v 1.122 2009/02/18 07:06:12 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -1027,7 +1027,7 @@
 }
 
 sub deletecoorddata {
-    &Apache::lonnet::delenv("imagechoice\\.");
+    &Apache::lonnet::delenv('imagechoice.');
 }
 
 #----------------------------------------------------- browse
Index: loncom/homework/grades.pm
diff -u loncom/homework/grades.pm:1.551 loncom/homework/grades.pm:1.552
--- loncom/homework/grades.pm:1.551	Sat Feb 14 19:45:26 2009
+++ loncom/homework/grades.pm	Wed Feb 18 07:06:12 2009
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # The LON-CAPA Grading handler
 #
-# $Id: grades.pm,v 1.551 2009/02/14 19:45:26 raeburn Exp $
+# $Id: grades.pm,v 1.552 2009/02/18 07:06:12 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -7302,7 +7302,7 @@
 	    }
         }
     }
-    &Apache::lonnet::delenv('scantron\.');
+    &Apache::lonnet::delenv('scantron.');
 
     &save_bubble_lines();
     $env{'form.scantron_maxbubble'} =
@@ -7564,7 +7564,7 @@
         if (&Apache::loncommon::connection_aborted($r)) { last; }
     } continue {
 	&Apache::lonxml::clear_problem_counter();
-	&Apache::lonnet::delenv('scantron\.');
+	&Apache::lonnet::delenv('scantron.');
     }
     &Apache::lonhtmlcommon::Close_PrgWin($r,\%prog_state);
     &Apache::lonnet::remove_lock($lock);
Index: loncom/homework/imagechoice.pm
diff -u loncom/homework/imagechoice.pm:1.15 loncom/homework/imagechoice.pm:1.16
--- loncom/homework/imagechoice.pm:1.15	Mon Oct 13 14:06:47 2008
+++ loncom/homework/imagechoice.pm	Wed Feb 18 07:06:12 2009
@@ -1,4 +1,4 @@
-# $Id: imagechoice.pm,v 1.15 2008/10/13 14:06:47 bisitz Exp $
+# $Id: imagechoice.pm,v 1.16 2009/02/18 07:06:12 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -32,7 +32,7 @@
 
 sub deletedata {
     my ($id)=@_;
-    &Apache::lonnet::delenv("imagechoice\\.$id\\.coords");
+    &Apache::lonnet::delenv('imagechoice.'.$id.'.coords');
 }
 
 sub closewindow {
Index: loncom/interface/londocs.pm
diff -u loncom/interface/londocs.pm:1.345 loncom/interface/londocs.pm:1.346
--- loncom/interface/londocs.pm:1.345	Tue Feb 17 10:02:59 2009
+++ loncom/interface/londocs.pm	Wed Feb 18 07:06:15 2009
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Documents
 #
-# $Id: londocs.pm,v 1.345 2009/02/17 10:02:59 weissno Exp $
+# $Id: londocs.pm,v 1.346 2009/02/18 07:06:15 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -1223,7 +1223,7 @@
         &Apache::lonnet::appenv({'docs.markedcopy_supplemental' => $title});
 	($title) = &parse_supplemental_title($title);
     } elsif ($env{'docs.markedcopy_supplemental'}) {
-        &Apache::lonnet::delenv('docs\\.markedcopy_supplemental');
+        &Apache::lonnet::delenv('docs.markedcopy_supplemental');
     }
     $url=~s{http(:|:)//https(:|:)//}{https$2//};
 
@@ -1327,7 +1327,7 @@
     }
 # published maps can only exists once, so remove it from paste buffer when done
     if (($url=~/\.(page|sequence)$/) && ($url=~m {^/res/})) {
-	&Apache::lonnet::delenv('docs\\.markedcopy');
+	&Apache::lonnet::delenv('docs.markedcopy');
     }
     if ($url=~ m{/smppg$}) {
 	my $db_name = &Apache::lonsimplepage::get_db_name($url);
Index: loncom/interface/lonfeedback.pm
diff -u loncom/interface/lonfeedback.pm:1.264 loncom/interface/lonfeedback.pm:1.265
--- loncom/interface/lonfeedback.pm:1.264	Tue Feb 10 09:30:16 2009
+++ loncom/interface/lonfeedback.pm	Wed Feb 18 07:06:15 2009
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Feedback
 #
-# $Id: lonfeedback.pm,v 1.264 2009/02/10 09:30:16 schafran Exp $
+# $Id: lonfeedback.pm,v 1.265 2009/02/18 07:06:15 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -3590,7 +3590,7 @@
 	  &Apache::lonnet::appenv({'environment.threadeddiscussion' => 'on'});
       } else {
  	  &Apache::lonnet::del('environment',['threadeddiscussion']);
-	  &Apache::lonnet::delenv('environment\.threadeddiscussion');
+	  &Apache::lonnet::delenv('environment.threadeddiscussion');
       }
       &redirect_back($r,$feedurl,&mt('Changed discussion view mode').'<br />',
 		     '0','0','','',$env{'form.previous'},undef,undef,undef,
Index: loncom/interface/lonpreferences.pm
diff -u loncom/interface/lonpreferences.pm:1.138 loncom/interface/lonpreferences.pm:1.139
--- loncom/interface/lonpreferences.pm:1.138	Tue Feb 17 21:18:05 2009
+++ loncom/interface/lonpreferences.pm	Wed Feb 18 07:06:15 2009
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Preferences
 #
-# $Id: lonpreferences.pm,v 1.138 2009/02/17 21:18:05 schafran 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 @@
         $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 @@
         $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 @@
         $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 @@
         $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 @@
         $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 @@
                     .'<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 @@
         $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 @@
         $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 @@
             $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 @@
         }
     } else {
         &Apache::lonnet::del('environment',['notifywithhtml']);
-        &Apache::lonnet::delenv('environment\.notifywithhtml');
+        &Apache::lonnet::delenv('environment.notifywithhtml');
     }
     if ($message) {
         $message .= '<br /><hr />';
@@ -1692,7 +1692,7 @@
         } 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'}) ) {
@@ -1704,7 +1704,7 @@
         } 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);
@@ -1782,7 +1782,7 @@
     } 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'})) {
@@ -2435,7 +2435,7 @@
 
 sub toggle_debug {
     if ($env{'user.debug'}) {
-        &Apache::lonnet::delenv('user\.debug');
+        &Apache::lonnet::delenv('user.debug');
     } else {
         &Apache::lonnet::appenv({'user.debug' => 1});
     }
Index: loncom/interface/lonprintout.pm
diff -u loncom/interface/lonprintout.pm:1.548 loncom/interface/lonprintout.pm:1.549
--- loncom/interface/lonprintout.pm:1.548	Fri Jan 23 16:00:46 2009
+++ loncom/interface/lonprintout.pm	Wed Feb 18 07:06:15 2009
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Printout
 #
-# $Id: lonprintout.pm,v 1.548 2009/01/23 16:00:46 bisitz Exp $
+# $Id: lonprintout.pm,v 1.549 2009/02/18 07:06:15 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -1543,7 +1543,7 @@
 	&Apache::lonnet::appenv({'construct.style' =>
 				$helper->{'VARS'}->{'style_file'}});
     } elsif ($env{'construct.style'}) {
-	&Apache::lonnet::delenv('construct\\.style');
+	&Apache::lonnet::delenv('construct.style');
     }
 
 
Index: rat/lonuserstate.pm
diff -u rat/lonuserstate.pm:1.130 rat/lonuserstate.pm:1.131
--- rat/lonuserstate.pm:1.130	Fri Dec 19 03:58:24 2008
+++ rat/lonuserstate.pm	Wed Feb 18 07:06:19 2009
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Construct and maintain state and binary representation of course for user
 #
-# $Id: lonuserstate.pm,v 1.130 2008/12/19 03:58:24 raeburn Exp $
+# $Id: lonuserstate.pm,v 1.131 2009/02/18 07:06:19 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -573,7 +573,8 @@
     $acchash{'acc.res.'.$short.'.'}='&:0&';
     my $courseuri=$uri;
     $courseuri=~s/^\/res\///;
-    &Apache::lonnet::delenv('(acc\.|httpref\.)');
+    my $regexp = 1;
+    &Apache::lonnet::delenv('(acc\.|httpref\.)',$regexp);
     &Apache::lonnet::appenv(\%acchash);
 }
 

--raeburn1234940779--