--- loncom/interface/lonmenu.pm 2013/06/26 04:25:41 1.416 +++ loncom/interface/lonmenu.pm 2013/07/03 16:44:20 1.417 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Routines to control the menu # -# $Id: lonmenu.pm,v 1.416 2013/06/26 04:25:41 raeburn Exp $ +# $Id: lonmenu.pm,v 1.417 2013/07/03 16:44:20 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -329,7 +329,7 @@ sub secondary_menu { 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'}; @@ -349,6 +349,12 @@ sub secondary_menu { $showfeeds = 1; } } + unless ($canmgr) { + my %slots = &Apache::lonnet::get_course_slots($cnum,$cdom); + if (keys(%slots) > 0) { + $showresv = 1; + } + } } my ($canmodifycoauthor); @@ -385,8 +391,8 @@ sub secondary_menu { && ($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'