[LON-CAPA-cvs] cvs: loncom /lonnet/perl lonnet.pm
albertel
lon-capa-cvs@mail.lon-capa.org
Mon, 16 Sep 2002 19:42:11 -0000
albertel Mon Sep 16 15:42:11 2002 EDT
Modified files:
/loncom/lonnet/perl lonnet.pm
Log:
- fixes bug #780, parmset was looking in the incorrect location for resource metadata parameters
Index: loncom/lonnet/perl/lonnet.pm
diff -u loncom/lonnet/perl/lonnet.pm:1.281 loncom/lonnet/perl/lonnet.pm:1.282
--- loncom/lonnet/perl/lonnet.pm:1.281 Mon Sep 16 09:04:16 2002
+++ loncom/lonnet/perl/lonnet.pm Mon Sep 16 15:42:10 2002
@@ -1,7 +1,7 @@
# The LearningOnline Network
# TCP networking package
#
-# $Id: lonnet.pm,v 1.281 2002/09/16 13:04:16 www Exp $
+# $Id: lonnet.pm,v 1.282 2002/09/16 19:42:10 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -2574,7 +2574,7 @@
# --------------------------------------------------------- Value of a Variable
sub EXT {
- my ($varname,$symbparm,$udom,$uname)=@_;
+ my ($varname,$symbparm,$udom,$uname,)=@_;
unless ($varname) { return ''; }
@@ -2731,10 +2731,16 @@
# --------------------------------------------- last, look in resource metadata
$spacequalifierrest=~s/\./\_/;
- my $metadata=&metadata($ENV{'request.filename'},$spacequalifierrest);
+ my $filename;
+ if (!$symbparm) { $symbparm=&symbread(); }
+ if ($symbparm) {
+ $filename=(split(/\_\_\_/,$symbparm))[2];
+ } else {
+ $filename=$ENV{'request.filename'};
+ }
+ my $metadata=&metadata($filename,$spacequalifierrest);
if ($metadata) { return $metadata; }
- $metadata=&metadata($ENV{'request.filename'},
- 'parameter_'.$spacequalifierrest);
+ $metadata=&metadata($filename,'parameter_'.$spacequalifierrest);
if ($metadata) { return $metadata; }
# ------------------------------------------------------------------ Cascade up