--- loncom/interface/lonmeta.pm 2005/10/14 16:34:17 1.112
+++ loncom/interface/lonmeta.pm 2005/12/13 11:52:37 1.137
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Metadata display handler
#
-# $Id: lonmeta.pm,v 1.112 2005/10/14 16:34:17 banghart Exp $
+# $Id: lonmeta.pm,v 1.137 2005/12/13 11:52:37 banghart Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -238,21 +238,23 @@ sub diffgraph {
sub fieldnames {
my $file_type=shift;
my %fields =
- ('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');
+ ('title' => 'Title',
+ 'author' =>'Author(s)',
+ 'authorspace' => 'Author Space',
+ 'modifyinguser' => 'Last Modifying User',
+ 'subject' => 'Subject',
+ 'standards' => 'Standards',
+ 'keywords' => 'Keyword(s)',
+ 'notes' => 'Notes',
+ 'abstract' => 'Abstract',
+ 'lowestgradelevel' => 'Lowest Grade Level',
+ 'highestgradelevel' => 'Highest Grade Level',
+ 'courserestricted' => 'Course Restricting Metadata');
+
if (! defined($file_type) || $file_type ne 'portfolio') {
%fields =
(%fields,
'domain' => 'Domain',
- 'standards' => 'Standards',
'mime' => 'MIME Type',
'language' => 'Language',
'creationdate' => 'Creation Date',
@@ -282,55 +284,48 @@ sub fieldnames {
'stdno' => 'Total number of students who have worked on this problem',
'difficulty' => 'Degree of difficulty',
'disc' => 'Degree of discrimination',
- 'dependencies' => 'Resources used by this resource',
+ 'dependencies' => 'Resources used by this resource',
);
}
return &Apache::lonlocal::texthash(%fields);
}
sub select_course {
- my ($r)=@_;
- my @courses;
+ my %courses;
+ my $output;
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;
+ if ($key =~ m/\.metadata\./) {
+ $key =~ m/^course\.(.+)(\.metadata.+$)/;
+ my $course = $1;
+ my $coursekey = 'course.'.$course.'.description';
+ my $value = $env{$coursekey};
+ $courses{$coursekey} = $value;
}
}
- foreach (@courses) {
- $r->print($_.' was found
');
- }
- $r->print('