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

raeburn lon-capa-cvs@mail.lon-capa.org
Mon, 05 Dec 2005 19:30:24 -0000


raeburn		Mon Dec  5 14:30:24 2005 EDT

  Modified files:              
    /loncom/interface	lonnavmaps.pm 
  Log:
  Remove unnecessary code, and modify check for existence of resource Id.
  
  
Index: loncom/interface/lonnavmaps.pm
diff -u loncom/interface/lonnavmaps.pm:1.352 loncom/interface/lonnavmaps.pm:1.353
--- loncom/interface/lonnavmaps.pm:1.352	Fri Dec  2 18:06:02 2005
+++ loncom/interface/lonnavmaps.pm	Mon Dec  5 14:30:22 2005
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Navigate Maps Handler
 #
-# $Id: lonnavmaps.pm,v 1.352 2005/12/02 23:06:02 raeburn Exp $
+# $Id: lonnavmaps.pm,v 1.353 2005/12/05 19:30:22 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -2640,19 +2640,15 @@
     if (ref($resUrl)) { return $resUrl; }
 
     $resUrl = &Apache::lonnet::clutter($resUrl);
-    if (defined($multiple)) {
-        if ($multiple) {
-            my @resIds = $self->{NAV_HASH}->{'ids_' . $resUrl};
-        }
-    }
     my $resId = $self->{NAV_HASH}->{'ids_' . $resUrl};
     if (!$resId) { return ''; }
     if ($multiple) {
         my @resources = ();
         my @resIds = split (/,/, $resId);
         foreach my $id (@resIds) {
-            if ($id) { 
-                push(@resources,$self->getById($id));
+            my $resourceId = $self->getById($id);
+            if ($resourceId) { 
+                push(@resources,$resourceId);
             }
         }
         return @resources;