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

albertel lon-capa-cvs@mail.lon-capa.org
Thu, 12 Feb 2004 18:00:34 -0000


albertel		Thu Feb 12 13:00:34 2004 EDT

  Modified files:              
    /loncom/interface	lonnavmaps.pm 
  Log:
  - BUG#2605, navmaps wasn't picking up resource level default values (metatdata keys use _ not .)
  
  
Index: loncom/interface/lonnavmaps.pm
diff -u loncom/interface/lonnavmaps.pm:1.245 loncom/interface/lonnavmaps.pm:1.246
--- loncom/interface/lonnavmaps.pm:1.245	Tue Feb 10 17:12:46 2004
+++ loncom/interface/lonnavmaps.pm	Thu Feb 12 13:00:33 2004
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Navigate Maps Handler
 #
-# $Id: lonnavmaps.pm,v 1.245 2004/02/10 22:12:46 www Exp $
+# $Id: lonnavmaps.pm,v 1.246 2004/02/12 18:00:33 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -2089,7 +2089,11 @@
 
 # ----------------------------------------------------- fourth , check default
 
-    my $default=&Apache::lonnet::metadata($fn,$rwhat.'.default');
+    my $meta_rwhat=$rwhat;
+    $meta_rwhat=~s/\./_/g;
+    my $default=&Apache::lonnet::metadata($fn,$meta_rwhat);
+    if (defined($default)) { return $default}
+    $default=&Apache::lonnet::metadata($fn,'parameter_'.$meta_rwhat);
     if (defined($default)) { return $default}
 
 # --------------------------------------------------- fifth , cascade up parts