--- loncom/interface/lonmeta.pm 2005/08/15 21:16:22 1.106 +++ loncom/interface/lonmeta.pm 2005/10/25 01:23:47 1.116 @@ -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.116 2005/10/25 01:23:47 banghart Exp $ # # Copyright Michigan State University Board of Trustees # @@ -290,30 +290,36 @@ sub fieldnames { sub select_course { my ($r)=@_; - $r->print('
'.$lt{$_}.': '. - &prettyinput($_, + if ($env{'form.metacourse'}) { + # handle restrictions here + $env{'form.metacourse'} =~ m/(^.+)\.description$/; + my $key_base = $1; + if ($env{$key_base.'.metadata.'.$_.'.options'} =~ m/active/) { + $output.=('
'.$lt{$_}.': '. + &prettyinput($_, + $Apache::lonpublisher::metadatafields{$_}, + 'new_'.$_,'defaultmeta',undef,undef,undef,undef,$key_base).'
'.$lt{$_}.': '. + &prettyinput($_, $Apache::lonpublisher::metadatafields{$_}, 'new_'.$_,'defaultmeta').'
'. &mt('Could not write metadata').', '.