[LON-CAPA-cvs] cvs: loncom /interface loncommon.pm

albertel lon-capa-cvs@mail.lon-capa.org
Mon, 11 Dec 2006 21:16:36 -0000


albertel		Mon Dec 11 16:16:36 2006 EDT

  Modified files:              
    /loncom/interface	loncommon.pm 
  Log:
  - eliminitate some regexp vars
  - with - and . really need to \Q\E variable values
  
  
Index: loncom/interface/loncommon.pm
diff -u loncom/interface/loncommon.pm:1.490 loncom/interface/loncommon.pm:1.491
--- loncom/interface/loncommon.pm:1.490	Sun Dec 10 22:43:15 2006
+++ loncom/interface/loncommon.pm	Mon Dec 11 16:16:32 2006
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # a pile of common routines
 #
-# $Id: loncommon.pm,v 1.490 2006/12/11 03:43:15 raeburn Exp $
+# $Id: loncommon.pm,v 1.491 2006/12/11 21:16:32 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -3009,7 +3009,7 @@
         }
         # if they have the evb priv and are currently not playing student
         next if (($no_ownblock) &&
-                 ($env{'request.role'} !~ m{^st\./$cdom/$cnum}));
+                 ($env{'request.role'} !~ m{^st\./\Q$cdom\E/\Q$cnum\E}));
         next if ($no_userblock);
 
         # Retrieve blocking times and identity of blocker for course
@@ -3037,11 +3037,11 @@
             if ($blocks->{$activity} eq 'on') {
                 push(@{$$setters{$course}{'staff'}},[$staff_name,$staff_dom]);
                 push(@{$$setters{$course}{'times'}}, [$start,$end]);
-                if ( ($startblock == 0) || ($startblock > $1) ) {
-                    $startblock = $1;
+                if ( ($startblock == 0) || ($startblock > $start) ) {
+                    $startblock = $start;
                 }
-                if ( ($endblock == 0) || ($endblock < $2) ) {
-                    $endblock = $2;
+                if ( ($endblock == 0) || ($endblock < $end) ) {
+                    $endblock = $end;
                 }
             }
         }