--- loncom/interface/lonmeta.pm 2005/08/09 00:24:55 1.104 +++ loncom/interface/lonmeta.pm 2005/11/08 03:08:15 1.124 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Metadata display handler # -# $Id: lonmeta.pm,v 1.104 2005/08/09 00:24:55 banghart Exp $ +# $Id: lonmeta.pm,v 1.124 2005/11/08 03:08:15 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -247,7 +247,9 @@ sub fieldnames { '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 +292,37 @@ sub fieldnames { sub select_course { my ($r)=@_; - $r->print('
'.$lt{$_}.': '. - &prettyinput($_, + if ($metacourse ne 'none') { + # handle restrictions here + if (($env{$metacourse.'.metadata.'.$_.'.options'} =~ m/active/)|| + ($_ eq 'courserestricted')) { + $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').', '.