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

sakharuk lon-capa-cvs@mail.lon-capa.org
Tue, 09 Sep 2003 13:31:08 -0000


sakharuk		Tue Sep  9 09:31:08 2003 EDT

  Modified files:              
    /loncom/interface	lonprintout.pm 
  Log:
  Bug 2085 (authors cannot print sequences) is finally fixed. Guy, I added a few lines to get_target from lonhomework.pm and I really need to know your opinion about this (just in case - I do not want to destroy anything else in the system and I can not check everything possible situations). 
  
  
Index: loncom/interface/lonprintout.pm
diff -u loncom/interface/lonprintout.pm:1.231 loncom/interface/lonprintout.pm:1.232
--- loncom/interface/lonprintout.pm:1.231	Sat Sep  6 13:22:27 2003
+++ loncom/interface/lonprintout.pm	Tue Sep  9 09:31:08 2003
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Printout
 #
-# $Id: lonprintout.pm,v 1.231 2003/09/06 17:22:27 albertel Exp $
+# $Id: lonprintout.pm,v 1.232 2003/09/09 13:31:08 sakharuk Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -715,14 +715,17 @@
 		    my %form;
 		    $form{'grade_target'}='tex';
 		    $form{'textwidth'}=$LaTeXwidth;
+		    $form{'problem_split'}=$parmhash{'problem_stream_switch'};
+		    $form{'latex_type'}=$helper->{'VARS'}->{'LATEX_TYPE'};
 		    $form{'rndseed'}=$rndseed;
 		    my $texversion=&Apache::lonnet::ssi($urlp,%form);
 		    if($helper->{'VARS'}->{'ANSWER_TYPE'} eq 'no') {
 			my %form;
 			$form{'grade_target'}='answer';
 			$form{'answer_output_mode'}='tex';
-			$form{'latex_type'}=$helper->{'VARS'}->{'LATEX_TYPE'};
 			$form{'rndseed'}=$rndseed;
+                        if ($urlp=~/\/res\//) {$ENV{'request.state'}='published';}
+			####my $answer=' SSSSSS '.$ENV{'request.state'}.' FFFFFFF ';
 			my $answer=&Apache::lonnet::ssi($urlp,%form);
 			$texversion=~s/(\\keephidden{ENDOFPROBLEM})/$answer$1/;
 		    }
@@ -734,7 +737,7 @@
 		    if ($helper->{'VARS'}->{'TABLE_INDEX'} eq 'yes') {
 			$texversion=&IndexCreation($texversion,$urlp);
 		    }
-		    if ($helper->{'VARS'}->{'CONSTR_RESOURSE_URL'} eq 'yes') {
+		    if ($helper->{'VARS'}->{'CONSTR_RESOURSE_URpL'} eq 'yes') {
 			$texversion=~s/(\\addcontentsline\{toc\}\{subsection\}\{[^\}]*\})/$1 URL: \\verb|$urlp| \\strut\\\\\\strut /;
 		    }
 		    $result.=$texversion;