--- loncom/interface/lonmeta.pm 2005/12/19 23:19:18 1.148
+++ loncom/interface/lonmeta.pm 2005/12/29 19:42:44 1.149
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Metadata display handler
#
-# $Id: lonmeta.pm,v 1.148 2005/12/19 23:19:18 albertel Exp $
+# $Id: lonmeta.pm,v 1.149 2005/12/29 19:42:44 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -248,8 +248,13 @@ sub fieldnames {
'notes' => 'Notes',
'abstract' => 'Abstract',
'lowestgradelevel' => 'Lowest Grade Level',
- 'highestgradelevel' => 'Highest Grade Level',
- 'courserestricted' => 'Course Restricting Metadata');
+ 'highestgradelevel' => 'Highest Grade Level');
+
+ if (! defined($file_type) || $file_type ne 'portfolio') {
+ %fields =
+ (%fields,
+ 'courserestricted' => 'Course Restricting Metadata');
+ }
if (! defined($file_type) || $file_type ne 'portfolio') {
%fields =
@@ -1164,12 +1169,14 @@ ENDEDIT
$Apache::lonpublisher::metadatafields{'copyright'}=
'default';
}
- if ($Apache::lonpublisher::metadatafields{'courserestricted'} ne 'none') {
- $r->print(&mt('Associated with course [_1]',''.$env{$Apache::lonpublisher::metadatafields{'courserestricted'}.".description"}.
- '').'
');
- } else {
- $r->print("This resource is not associated with a course.
");
- }
+ if ($file_type eq 'portfolio') {
+ if ($Apache::lonpublisher::metadatafields{'courserestricted'} ne 'none') {
+ $r->print(&mt('Associated with course [_1]',''.$env{$Apache::lonpublisher::metadatafields{'courserestricted'}.".description"}.
+ '').'
');
+ } else {
+ $r->print("This resource is not associated with a course.
");
+ }
+ }
foreach my $field_name (@fields) {
if (defined($env{'form.new_'.$field_name})) {
@@ -1260,12 +1267,14 @@ ENDEDIT
$r->print($output.'
');
- $r->print('
+ if ($file_type eq 'portfolio') {
+ $r->print('