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

raeburn raeburn at source.lon-capa.org
Sun Feb 3 17:25:48 EST 2019


raeburn		Sun Feb  3 22:25:48 2019 EDT

  Modified files:              (Branch: version_2_11_X)
    /loncom/interface	lonnavmaps.pm 
  Log:
  - For 2.11
    - Backport 1.546
  
  
Index: loncom/interface/lonnavmaps.pm
diff -u loncom/interface/lonnavmaps.pm:1.509.2.8 loncom/interface/lonnavmaps.pm:1.509.2.9
--- loncom/interface/lonnavmaps.pm:1.509.2.8	Fri Sep 14 15:58:37 2018
+++ loncom/interface/lonnavmaps.pm	Sun Feb  3 22:25:47 2019
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Navigate Maps Handler
 #
-# $Id: lonnavmaps.pm,v 1.509.2.8 2018/09/14 15:58:37 raeburn Exp $
+# $Id: lonnavmaps.pm,v 1.509.2.9 2019/02/03 22:25:47 raeburn Exp $
 
 #
 # Copyright Michigan State University Board of Trustees
@@ -1453,10 +1453,13 @@
         if ($args->{'iterator_map'}) {
             my $map = $args->{'iterator_map'};
             $map = $navmap->getResourceByUrl($map);
-            my $firstResource = $map->map_start();
-            my $finishResource = $map->map_finish();
-
-            $args->{'iterator'} = $it = $navmap->getIterator($firstResource, $finishResource, $filterHash, $condition);
+            if (ref($map)) {
+                my $firstResource = $map->map_start();
+                my $finishResource = $map->map_finish();
+                $args->{'iterator'} = $it = $navmap->getIterator($firstResource, $finishResource, $filterHash, $condition);
+            } else {
+                return;
+            }
         } else {
             $args->{'iterator'} = $it = $navmap->getIterator(undef, undef, $filterHash, $condition,undef,$args->{'include_top_level_map'});
         }




More information about the LON-CAPA-cvs mailing list