--- loncom/interface/lonmenu.pm 2016/11/09 23:21:08 1.369.2.65 +++ loncom/interface/lonmenu.pm 2016/11/29 15:19:49 1.369.2.66 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Routines to control the menu # -# $Id: lonmenu.pm,v 1.369.2.65 2016/11/09 23:21:08 raeburn Exp $ +# $Id: lonmenu.pm,v 1.369.2.66 2016/11/29 15:19:49 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -823,6 +823,7 @@ sub innerregister { $cnum = $env{'course.'.$env{'request.course.id'}.'.num'}; $cdom = $env{'course.'.$env{'request.course.id'}.'.domain'}; $perms{'mdc'} = &Apache::lonnet::allowed('mdc',$env{'request.course.id'}); + $perms{'cev'} = &Apache::lonnet::allowed('cev',$env{'request.course.id'}); my @privs; if ($env{'request.symb'} ne '') { if ($env{'request.filename'}=~/$LONCAPA::assess_re/) { @@ -864,7 +865,7 @@ sub innerregister { # # This applies to items inside a folder/page modifiable in the course. # - if (($env{'request.symb'}=~/^uploaded/) && ($perms{'mdc'})) { + if (($env{'request.symb'}=~/^uploaded/) && (($perms{'mdc'}) || ($perms{'cev'}))) { my $text = 'Edit Folder'; if (($mapurl =~ /\.page$/) || ($env{'request.symb'}=~ @@ -1401,9 +1402,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';