[LON-CAPA-cvs] cvs: loncom(version_2_9_X) /interface lonhtmlcommon.pm

raeburn raeburn@source.lon-capa.org
Sun, 23 Aug 2009 12:59:18 -0000


raeburn		Sun Aug 23 12:59:18 2009 EDT

  Modified files:              (Branch: version_2_9_X)
    /loncom/interface	lonhtmlcommon.pm 
  Log:
  - Backport 1.234.
  
  
Index: loncom/interface/lonhtmlcommon.pm
diff -u loncom/interface/lonhtmlcommon.pm:1.182.4.7 loncom/interface/lonhtmlcommon.pm:1.182.4.8
--- loncom/interface/lonhtmlcommon.pm:1.182.4.7	Fri Aug 14 12:18:46 2009
+++ loncom/interface/lonhtmlcommon.pm	Sun Aug 23 12:59:18 2009
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # a pile of common html routines
 #
-# $Id: lonhtmlcommon.pm,v 1.182.4.7 2009/08/14 12:18:46 raeburn Exp $
+# $Id: lonhtmlcommon.pm,v 1.182.4.8 2009/08/23 12:59:18 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -1950,7 +1950,7 @@
             $values{$name}[$i] =~ s/([\r\n\f]+)/\\n/g;
             $values{$name}[$i] =~ s/"/\\"/g;
         }
-        if ($$elements{$name} eq 'text') {
+        if (($$elements{$name} eq 'text') || ($$elements{$name} eq 'hidden')) {
             my $numvalues = @{$values{$name}};
             if ($numvalues > 1) {
                 my $valuestring = join('","',@{$values{$name}});
@@ -1985,6 +1985,8 @@
                     $output .= qq|
       if (courseForm.elements['$name'].value == "$value") {
           courseForm.elements['$name'].checked = true;
+      } else {
+          courseForm.elements['$name'].checked = false;
       }|;
                 }
             }