[LON-CAPA-cvs] cvs: loncom /metadata_database/LONCAPA lonmetadata.pm
www
www at source.lon-capa.org
Thu Mar 15 17:54:59 EDT 2012
www Thu Mar 15 21:54:59 2012 EDT
Modified files:
/loncom/metadata_database/LONCAPA lonmetadata.pm
Log:
Properly deal with "___" in dynamic metadata keys
Index: loncom/metadata_database/LONCAPA/lonmetadata.pm
diff -u loncom/metadata_database/LONCAPA/lonmetadata.pm:1.36 loncom/metadata_database/LONCAPA/lonmetadata.pm:1.37
--- loncom/metadata_database/LONCAPA/lonmetadata.pm:1.36 Thu Mar 15 20:53:27 2012
+++ loncom/metadata_database/LONCAPA/lonmetadata.pm Thu Mar 15 21:54:58 2012
@@ -1,6 +1,6 @@
# The LearningOnline Network with CAPA
#
-# $Id: lonmetadata.pm,v 1.36 2012/03/15 20:53:27 www Exp $
+# $Id: lonmetadata.pm,v 1.37 2012/03/15 21:54:58 www Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -760,11 +760,12 @@
#
# Process every stored element
while (my ($storedkey,$value) = each(%{$evaldata})) {
- my ($source,$file,$type) = split('___',$storedkey);
- $source = &unescape($source);
+ my (@keycomponents) = split('___',$storedkey);
+ my $type=pop(@keycomponents);
+ my $file=&unescape(pop(@keycomponents));
+ my $source = &unescape(join('___', at keycomponents));
$file = &unescape($file);
$value = &unescape($value);
- " got ".$file."\n ".$type." ".$source."\n";
if ($type =~ /^(avetries|count|difficulty|stdno|timestamp)$/) {
#
# Statistics: $source is course id
More information about the LON-CAPA-cvs
mailing list