--- loncom/interface/lonmenu.pm 2016/11/22 00:43:12 1.462 +++ loncom/interface/lonmenu.pm 2016/12/01 16:37:53 1.464 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Routines to control the menu # -# $Id: lonmenu.pm,v 1.462 2016/11/22 00:43:12 raeburn Exp $ +# $Id: lonmenu.pm,v 1.464 2016/12/01 16:37:53 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -381,6 +381,7 @@ sub secondary_menu { ? "/$env{'request.course.sec'}" : ''); my $canedit = &Apache::lonnet::allowed('mdc', $env{'request.course.id'}); + my $canvieweditor = &Apache::lonnet::allowed('cev', $env{'request.course.id'}); my $canviewroster = $env{'course.'.$env{'request.course.id'}.'.student_classlist_view'}; if ($canviewroster eq 'disabled') { undef($canviewroster); @@ -400,7 +401,7 @@ sub secondary_menu { if ($env{'request.course.id'}) { $cdom = $env{'course.'.$env{'request.course.id'}.'.domain'}; $cnum = $env{'course.'.$env{'request.course.id'}.'.num'}; - if ($canedit) { + if ($canedit || $canvieweditor) { $showsyllabus = 1; $showfeeds = 1; } else { @@ -416,7 +417,7 @@ sub secondary_menu { $showfeeds = 1; } } - unless (($canmgr || $canvgr)) { + unless ($canmgr || $canvgr) { my %slots = &Apache::lonnet::get_course_slots($cnum,$cdom); if (keys(%slots) > 0) { $showresv = 1; @@ -452,8 +453,8 @@ sub secondary_menu { next if $$menuitem[4] ne 'always' && ($$menuitem[4] ne 'author' && $$menuitem[4] ne 'cca') && !$env{'request.course.id'}; - next if $$menuitem[4] =~ /^mdc/ - && !$canedit; + next if $$menuitem[4] =~ /^crsedit/ + && (!$canedit && !$canvieweditor); next if $$menuitem[4] eq 'nvgr' && $canvgr; next if $$menuitem[4] eq 'vgr' @@ -1035,9 +1036,9 @@ sub get_editbutton { my ($cfile,$home,$switchserver,$forceedit,$forceview,$forcereg) = @_; my $jscall; if (($forceview) && ($env{'form.todocs'})) { - my ($folderpath,$command); + my ($folderpath,$command,$navmap); if ($env{'request.symb'}) { - $folderpath = &Apache::loncommon::symb_to_docspath($env{'request.symb'}); + $folderpath = &Apache::loncommon::symb_to_docspath($env{'request.symb'},\$navmap); } elsif ($env{'form.folderpath'} =~ /^supplemental/) { $folderpath = $env{'form.folderpath'}; $command = '&forcesupplement=1';