--- loncom/interface/lonmeta.pm 2005/08/15 21:16:22 1.106 +++ loncom/interface/lonmeta.pm 2005/11/19 00:16:01 1.130 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Metadata display handler # -# $Id: lonmeta.pm,v 1.106 2005/08/15 21:16:22 banghart Exp $ +# $Id: lonmeta.pm,v 1.130 2005/11/19 00:16:01 banghart Exp $ # # Copyright Michigan State University Board of Trustees # @@ -240,14 +240,14 @@ sub fieldnames { 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'); + 'highestgradelevel' => 'Highest Grade Level', + 'courserestricted' => 'Course Restricting Metadata'); + if (! defined($file_type) || $file_type ne 'portfolio') { %fields = (%fields, @@ -290,30 +290,37 @@ sub fieldnames { sub select_course { my ($r)=@_; - $r->print('
'.$lt{$_}.': '. - &prettyinput($_, + my $field_name = $_; + if ($metacourse ne 'none') { + # handle restrictions here + if ($env{$metacourse.'.metadata.'.$_.'.options'} =~ m/active/){ + $output.=('
'.$lt{$_}.': '. + &prettyinput($_, + $Apache::lonpublisher::metadatafields{$_}, + 'new_'.$_,'defaultmeta',undef,undef,undef,undef,$metacourse).'
'.$lt{$_}.': '. + &prettyinput($_, $Apache::lonpublisher::metadatafields{$_}, 'new_'.$_,'defaultmeta').'
'. &mt('Could not write metadata').', '.