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

albertel lon-capa-cvs@mail.lon-capa.org
Wed, 29 Sep 2004 06:06:35 -0000


albertel		Wed Sep 29 02:06:35 2004 EDT

  Modified files:              
    /loncom/interface	lonprintout.pm 
  Log:
  - printing with answers in anon mode, would produce incorrect answers for sheets past the first one
  
  
Index: loncom/interface/lonprintout.pm
diff -u loncom/interface/lonprintout.pm:1.331 loncom/interface/lonprintout.pm:1.332
--- loncom/interface/lonprintout.pm:1.331	Fri Sep 24 16:32:02 2004
+++ loncom/interface/lonprintout.pm	Wed Sep 29 02:06:34 2004
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Printout
 #
-# $Id: lonprintout.pm,v 1.331 2004/09/24 20:32:02 albertel Exp $
+# $Id: lonprintout.pm,v 1.332 2004/09/29 06:06:34 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -1359,10 +1359,9 @@
 		    my $current_counter=$ENV{'form.counter'};
 		    if(($helper->{'VARS'}->{'ANSWER_TYPE'} eq 'no') ||
 		       ($helper->{'VARS'}->{'ANSWER_TYPE'} eq 'only')) {
-			my %form;
-			$form{'answer_output_mode'}='tex';
-			$form{'latex_type'}=$helper->{'VARS'}->{'LATEX_TYPE'};
-			my $ansrendered = &Apache::loncommon::get_student_answers($curresline,$username,$userdomain,$ENV{'request.course.id'},%form);
+			$moreenv->{'answer_output_mode'}='tex';
+			$moreenv->{'latex_type'}=$helper->{'VARS'}->{'LATEX_TYPE'};
+			my $ansrendered = &Apache::loncommon::get_student_answers($curresline,$username,$userdomain,$ENV{'request.course.id'},%{$moreenv});
 			&Apache::lonnet::appenv(('form.counter' => $current_counter));
 			if ($helper->{'VARS'}->{'ANSWER_TYPE'} eq 'no') {
 			    $rendered=~s/(\\keephidden{ENDOFPROBLEM})/$ansrendered$1/;