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

albertel lon-capa-cvs@mail.lon-capa.org
Tue, 15 Mar 2005 17:07:10 -0000


albertel		Tue Mar 15 12:07:10 2005 EDT

  Modified files:              
    /loncom/interface	lonnavmaps.pm 
  Log:
  - propagating the showall parameter to hasResource, so control over whether redirect maps get collapsed cna be controlled there too. (BUG#4001)
  
  
Index: loncom/interface/lonnavmaps.pm
diff -u loncom/interface/lonnavmaps.pm:1.317 loncom/interface/lonnavmaps.pm:1.318
--- loncom/interface/lonnavmaps.pm:1.317	Mon Feb 28 19:41:01 2005
+++ loncom/interface/lonnavmaps.pm	Tue Mar 15 12:07:10 2005
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Navigate Maps Handler
 #
-# $Id: lonnavmaps.pm,v 1.317 2005/03/01 00:41:01 albertel Exp $
+# $Id: lonnavmaps.pm,v 1.318 2005/03/15 17:07:10 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -2566,11 +2566,11 @@
 parameter will allow you to avoid potentially expensive enumeration of
 all matching resources.
 
-=item * B<hasResource>(map, filterFunc, recursive):
+=item * B<hasResource>(map, filterFunc, recursive, showall):
 
 Convience method for
 
- scalar(retrieveResources($map, $filterFunc, $recursive, 1)) > 0
+ scalar(retrieveResources($map, $filterFunc, $recursive, 1, $showall)) > 0
 
 which will tell whether the map has resources matching the description
 in the filter function.
@@ -2653,8 +2653,9 @@
     my $map = shift;
     my $filterFunc = shift;
     my $recursive = shift;
+    my $showall = shift;
     
-    return scalar($self->retrieveResources($map, $filterFunc, $recursive, 1)) > 0;
+    return scalar($self->retrieveResources($map, $filterFunc, $recursive, 1, $showall)) > 0;
 }
 
 1;