--- loncom/interface/lonmeta.pm 2005/10/14 04:24:12 1.111
+++ loncom/interface/lonmeta.pm 2005/10/25 18:46:03 1.117
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Metadata display handler
#
-# $Id: lonmeta.pm,v 1.111 2005/10/14 04:24:12 banghart Exp $
+# $Id: lonmeta.pm,v 1.117 2005/10/25 18:46:03 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -290,40 +290,32 @@ sub fieldnames {
sub select_course {
my ($r)=@_;
- my @courses;
+ 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;
+ 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('