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

sakharuk lon-capa-cvs@mail.lon-capa.org
Thu, 15 May 2003 13:32:02 -0000


sakharuk		Thu May 15 09:32:02 2003 EDT

  Modified files:              
    /loncom/interface	lonprintout.pm 
  Log:
  It'is possible now to print assignments for the group of students with answers.
  
  
Index: loncom/interface/lonprintout.pm
diff -u loncom/interface/lonprintout.pm:1.172 loncom/interface/lonprintout.pm:1.173
--- loncom/interface/lonprintout.pm:1.172	Wed May 14 16:16:56 2003
+++ loncom/interface/lonprintout.pm	Thu May 15 09:32:02 2003
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Printout
 #
-# $Id: lonprintout.pm,v 1.172 2003/05/14 20:16:56 bowersj2 Exp $
+# $Id: lonprintout.pm,v 1.173 2003/05/15 13:32:02 sakharuk Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -1476,6 +1476,13 @@
 			    $rendered = &latex_header_footer_remove($rendered);
 			} else {
 			    $rendered =~ s/\\end{document}//;
+			}
+			if($helper->{'VARS'}->{'ANSWER_TYPE'} eq 'no') {
+			    my %form;
+			    $form{'answer_output_mode'}='tex';
+			    my $ansrendered = &Apache::loncommon::get_student_answers($curresline,$username,$userdomain,
+										      $ENV{'request.course.id'},%form);
+			    $rendered=~s/(\\keephidden{ENDOFPROBLEM})/$ansrendered$1/;
 			}
 			$current_output .= $rendered;
 		    }