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

sakharuk lon-capa-cvs@mail.lon-capa.org
Fri, 30 Apr 2004 17:50:29 -0000


sakharuk		Fri Apr 30 13:50:29 2004 EDT

  Modified files:              
    /loncom/interface	lonprintout.pm 
  Log:
  Changes to print url for unsupported resource in sequence in a more reasonable way.
  
  
Index: loncom/interface/lonprintout.pm
diff -u loncom/interface/lonprintout.pm:1.296 loncom/interface/lonprintout.pm:1.297
--- loncom/interface/lonprintout.pm:1.296	Fri Apr 30 13:18:42 2004
+++ loncom/interface/lonprintout.pm	Fri Apr 30 13:50:29 2004
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Printout
 #
-# $Id: lonprintout.pm,v 1.296 2004/04/30 17:18:42 sakharuk Exp $
+# $Id: lonprintout.pm,v 1.297 2004/04/30 17:50:29 sakharuk Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -683,7 +683,7 @@
     } else {
 	$result.=$currentURL;
     }
-    $result.=' \end{document}';
+    $result.= '\vskip 0.5mm\noindent\makebox[\textwidth/$number_of_columns][b]{\hrulefill} \end{document}';
     return $result;
 }
 
@@ -920,8 +920,9 @@
 	    if ($selectionmade==7) {$helper->{VARS}->{'assignment'}=$assignment;}
 	    if ($i==0) {$prevassignment=$assignment;}
 	    #&Apache::lonnet::logthis("Trying to get $urlp with symb $master_seq[$i]");
+	    my $texversion='';
 	    if ($urlp=~/\.(problem|exam|quiz|assess|survey|form|library|page|xml|html|htm|xhtml|xhtm)$/) {
-		my $texversion.=&Apache::lonnet::ssi($urlp,%form);
+		$texversion.=&Apache::lonnet::ssi($urlp,%form);
 		if ($urlp=~/\.page$/) {
 		    ($texversion,my $number_of_columns_page) = &page_cleanup($texversion);
 		    if ($number_of_columns_page > $number_of_columns) {$number_of_columns=$number_of_columns_page;} 
@@ -972,7 +973,14 @@
 		$result .= $texversion;
 		$flag_latex_header_remove = 'YES';   
 	    } else {
-		$result.=&unsupported($urlp);
+		$texversion=&unsupported($urlp);
+		if ($flag_latex_header_remove ne 'NO') {
+		    $texversion = &latex_header_footer_remove($texversion);
+		} else {
+		    $texversion =~ s/\\end{document}//;
+		}
+		$result .= $texversion;
+		$flag_latex_header_remove = 'YES';   
 	    }	    
 	}
 	&Apache::lonnet::delenv('form.counter');