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

raeburn raeburn at source.lon-capa.org
Tue Nov 29 10:19:50 EST 2016


raeburn		Tue Nov 29 15:19:50 2016 EDT

  Modified files:              (Branch: version_2_11_X)
    /loncom/interface	lonmenu.pm 
  Log:
  - For 2.11
    - Backport 1.462, 1.463
  
  
Index: loncom/interface/lonmenu.pm
diff -u loncom/interface/lonmenu.pm:1.369.2.65 loncom/interface/lonmenu.pm:1.369.2.66
--- loncom/interface/lonmenu.pm:1.369.2.65	Wed Nov  9 23:21:08 2016
+++ loncom/interface/lonmenu.pm	Tue Nov 29 15:19:49 2016
@@ -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 @@
             $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 @@
 #
 # 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 @@
     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';




More information about the LON-CAPA-cvs mailing list