--- loncom/interface/lonmeta.pm 2006/09/28 23:37:57 1.179
+++ loncom/interface/lonmeta.pm 2006/10/06 19:12:22 1.182
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Metadata display handler
#
-# $Id: lonmeta.pm,v 1.179 2006/09/28 23:37:57 banghart Exp $
+# $Id: lonmeta.pm,v 1.182 2006/10/06 19:12:22 banghart Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -95,7 +95,8 @@ sub get_dynamic_metadata_from_sql {
while (my $result = <$fh>) {
chomp($result);
next if (! $result);
- my %hash=&LONCAPA::lonmetadata::metadata_col_to_hash(map { &unescape($_) } split(/\,/,$result));
+ my %hash=&LONCAPA::lonmetadata::metadata_col_to_hash('metadata',
+ map { &unescape($_) } split(/\,/,$result));
foreach my $key (keys(%hash)) {
$ReturnHash{$hash{'url'}}->{$key}=$hash{$key};
}
@@ -505,6 +506,7 @@ sub prettyprint {
if ($type=~/\_list/) {
my @Courses = split(/\s*\,\s*/,$value);
my $Str='';
+ my %descriptions;
foreach my $course (@Courses) {
my %courseinfo =
&Apache::lonnet::coursedescription($course,
@@ -512,10 +514,16 @@ sub prettyprint {
if (! exists($courseinfo{'num'}) || $courseinfo{'num'} eq '') {
next;
}
- $Str .= '
';
}
# No pretty print found
@@ -1238,6 +1246,7 @@ ENDEDIT
}
}
foreach my $field_name(keys (%$added_metadata_fields)) {
+
push (@fields,$field_name);
$lt{$field_name} = $$added_metadata_fields{$field_name};
}
@@ -1249,8 +1258,9 @@ ENDEDIT
if ($Apache::lonpublisher::metadatafields{'courserestricted'} ne 'none'
&& exists($env{$Apache::lonpublisher::metadatafields{'courserestricted'}.'.metadata.'.$field_name.'.options'})) {
# handle restrictions here
- if (($env{$Apache::lonpublisher::metadatafields{'courserestricted'}.'.metadata.'.$field_name.'.options'} =~ m/active/) ||
- ($field_name eq 'courserestricted')){
+ if ((($env{$Apache::lonpublisher::metadatafields{'courserestricted'}.'.metadata.'.$field_name.'.options'} =~ m/active/) ||
+ ($field_name eq 'courserestricted'))&&
+ (!($env{$Apache::lonpublisher::metadatafields{'courserestricted'}.'.metadata.'.$field_name.'.options'} =~ m/deleted/))){
$output.=("\n".'
'.$lt{$field_name}.': '. &prettyinput($field_name, $Apache::lonpublisher::metadatafields{$field_name},