[LON-CAPA-cvs] cvs: loncom /interface lonprintout.pm
foxr
lon-capa-cvs@mail.lon-capa.org
Tue, 06 Jun 2006 11:02:40 -0000
foxr Tue Jun 6 07:02:40 2006 EDT
Modified files:
/loncom/interface lonprintout.pm
Log:
Insert STARTOFSTUDENTSTAMP and ENDOFSTUDENTSTAMP to bracket the postscript
output of a student. This is the first step to dealing with request 4786,
to mark the extent of a student in the postscript.
Index: loncom/interface/lonprintout.pm
diff -u loncom/interface/lonprintout.pm:1.439 loncom/interface/lonprintout.pm:1.440
--- loncom/interface/lonprintout.pm:1.439 Tue May 30 08:46:09 2006
+++ loncom/interface/lonprintout.pm Tue Jun 6 07:02:38 2006
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Printout
#
-# $Id: lonprintout.pm,v 1.439 2006/05/30 12:46:09 www Exp $
+# $Id: lonprintout.pm,v 1.440 2006/06/06 11:02:38 foxr Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -1812,6 +1812,18 @@
my %page_breaks = &get_page_breaks($helper);
my @format_array = split(/\|/,$helper->{'VARS'}->{'FORMAT'});
my $columns_in_format = $format_array[1];
+ #
+ # Bracket each student with a
+ # Special that allows the post processor to even out the page
+ # counts later. Nasty problem this... it would be really
+ # nice to put the special in as a postscript comment
+ # e.g. \special{ps:\%STARTOFSTUDENTSTAMP} unfortunately,
+ # The special gets passed the \ and dvips puts it in the output file
+ # so we'll just put STARTOFSTUDENTSTAMP in the postscript and rely
+ # on printout.pl to strip it...simlarly with ENDOFSTUDENTSTAMP.
+ # These will go on a line by themselves.
+ #
+ $current_output .= "\\special{ps:\nSTARTOFSTUDENTSTAMP\n}";
foreach my $curresline (@{$master_seq}) {
if (defined $page_breaks{$curresline}) {
@@ -1907,6 +1919,10 @@
$current_output = '\strut\vspace*{-6 mm}\\newline\\noindent\\makebox[\\textwidth/$number_of_columns][b]{\\hrulefill}\vspace*{-2 mm}\\newline\\noindent{\\tiny Printed from LON-CAPA\\copyright MSU{\\hfill} Licensed under GNU General Public License }\\newpage '.$blankpages.'\setcounter{page}{1}\noindent\parbox{\minipagewidth}{\noindent\\fancyhead[LO]{\\textit{\\textbf{'.$fullname.'}}'.$courseidinfo.' \\hfill \\thepage \\\\ \\textit{'.$currentassignment.'}'.$namepostfix.'}} \vskip 5 mm '.$current_output;
}
}
+ #
+ # Close the student bracketing.
+ #
+ $current_output .= "\\special{ps:\nENDOFSTUDENTSTAMP\n}";
return ($current_output,$fullname, $printed);
}