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

matthew lon-capa-cvs@mail.lon-capa.org
Tue, 04 Mar 2003 22:30:10 -0000


matthew		Tue Mar  4 17:30:10 2003 EDT

  Modified files:              
    /loncom/interface	lonnavmaps.pm 
  Log:
  &extract_parts now calls metadata to get 'packages' to get the parts.
  
  
Index: loncom/interface/lonnavmaps.pm
diff -u loncom/interface/lonnavmaps.pm:1.151 loncom/interface/lonnavmaps.pm:1.152
--- loncom/interface/lonnavmaps.pm:1.151	Mon Mar  3 08:03:58 2003
+++ loncom/interface/lonnavmaps.pm	Tue Mar  4 17:30:10 2003
@@ -2,7 +2,7 @@
 # The LearningOnline Network with CAPA
 # Navigate Maps Handler
 #
-# $Id: lonnavmaps.pm,v 1.151 2003/03/03 13:03:58 www Exp $
+# $Id: lonnavmaps.pm,v 1.152 2003/03/04 22:30:10 matthew Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -2698,15 +2698,14 @@
 
     # Retrieve part count, if this is a problem
     if ($self->is_problem()) {
-        my $metadata = &Apache::lonnet::metadata($self->src(), 'allpossiblekeys');
+        my $metadata = &Apache::lonnet::metadata($self->src(), 'packages');
         if (!$metadata) {
             $self->{RESOURCE_ERROR} = 1;
             $self->{PARTS} = [];
             return;
         }
-        
         foreach (split(/\,/,$metadata)) {
-            if ($_ =~ /^parameter\_(.*)\_opendate$/) {
+            if ($_ =~ /^part_(.*)$/) {
                 my $part = $1;
                 # check to see if part is turned off.
                 if (! Apache::loncommon::check_if_partid_hidden($part, $self->symb())) {