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

albertel lon-capa-cvs@mail.lon-capa.org
Thu, 09 Mar 2006 00:48:47 -0000


albertel		Wed Mar  8 19:48:47 2006 EDT

  Modified files:              
    /loncom/homework	chemresponse.pm 
  Log:
  - adding in scored response default for <reactionresponse> and
    <organicresponse>
  
  
Index: loncom/homework/chemresponse.pm
diff -u loncom/homework/chemresponse.pm:1.62 loncom/homework/chemresponse.pm:1.63
--- loncom/homework/chemresponse.pm:1.62	Tue Jul  5 06:06:34 2005
+++ loncom/homework/chemresponse.pm	Wed Mar  8 19:48:47 2006
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # chemical equation style response
 #
-# $Id: chemresponse.pm,v 1.62 2005/07/05 10:06:34 foxr Exp $
+# $Id: chemresponse.pm,v 1.63 2006/03/09 00:48:47 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -251,6 +251,7 @@
 						     'options','width');
 	if ($constructtag) { $result = &Apache::edit::rebuild_tag($token); }
     }
+
     return $result;
 }
 
@@ -294,7 +295,12 @@
 	}
 	$result.=&Apache::response::answer_footer('organicresponse');
     }
-    &Apache::response::end_response;
+
+    if ($target eq 'grade' || $target eq 'web' || $target eq 'answer' || 
+	$target eq 'tex' || $target eq 'analyze') {
+	&Apache::lonxml::increment_counter(&Apache::response::repetition());
+    }
+    &Apache::response::end_response();
     return $result;
 }
 
@@ -482,7 +488,12 @@
 	}
 	$result.=&Apache::response::answer_footer('reactionresponse');
     }
-    &Apache::response::end_response;
+
+    if ($target eq 'grade' || $target eq 'web' || $target eq 'answer' || 
+	$target eq 'tex' || $target eq 'analyze') {
+	&Apache::lonxml::increment_counter(&Apache::response::repetition());
+    }
+    &Apache::response::end_response();
     return $result;
 }