--- loncom/interface/lonmeta.pm 2005/10/25 18:47:49 1.118 +++ loncom/interface/lonmeta.pm 2005/10/26 23:37:51 1.119 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Metadata display handler # -# $Id: lonmeta.pm,v 1.118 2005/10/25 18:47:49 albertel Exp $ +# $Id: lonmeta.pm,v 1.119 2005/10/26 23:37:51 banghart Exp $ # # Copyright Michigan State University Board of Trustees # @@ -483,6 +483,7 @@ sub prettyinput { if (defined($course_key)) { my $stu_add; my $only_one; + my $values = $env{$course_key.'.metadata.'.$_.'.values'}; if ($env{$course_key.'.metadata.'.$_.'.options'} =~ m/stuadd/) { $stu_add = 'true'; } @@ -498,11 +499,22 @@ sub prettyinput { if ($type eq 'subject') { } if ($type eq 'keywords') { + my %hash; + my $def; + foreach (split(/,/,$values)) { + $hash{$_} = $_; + } + if ($only_one) { + return(&Apache::loncommon::select_form($def,'new_keywords',%hash)); + } else { + return(&Apache::loncommon::multiple_select_form('new_keywords',undef,undef,%hash)); + } } if ($type eq 'notes') { } if ($type eq 'abstract') { } + if (($type eq 'lowestgradelevel') || ($type eq 'highestgradelevel')) { return &Apache::loncommon::select_level_form($value,$fieldname).