[LON-CAPA-cvs] cvs: loncom /homework/caparesponse caparesponse.pm

www lon-capa-cvs@mail.lon-capa.org
Mon, 19 Jun 2006 13:59:22 -0000


www		Mon Jun 19 09:59:22 2006 EDT

  Modified files:              
    /loncom/homework/caparesponse	caparesponse.pm 
  Log:
  <mathresponse> -> <formularesponse (no sampling)>
  
  
Index: loncom/homework/caparesponse/caparesponse.pm
diff -u loncom/homework/caparesponse/caparesponse.pm:1.190 loncom/homework/caparesponse/caparesponse.pm:1.191
--- loncom/homework/caparesponse/caparesponse.pm:1.190	Tue Jun 13 10:58:14 2006
+++ loncom/homework/caparesponse/caparesponse.pm	Mon Jun 19 09:59:21 2006
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # caparesponse definition
 #
-# $Id: caparesponse.pm,v 1.190 2006/06/13 14:58:14 albertel Exp $
+# $Id: caparesponse.pm,v 1.191 2006/06/19 13:59:21 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -249,9 +249,11 @@
     }
     
     if ($tag eq 'formularesponse') {
-	$$args_ref{'type'}='fml';
-    } elsif ($tag eq 'mathresponse') {
-        $$args_ref{'type'}='math';
+	if ($$args_ref{'samples'}) {
+	    $$args_ref{'type'}='fml';
+	} else {
+	    $$args_ref{'type'}='math';
+	}
     } elsif ($tag eq 'numericalresponse') {
 	$$args_ref{'type'}='float';
     }
@@ -937,13 +939,13 @@
         $result=&Apache::response::meta_package_write('mathresponse');
         &Apache::response::end_response();
     } else {
-        $result.=&start_numericalresponse(@_);
+#       $result.=&start_numericalresponse(@_);
     }
     return $result;
 }
 
 sub end_mathresponse {
-    return end_numericalresponse(@_);
+#    return end_numericalresponse(@_);
 }
 
 1;