[LON-CAPA-cvs] cvs: loncom /interface lonmeta.pm
banghart
lon-capa-cvs@mail.lon-capa.org
Fri, 14 Oct 2005 04:24:12 -0000
banghart Fri Oct 14 00:24:12 2005 EDT
Modified files:
/loncom/interface lonmeta.pm
Log:
remove 'metadata' from portfolio field names,
miscellaneous style corrections
Index: loncom/interface/lonmeta.pm
diff -u loncom/interface/lonmeta.pm:1.110 loncom/interface/lonmeta.pm:1.111
--- loncom/interface/lonmeta.pm:1.110 Thu Oct 6 18:20:30 2005
+++ loncom/interface/lonmeta.pm Fri Oct 14 00:24:12 2005
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Metadata display handler
#
-# $Id: lonmeta.pm,v 1.110 2005/10/06 22:20:30 albertel Exp $
+# $Id: lonmeta.pm,v 1.111 2005/10/14 04:24:12 banghart Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -290,16 +290,30 @@
sub select_course {
my ($r)=@_;
- $r->print('<h3>Instructor Selected Meta-Data</h3><br />');
+ my @courses;
+ foreach my $key (keys (%env)) {
+
+ if ($key =~ m/^(course\..+)\.metadata\..+\.options/) {
+ my $course_key = $1;
+ $course_key .= '.description';
+ $r->print($env{$course_key}.' of '.$course_key.'<br />');
+ push @courses, $key;
+ }
+ }
+ foreach (@courses) {
+ $r->print($_.' was found<br />');
+ }
+ $r->print('<h3>Portfolio Meta-Data</h3><br />');
$r->print('<form action="" method="post">');
- $r->print('Select your course<br />');
+ $r->print('Select your test course<br />');
$r->print('<select name="metacourse" >');
my $meta_not_found = 1;
- foreach my $key (keys %env) {
+ foreach my $key (keys (%env)) {
+
if ($key =~ /\.metadata\./) {
if ($meta_not_found) {
undef($meta_not_found);
- $r->print('<h3>Instructor Selected Meta-Data</h3><br />');
+ $r->print('<h3>Portfolio Meta-Data</h3><br />');
$r->print('<form action="" method="post">');
$r->print('Select your course<br />');
$r->print('<select name="metacourse" >');
@@ -313,7 +327,7 @@
}
unless ($meta_not_found) {
$r->print('</select><br />');
- $r->print('<input type="submit" value="Assign Instructor Metadata" />');
+ $r->print('<input type="submit" value="Assign Portfolio Metadata" />');
$r->print('</form>');
}
return 'ok';
@@ -1001,7 +1015,7 @@
my $output;
my @fields;
if ($file_type eq 'portfolio') {
- @fields = ('author','title','subject','keywords','abstract','notes','lowestgradelevel',
+ @fields = ('author','metadata.title','metadata.subject','metadata.keywords','abstract','notes','lowestgradelevel',
'highestgradelevel');
} else {
@fields = ('author','title','subject','keywords','abstract','notes',