[LON-CAPA-cvs] cvs: loncom /interface lonmeta.pm
banghart
lon-capa-cvs@mail.lon-capa.org
Sat, 19 Nov 2005 00:00:40 -0000
banghart Fri Nov 18 19:00:40 2005 EDT
Modified files:
/loncom/interface lonmeta.pm
Log:
Displays select pulldown only if instructor has entered
values to select.
Index: loncom/interface/lonmeta.pm
diff -u loncom/interface/lonmeta.pm:1.128 loncom/interface/lonmeta.pm:1.129
--- loncom/interface/lonmeta.pm:1.128 Fri Nov 18 18:47:33 2005
+++ loncom/interface/lonmeta.pm Fri Nov 18 19:00:38 2005
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Metadata display handler
#
-# $Id: lonmeta.pm,v 1.128 2005/11/18 23:47:33 banghart Exp $
+# $Id: lonmeta.pm,v 1.129 2005/11/19 00:00:38 banghart Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -512,6 +512,8 @@
$cur_values_stu .= $_.',';
}
}
+ } else {
+ $cur_values_stu = $value;
}
if ($type eq 'author') {
return
@@ -531,10 +533,12 @@
if ($type eq 'subject') {
}
if ($type eq 'keywords') {
- if ($only_one) {
- $output .= (&Apache::loncommon::select_form($value,'new_keywords',%meta_options));
- } else {
- $output .= (&Apache::loncommon::multiple_select_form('new_keywords',\@cur_values_inst,undef,\%meta_options));
+ if ($values) {
+ if ($only_one) {
+ $output .= (&Apache::loncommon::select_form($value,'new_keywords',%meta_options));
+ } else {
+ $output .= (&Apache::loncommon::multiple_select_form('new_keywords',\@cur_values_inst,undef,\%meta_options));
+ }
}
if ($stu_add) {
$output .= '<input type="text" name="'.$fieldname.'" size="'.$size.'" '.