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

raeburn raeburn@source.lon-capa.org
Mon, 06 Dec 2010 18:00:13 -0000


raeburn		Mon Dec  6 13:00:13 2010 EDT

  Modified files:              
    /loncom/interface	loncommon.pm 
  Log:
  - Customization for GCI_3.
    - Fix quotes.
    - Eliminate \Q\E (these are not regexps).
    - Only display tabbed interface if there will be more than one tab.
  
Index: loncom/interface/loncommon.pm
diff -u loncom/interface/loncommon.pm:1.925.2.24 loncom/interface/loncommon.pm:1.925.2.25
--- loncom/interface/loncommon.pm:1.925.2.24    Mon Dec  6 02:19:38 2010
+++ loncom/interface/loncommon.pm       Mon Dec  6 18:00:41 2010
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # a pile of common routines
 #
-# $Id: loncommon.pm,v 1.925.2.24 2010/12/06 02:19:38 raeburn Exp $
+# $Id: loncommon.pm,v 1.925.2.25 2010/12/06 18:00:41 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -11021,15 +11021,16 @@
         my %allnums = &get_faculty_cnums();
         my $cnums = $allnums{$udom};
         return unless (ref($cnums) eq 'HASH');
-        if ($env{'user.role.st./\Q$udom\E/'.$cnums->{'review'}}) {
+        return unless (scalar(keys(%{$cnums})) > 1);
+        if ($env{"user.role.st./$udom/$cnums->{'review'}"}) {
             my ($start,$end) =
-                split('.',$env{'user.role.st./\Q$udom\E/'.$cnums->{'review'}});
+                split('.',$env{"user.role.st./$udom/$cnums->{'review'}"});
             if (((!$start) || ($start && $start <= $now)) &&
                 ((!$end) || ($end > $now))) {
                 $custommenu = 1;
-                if ($env{'user.role.cc./\Q$udom\E/'.$cnums->{'review'}}) {
+                if ($env{"user.role.cc./$udom/$cnums->{'review'}"}) {
                     my ($ccstart,$ccend) =
-                        split('.',$env{'user.role.cc./\Q$udom\E/'.$cnums->{'review'}});
+                        split('.',$env{"user.role.cc./$udom/$cnums->{'review'}"});
                     if (((!$start) || ($start && $start <= $now)) &&
                             ((!$end) || ($end > $now))) {
                         $custommenu = '';