[LON-CAPA-cvs] cvs: loncom /interface londocs.pm

raeburn raeburn at source.lon-capa.org
Sat Feb 18 09:16:47 EST 2017


raeburn		Sat Feb 18 14:16:47 2017 EDT

  Modified files:              
    /loncom/interface	londocs.pm 
  Log:
  - Prevent ISE in Supplemental Content Editor resulting from changes in 
    rev. 1.617.
  
  
Index: loncom/interface/londocs.pm
diff -u loncom/interface/londocs.pm:1.619 loncom/interface/londocs.pm:1.620
--- loncom/interface/londocs.pm:1.619	Tue Jan 24 15:52:58 2017
+++ loncom/interface/londocs.pm	Sat Feb 18 14:16:47 2017
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Documents
 #
-# $Id: londocs.pm,v 1.619 2017/01/24 15:52:58 raeburn Exp $
+# $Id: londocs.pm,v 1.620 2017/02/18 14:16:47 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -3339,7 +3339,8 @@
         $output .= &entryline($idx,$name,$url,$folder,$allowed,$res,
                               $coursenum,$coursedom,$crstype,
                               $pathitem,$supplementalflag,$container,
-                              \%filters,\%curr_groups,$ltitoolsref,$canedit,$isencrypted,$navmapref);
+                              \%filters,\%curr_groups,$ltitoolsref,$canedit,
+                              $isencrypted,$navmapref);
         $idx++;
         $shown++;
     }
@@ -4020,7 +4021,7 @@
                 if (((&LONCAPA::map::getparameter($orderidx,'parameter_encrypturl'))[0]=~/^yes$/i) ||
                       $isencrypted || (&Apache::lonnet::EXT('resource.0.encrypturl',$symb) =~ /^yes$/i)) {
                     $checkencrypt = 1;
-                } else {
+                } elsif (ref($navmapref)) {
                     unless (ref($$navmapref)) {
                         $$navmapref = Apache::lonnavmaps::navmap->new();
                     }
@@ -4075,25 +4076,29 @@
             my $encryptmap = ((&LONCAPA::map::getparameter($orderidx,
                                               'parameter_encrypturl'))[0]=~/^yes$/i);
             unless ($hiddenmap) {
-                unless (ref($$navmapref)) {
-                    $$navmapref = Apache::lonnavmaps::navmap->new();
-                }
-                if (ref($$navmapref)) {
-                    if (lc($$navmapref->get_mapparam(undef,$folderurl,"0.hiddenresource")) eq 'yes') {
-                        my @resources = $$navmapref->retrieveResources($folderurl,$filterFunc,1,1);
-                        unless (@resources) {
-                            $hiddenmap = 1;
-                            unless ($env{'request.role.adv'}) {  
-                                $url = '';
-                                $hiddenfolder = 1;
+                if (ref($navmapref)) {
+                    unless (ref($$navmapref)) {
+                        $$navmapref = Apache::lonnavmaps::navmap->new();
+                    }
+                    if (ref($$navmapref)) {
+                        if (lc($$navmapref->get_mapparam(undef,$folderurl,"0.hiddenresource")) eq 'yes') {
+                            my @resources = $$navmapref->retrieveResources($folderurl,$filterFunc,1,1);
+                            unless (@resources) {
+                                $hiddenmap = 1;
+                                unless ($env{'request.role.adv'}) {  
+                                    $url = '';
+                                    $hiddenfolder = 1;
+                                }
                             }
                         }
                     }
                 }
             }
             unless ($encryptmap) {
-                if (lc($$navmapref->get_mapparam(undef,$folderurl,"0.encrypturl")) eq 'yes') {
-                    $encryptmap = 1;
+                if ((ref($navmapref)) && (ref($$navmapref))) {
+                    if (lc($$navmapref->get_mapparam(undef,$folderurl,"0.encrypturl")) eq 'yes') {
+                        $encryptmap = 1;
+                    }
                 }
             }
             




More information about the LON-CAPA-cvs mailing list