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

sakharuk lon-capa-cvs@mail.lon-capa.org
Mon, 28 Jun 2004 19:08:23 -0000


sakharuk		Mon Jun 28 15:08:23 2004 EDT

  Modified files:              
    /loncom/interface	lonprintout.pm 
  Log:
  Bug 2732 (printing from mutiple sequences -- first seq misidentified in printout header) is fixed, at least partly. Instead of the title for particulat sequence I now print "Problems from the Whole Course". My first desire was to put the names of particular sequences from which the resources were printed but it's appears difficult to do this. Indeed, you can print a set of problems (each one from different sequence) and you end up with the choice: eather to print every problem from new page (a lot of paper is used) or put only one (first) title above the page content. I think the better solution - to use style file for printing info about sequence before every problem. I'll try to construct such style file as example. 
  
  
Index: loncom/interface/lonprintout.pm
diff -u loncom/interface/lonprintout.pm:1.311 loncom/interface/lonprintout.pm:1.312
--- loncom/interface/lonprintout.pm:1.311	Mon Jun 28 14:12:30 2004
+++ loncom/interface/lonprintout.pm	Mon Jun 28 15:08:22 2004
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Printout
 #
-# $Id: lonprintout.pm,v 1.311 2004/06/28 18:12:30 sakharuk Exp $
+# $Id: lonprintout.pm,v 1.312 2004/06/28 19:08:22 sakharuk Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -472,9 +472,13 @@
 }
 
 sub page_format_transformation {
-    my ($papersize,$layout,$numberofcolumns,$choice,$text,$assignment,$tableofcontents,$indexlist) = @_; 
+    my ($papersize,$layout,$numberofcolumns,$choice,$text,$assignment,$tableofcontents,$indexlist,$selectionmade) = @_; 
     my ($textwidth,$textheight,$oddoffset,$evenoffset,$topmargin);
-    $assignment=&Apache::lonxml::latex_special_symbols($assignment,'header');
+    if ($selectionmade eq '4') {
+	$assignment='Problems from the Whole Course';
+    } else {
+	$assignment=&Apache::lonxml::latex_special_symbols($assignment,'header');
+    }
     ($textwidth,$textheight,$oddoffset,$evenoffset,$topmargin) = &page_format($papersize,$layout,$numberofcolumns,$topmargin);
     my $name = &get_name();
     my $courseidinfo = &get_course();
@@ -1170,7 +1174,7 @@
 	$result .= '\end{document}';      	
     }
 #-------------------------------------------------------- corrections for the different page formats
-    $result = &page_format_transformation($papersize,$laystyle,$numberofcolumns,$helper->{'VARS'}->{'PRINT_TYPE'},$result,$helper->{VARS}->{'assignment'},$helper->{'VARS'}->{'TABLE_CONTENTS'},$helper->{'VARS'}->{'TABLE_INDEX'});
+    $result = &page_format_transformation($papersize,$laystyle,$numberofcolumns,$helper->{'VARS'}->{'PRINT_TYPE'},$result,$helper->{VARS}->{'assignment'},$helper->{'VARS'}->{'TABLE_CONTENTS'},$helper->{'VARS'}->{'TABLE_INDEX'},$selectionmade);
     $result = &latex_corrections($number_of_columns,$result);
     for (my $i=1;$i<=$#print_array;$i++) {$print_array[$i] = &latex_corrections($number_of_columns,$print_array[$i]);}
     #changes page's parameters for the one column output