[LON-CAPA-cvs] cvs: loncom /publisher lonpublisher.pm
www
lon-capa-cvs@mail.lon-capa.org
Wed, 05 Nov 2003 20:27:20 -0000
www Wed Nov 5 15:27:20 2003 EDT
Modified files:
/loncom/publisher lonpublisher.pm
Log:
Nice big warning message that obsolete parameters are a dangerous thing.
Index: loncom/publisher/lonpublisher.pm
diff -u loncom/publisher/lonpublisher.pm:1.143 loncom/publisher/lonpublisher.pm:1.144
--- loncom/publisher/lonpublisher.pm:1.143 Tue Nov 4 11:15:56 2003
+++ loncom/publisher/lonpublisher.pm Wed Nov 5 15:27:20 2003
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Publication Handler
#
-# $Id: lonpublisher.pm,v 1.143 2003/11/04 16:15:56 www Exp $
+# $Id: lonpublisher.pm,v 1.144 2003/11/05 20:27:20 www Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -180,6 +180,10 @@
#########################################
#########################################
+#
+# Modifies global %metadatafields %metadatakeys
+#
+
sub metaeval {
my ($metastring,$prefix)=@_;
@@ -812,7 +816,8 @@
# ============================================== Parse file itself for metadata
-
+#
+# parses a file with target meta, sets global %metadatafields %metadatakeys
sub parseformeta {
my ($source,$style)=@_;
@@ -941,7 +946,8 @@
# -------------------------------------------- Initial step done, now metadata.
# --------------------------------------- Storage for metadata keys and fields.
-
+# these are globals
+#
%metadatafields=();
%metadatakeys=();
@@ -967,8 +973,9 @@
$metadatafields{'authorspace'}=$cuname.'@'.$cudom;
# ----------------------------------------------------------- Parse file itself
-
- &parseformeta($source,$style);
+# read %metadatafields from file itself
+
+ $allmeta=&parseformeta($source,$style);
# ------------------------------------------------ Check out directory hierachy
my $thisdisfn=$source;
@@ -1005,12 +1012,12 @@
delete $metadatafields{$_};
}
}
-
- }
# ------------------------------------------ See if anything new in file itself
- $allmeta=&parseformeta($source,$style);
+ $allmeta=&parseformeta($source,$style);
+ }
+
# ---------------- Find and document discrepancies in the parameters and stores
my $chparms='';
@@ -1041,7 +1048,9 @@
}
if ($chparms) {
$scrout.='<p><b>'.&mt('Obsolete parameters or stored values').':</b> '.
- $chparms.'</p>';
+ $chparms.'</p><h1><font color="red">'.&mt('Warning!').
+ '</font></h1><p><font color="red" size="+1">'.
+ &mt('If this resource is in active use, student performance data from the previous version may become inaccessible.').'</font></p><hr />';
}
# ------------------------------------------------------- Now have all metadata