[LON-CAPA-cvs] cvs: loncom(version_2_11_X) /interface lonmenu.pm

raeburn raeburn at source.lon-capa.org
Wed Aug 7 22:31:11 EDT 2013


raeburn		Thu Aug  8 02:31:11 2013 EDT

  Modified files:              (Branch: version_2_11_X)
    /loncom/interface	lonmenu.pm 
  Log:
  - For 2.11
    - Backport 1.417.
  
  
Index: loncom/interface/lonmenu.pm
diff -u loncom/interface/lonmenu.pm:1.369.2.44 loncom/interface/lonmenu.pm:1.369.2.45
--- loncom/interface/lonmenu.pm:1.369.2.44	Thu Aug  8 02:24:02 2013
+++ loncom/interface/lonmenu.pm	Thu Aug  8 02:31:11 2013
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Routines to control the menu
 #
-# $Id: lonmenu.pm,v 1.369.2.44 2013/08/08 02:24:02 raeburn Exp $
+# $Id: lonmenu.pm,v 1.369.2.45 2013/08/08 02:31:11 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -352,7 +352,7 @@
     my $canmgr        = &Apache::lonnet::allowed('mgr', $crs_sec);
     my $author        = &getauthor();
 
-    my ($cdom,$cnum,$showsyllabus,$showfeeds);
+    my ($cdom,$cnum,$showsyllabus,$showfeeds,$showresv);
     if ($env{'request.course.id'}) {
         $cdom = $env{'course.'.$env{'request.course.id'}.'.domain'};
         $cnum = $env{'course.'.$env{'request.course.id'}.'.num'};
@@ -369,6 +369,12 @@
                 $showfeeds = 1;
             }
         }
+        unless ($canmgr) {
+            my %slots = &Apache::lonnet::get_course_slots($cnum,$cdom);
+            if (keys(%slots) > 0) {
+                $showresv = 1;
+            }
+        }
     }
 
     my ($canmodifycoauthor);
@@ -409,8 +415,8 @@
                 && ($canmodifyuser || !$canviewroster);
         next if    $$menuitem[4]   eq 'mgr'
                 && !$canmgr;
-        next if    $$menuitem[4]   eq 'nmgr'
-                && $canmgr;
+        next if    $$menuitem[4]   eq 'showresv'
+                && !$showresv;
         next if    $$menuitem[4]   eq 'whn'
                 && !$canviewwnew;
         next if    $$menuitem[4]   eq 'opa'




More information about the LON-CAPA-cvs mailing list