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

foxr foxr@source.lon-capa.org
Mon, 16 Nov 2009 11:13:24 -0000


foxr		Mon Nov 16 11:13:24 2009 EDT

  Modified files:              
    /loncom/interface	lonprintout.pm 
  Log:
  Fix last? slip up with .page printing.
  
  
Index: loncom/interface/lonprintout.pm
diff -u loncom/interface/lonprintout.pm:1.563 loncom/interface/lonprintout.pm:1.564
--- loncom/interface/lonprintout.pm:1.563	Tue Oct 27 10:17:18 2009
+++ loncom/interface/lonprintout.pm	Mon Nov 16 11:13:24 2009
@@ -2,7 +2,7 @@
 # The LearningOnline Network
 # Printout
 #
-# $Id: lonprintout.pm,v 1.563 2009/10/27 10:17:18 foxr Exp $
+# $Id: lonprintout.pm,v 1.564 2009/11/16 11:13:24 foxr Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -1539,9 +1539,9 @@
 
     # First is the overall page description.  This is then followed by the 
     # components of the page. Each of which must be printed independently.
-
     my $the_page = shift(@page_resources); 
 
+
     foreach my $resource (@page_resources) {
 	my $resource_src   = $resource->src(); # Essentially the URL of the resource.
 	$result           .= $resource->title() . '\\\\';
@@ -2106,7 +2106,8 @@
 		$form{'latex_type'}=$helper->{'VARS'}->{'LATEX_TYPE'};
 		if ($currentURL=~/\/syllabus$/) {$currentURL=~s/\/res//;}
 		$resources_printed .= $currentURL.':';
-		my $texversion=&ssi_with_retries($currentURL, $ssi_retry_count, %form);
+		my $texversion = &print_latex_header($helper->{'VARS'}->{'LATEX_TYPE'});
+		$texversion .= &ssi_with_retries($currentURL, $ssi_retry_count, %form);
 		if ($helper->{'VARS'}->{'PRINT_ANNOTATIONS'} eq 'yes') {
 		    my $annotation = &annotate($currentURL);
 		    $texversion    =~ s/(\\end{document})/$annotation$1/;
@@ -2199,7 +2200,7 @@
 		    $result.="\\newpage\n";
 		}
 	    }
-    my ($sequence,$middle_thingy,$urlp)=&Apache::lonnet::decode_symb($master_seq[$i]);
+	    my ($sequence,$middle_thingy,$urlp)=&Apache::lonnet::decode_symb($master_seq[$i]);
 	    $urlp=&Apache::lonnet::clutter($urlp);
 	    $form{'symb'}=$master_seq[$i];
 
@@ -2212,7 +2213,7 @@
 		&& $urlp=~/\.(problem|exam|quiz|assess|survey|form|library|page|xml|html|htm|xhtml|xhtm)$/) {
 		$resources_printed .= $urlp.':';
 		&Apache::lonxml::remember_problem_counter();
-		
+		$texversion.=&print_latex_header($helper->{'VARS'}->{'LATEX_TYPE'});  # RF
 		$texversion.=&ssi_with_retries($urlp, $ssi_retry_count, %form);
 		if ($urlp=~/\.page$/) {
 		    ($texversion,my $number_of_columns_page) = &page_cleanup($texversion);
@@ -2286,7 +2287,8 @@
 		$form{'latex_type'}=$helper->{'VARS'}->{'LATEX_TYPE'};
 		if ($urlp=~/\/syllabus$/) {$urlp=~s/\/res//;}
 		$resources_printed .= $urlp.':';
-		my $texversion=&ssi_with_retries($urlp, $ssi_retry_count, %form);
+		my $texversion = &print_latex_header($helper->{'VARS'}->{'LATEX_TYPE'});
+		$texversion .= &ssi_with_retries($urlp, $ssi_retry_count, %form);
 		if ($helper->{'VARS'}->{'PRINT_ANNOTATIONS'} eq 'yes') {
 		    my $annotation = &annotate($urlp);
 		    $texversion =~ s/(\\end{document)/$annotation$1/;