--- loncom/interface/lonmeta.pm 2005/07/15 12:57:53 1.100
+++ loncom/interface/lonmeta.pm 2005/10/14 16:34:17 1.112
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Metadata display handler
#
-# $Id: lonmeta.pm,v 1.100 2005/07/15 12:57:53 banghart Exp $
+# $Id: lonmeta.pm,v 1.112 2005/10/14 16:34:17 banghart Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -238,16 +238,16 @@ sub diffgraph {
sub fieldnames {
my $file_type=shift;
my %fields =
- ('title' => 'Title',
- 'author' =>'Author(s)',
- 'authorspace' => 'Author Space',
- 'modifyinguser' => 'Last Modifying User',
- 'subject' => 'Subject',
- 'keywords' => 'Keyword(s)',
- 'notes' => 'Notes',
- 'abstract' => 'Abstract',
- 'lowestgradelevel' => 'Lowest Grade Level',
- 'highestgradelevel' => 'Highest Grade Level');
+ ('metadata.title' => 'Title',
+ 'metadata.author' =>'Author(s)',
+ 'metadata.authorspace' => 'Author Space',
+ 'metadata.modifyinguser' => 'Last Modifying User',
+ 'metadata.subject' => 'Subject',
+ 'metadata.keywords' => 'Keyword(s)',
+ 'metadata.notes' => 'Notes',
+ 'metadata.abstract' => 'Abstract',
+ 'metadata.lowestgradelevel' => 'Lowest Grade Level',
+ 'metadata.highestgradelevel' => 'Highest Grade Level');
if (! defined($file_type) || $file_type ne 'portfolio') {
%fields =
(%fields,
@@ -290,23 +290,46 @@ sub fieldnames {
sub select_course {
my ($r)=@_;
- $r->print('
Instructor Selected Meta-Data
');
+ 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.'
');
+ push @courses, $key;
+ }
+ }
+ foreach (@courses) {
+ $r->print($_.' was found
');
+ }
+ $r->print('Portfolio Meta-Data
');
$r->print('');
-
- foreach my $key (keys %env) {
+ my $meta_not_found = 1;
+ foreach my $key (keys (%env)) {
+
if ($key =~ /\.metadata\./) {
- $r->print('