[LON-CAPA-cvs] cvs: loncom /homework imageresponse.pm matchresponse.pm optionresponse.pm radiobuttonresponse.pm rankresponse.pm

albertel lon-capa-cvs@mail.lon-capa.org
Thu, 22 Feb 2007 01:25:32 -0000


albertel		Wed Feb 21 20:25:32 2007 EDT

  Modified files:              
    /loncom/homework	imageresponse.pm matchresponse.pm 
                    	optionresponse.pm radiobuttonresponse.pm 
                    	rankresponse.pm 
  Log:
  - BUG#5206, <foil>s were posibly getting 2 eauation passes
  
  
Index: loncom/homework/imageresponse.pm
diff -u loncom/homework/imageresponse.pm:1.80 loncom/homework/imageresponse.pm:1.81
--- loncom/homework/imageresponse.pm:1.80	Mon Nov  6 18:44:42 2006
+++ loncom/homework/imageresponse.pm	Wed Feb 21 20:25:31 2007
@@ -2,7 +2,7 @@
 # The LearningOnline Network with CAPA
 # image click response style
 #
-# $Id: imageresponse.pm,v 1.80 2006/11/06 23:44:42 foxr Exp $
+# $Id: imageresponse.pm,v 1.81 2007/02/22 01:25:31 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -346,6 +346,7 @@
 
 	if ($target eq 'web' || $target eq 'tex') {
 	    $result=&displayfoils($target,@whichopt);
+	    $Apache::lonxml::post_evaluate=0;
 	} elsif ($target eq 'grade') {
 	    if ( defined $env{'form.submitted'}) { &gradefoils(@whichopt); }
 	} elsif ( $target eq 'analyze') {
Index: loncom/homework/matchresponse.pm
diff -u loncom/homework/matchresponse.pm:1.59 loncom/homework/matchresponse.pm:1.60
--- loncom/homework/matchresponse.pm:1.59	Tue Apr  4 18:30:52 2006
+++ loncom/homework/matchresponse.pm	Wed Feb 21 20:25:31 2007
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Full matching style response
 #
-# $Id: matchresponse.pm,v 1.59 2006/04/04 22:30:52 foxr Exp $
+# $Id: matchresponse.pm,v 1.60 2007/02/22 01:25:31 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -163,6 +163,7 @@
 	if ($direction eq 'horizontal') { $table .='</tr>';}
 	$table.='</table>';
 	$Apache::matchresponse::itemtable{'display'}=$table;
+	$Apache::lonxml::post_evaluate=0;
     } elsif ($target eq 'tex') {
 	my $table=' \begin{description}\setlength{\leftmargin}{2em}\setlength{\labelwidth}{1em}\setlength{\itemsep}{0.5pt plus1pt minus2pt}\setlength{\listparindent}{0em} ';
 	my $i=0;
@@ -175,6 +176,7 @@
 	$table.=' \end{description}  \strut ';
 	if ($Apache::lonhomework::type eq 'exam') {$table.='\vskip -13 mm \strut ';}
 	$Apache::matchresponse::itemtable{'display'}=$table;
+	$Apache::lonxml::post_evaluate=0;
     }
     return $result;
 }
@@ -263,6 +265,7 @@
 						   $safeeval,'-2');
 	if ($target eq 'web' || $target eq 'tex') {
 	    $result=&displayfoils($target,$max,$randomize);
+	    $Apache::lonxml::post_evaluate=0;
 	} elsif ($target eq 'answer' ) {
 	    $result=&displayanswers($max,$randomize);
 	} elsif ( $target eq 'grade') {
Index: loncom/homework/optionresponse.pm
diff -u loncom/homework/optionresponse.pm:1.136 loncom/homework/optionresponse.pm:1.137
--- loncom/homework/optionresponse.pm:1.136	Wed Jan 17 05:46:13 2007
+++ loncom/homework/optionresponse.pm	Wed Feb 21 20:25:31 2007
@@ -1,7 +1,7 @@
 # LearningOnline Network with CAPA
 # option list style responses
 #
-# $Id: optionresponse.pm,v 1.136 2007/01/17 10:46:13 foxr Exp $
+# $Id: optionresponse.pm,v 1.137 2007/02/22 01:25:31 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -183,6 +183,7 @@
 					       $safeeval,'-2');
     if ($target eq 'web' || $target eq 'tex') {
       $result.=&displayfoils($target,$max,$randomize,$TeXlayout,@opt);
+      $Apache::lonxml::post_evaluate=0;
     } elsif ( $target eq 'answer') {
       $result.=&displayanswers($max,$randomize,@opt);
       
Index: loncom/homework/radiobuttonresponse.pm
diff -u loncom/homework/radiobuttonresponse.pm:1.110 loncom/homework/radiobuttonresponse.pm:1.111
--- loncom/homework/radiobuttonresponse.pm:1.110	Tue Dec 19 06:05:21 2006
+++ loncom/homework/radiobuttonresponse.pm	Wed Feb 21 20:25:31 2007
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # mutliple choice style responses
 #
-# $Id: radiobuttonresponse.pm,v 1.110 2006/12/19 11:05:21 foxr Exp $
+# $Id: radiobuttonresponse.pm,v 1.111 2007/02/22 01:25:31 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -206,6 +206,7 @@
 		      ('true','false'));
 	    }
 	}
+	$Apache::lonxml::post_evaluate=0;
     }
     &Apache::response::poprandomnumber();
     &Apache::lonxml::increment_counter();
Index: loncom/homework/rankresponse.pm
diff -u loncom/homework/rankresponse.pm:1.49 loncom/homework/rankresponse.pm:1.50
--- loncom/homework/rankresponse.pm:1.49	Tue Dec  6 05:13:46 2005
+++ loncom/homework/rankresponse.pm	Wed Feb 21 20:25:31 2007
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # rank style response
 #
-# $Id: rankresponse.pm,v 1.49 2005/12/06 10:13:46 albertel Exp $
+# $Id: rankresponse.pm,v 1.50 2007/02/22 01:25:31 albertel Exp $
 # Copyright Michigan State University Board of Trustees
 #
 # This file is part of the LearningOnline Network with CAPA (LON-CAPA).
@@ -105,6 +105,7 @@
 	if (!defined($tol)) { $tol=0; }
 	if ($target eq 'web' || $target eq 'tex') {
 	    $result=&displayfoils($target,$max,$randomize,$tol);
+	    $Apache::lonxml::post_evaluate=0;
 	} elsif ($target eq 'answer' ) {
 	    $result=&displayanswers($max,$randomize,$tol);
 	} elsif ( $target eq 'grade') {