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

www lon-capa-cvs@mail.lon-capa.org
Thu, 09 Jun 2005 20:35:51 -0000


www		Thu Jun  9 16:35:51 2005 EDT

  Modified files:              
    /loncom/interface	lonparmset.pm 
  Log:
  Don't save unspecified dates.
  
  
Index: loncom/interface/lonparmset.pm
diff -u loncom/interface/lonparmset.pm:1.218 loncom/interface/lonparmset.pm:1.219
--- loncom/interface/lonparmset.pm:1.218	Tue Jun  7 22:14:29 2005
+++ loncom/interface/lonparmset.pm	Thu Jun  9 16:35:48 2005
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Handler to set parameters for assessments
 #
-# $Id: lonparmset.pm,v 1.218 2005/06/08 02:14:29 www Exp $
+# $Id: lonparmset.pm,v 1.219 2005/06/09 20:35:48 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -2149,9 +2149,23 @@
 		$r->print(
 			  &Apache::lonhtmlcommon::date_setter('overviewform',
 							      $jskey,
-						      $$resourcedata{$thiskey}).
+						      $$resourcedata{$thiskey},
+							      '',1).
 '<input type="hidden" name="datepointer_'.$thiskey.'" value="'.$jskey.'" />'
 			  );
+	    } elsif ($thistype eq 'string_yesno') {
+		$r->print('<label><input type="radio" name="set_'.$thiskey.
+			  '" value="yes"');
+		if ($$resourcedata{$thiskey} eq 'yes') {
+		    $r->print(' checked="checked"');
+		}
+                $r->print(' />'.&mt('Yes').'</label> ');
+		$r->print('<label><input type="radio" name="set_'.$thiskey.
+			  '" value="no"');
+		if ($$resourcedata{$thiskey} eq 'no') {
+		    $r->print(' checked="checked"');
+		}
+                $r->print(' />'.&mt('No').'</label>');
 	    } else {
 		$r->print('<input type="text" name="set_'.$thiskey.'" value="'.
 			  $$resourcedata{$thiskey}.'">');