[LON-CAPA-cvs] cvs: loncom /interface lonmeta.pm

banghart lon-capa-cvs@mail.lon-capa.org
Fri, 11 Nov 2005 22:46:58 -0000


banghart		Fri Nov 11 17:46:58 2005 EDT

  Modified files:              
    /loncom/interface	lonmeta.pm 
  Log:
  	Select single choice now sets "selected".
  
  
Index: loncom/interface/lonmeta.pm
diff -u loncom/interface/lonmeta.pm:1.125 loncom/interface/lonmeta.pm:1.126
--- loncom/interface/lonmeta.pm:1.125	Fri Nov 11 16:25:50 2005
+++ loncom/interface/lonmeta.pm	Fri Nov 11 17:46:56 2005
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Metadata display handler
 #
-# $Id: lonmeta.pm,v 1.125 2005/11/11 21:25:50 banghart Exp $
+# $Id: lonmeta.pm,v 1.126 2005/11/11 22:46:56 banghart Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -512,7 +512,6 @@
         }
         if ($type eq 'keywords') {
             my %hash;
-            my $def;
             my @cur_values;
             foreach (split(/,/,$value)) {
                 $_ =~ s/^\s+//;
@@ -523,7 +522,7 @@
                 $hash{$_} = $_;
             }
             if ($only_one) {
-                return(&Apache::loncommon::select_form($def,'new_keywords',%hash));
+                return(&Apache::loncommon::select_form($value,'new_keywords',%hash));
             } else {
                 return (&Apache::loncommon::multiple_select_form('new_keywords',\@cur_values,undef,\%hash));
             }