[LON-CAPA-cvs] cvs: loncom /interface lonprintout.pm
sakharuk
lon-capa-cvs@mail.lon-capa.org
Mon, 18 Nov 2002 15:20:56 -0000
sakharuk Mon Nov 18 10:20:56 2002 EDT
Modified files:
/loncom/interface lonprintout.pm
Log:
Fixed bugs 950,949. Resolved problem of printing assignment for a group of student - now everyone has its own physical set of paper sheets (no mixing or intersections). Guy I deliberately added one button to the students selection menu despite of the promise not to do this. The reasons are 1. Its the simplest workable solution; 2. It does not influence something else and I carefully tested its
functionslity on a lot of assignments; 3. Ed very wanted to have this and he was ready to put this feature in bugzilla as a bug. Nevertheless, I am ready to remove this small chunk of code as soon as you inform me about this. Waiting for your response.
Index: loncom/interface/lonprintout.pm
diff -u loncom/interface/lonprintout.pm:1.89 loncom/interface/lonprintout.pm:1.90
--- loncom/interface/lonprintout.pm:1.89 Mon Nov 18 09:35:25 2002
+++ loncom/interface/lonprintout.pm Mon Nov 18 10:20:56 2002
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Printout
#
-# $Id: lonprintout.pm,v 1.89 2002/11/18 14:35:25 sakharuk Exp $
+# $Id: lonprintout.pm,v 1.90 2002/11/18 15:20:56 sakharuk Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -357,7 +357,12 @@
}
}
$r->print(<<ENDMENUOUT2);
-<br />
+<br />Number of blank pages to add: <select name="addedpages"><option selected>0</option>
+ <option>1</option>
+ <option>2</option>
+ <option>3</option>
+ </select>
+<br />
<input type="hidden" name="papersize" value="$ENV{'form.papersize'}">
<input type="hidden" name="numberofstudents" value="$i">
<input type="hidden" name="phase" value="three">
@@ -389,6 +394,7 @@
<input type="hidden" name="numberoffiles" value="$ENV{'form.numberoffiles'}">
<input type="hidden" name="numberofcolumns" value="$ENV{'form.numberofcolumns'}">
<input type="hidden" name="assignment" value="$ENV{'form.assignment'}">
+<input type="hidden" name="addedpages" value="$ENV{'form.addedpages'}">
Define one column layout parameters: <br />
<b>Width</b>: <input type="text" name="width" width="8" value="9cm"> <br />
<b>Height</b>: <input type="text" name="height" width="8" value="25.9cm"> <br />
@@ -573,7 +579,9 @@
my $courseidinfo = $ENV{'course.'.$ENV{'request.course.id'}.'.description'};
$current_output =~ s/\\begin{document}/\\setlength{\\topmargin}{1cm}\\setlength{\\headheight}{1cm}\\setlength{\\headsep}{0.5cm}\\pagestyle{myheadings}\\markboth{}{{$courseidinfo - $assignment}}\\begin{document}\\noindent\\textit{\\textbf{$fullname}}\\vskip 3 mm /;
} else {
- $current_output = '\\vskip 3mm\\clearpage\\strut\\clearpage\setcounter{page}{1}\noindent\parbox{\minipagewidth}{\noindent\textit{\textbf{'.$fullname.'}}\hskip 1.4in } \vskip 5 mm '.$current_output;
+ my $blanspages = '';
+ for (my $j=0;$j<$ENV{'form.addedpages'};$j++) {$blanspages.='\clearpage\strut\clearpage';}
+ $current_output = '\\newline\\noindent\\makebox[\\textwidth/$number_of_columns][b]{\\hrulefill}\\newline\\noindent{\\tiny Printed from LON-CAPA\\copyright MSU{\\hfill} Licensed under GNU General Public License } \\vskip 3mm'.$blanspages.'\setcounter{page}{1}\noindent\parbox{\minipagewidth}{\noindent\textit{\textbf{'.$fullname.'}}\hskip 1.4in } \vskip 5 mm '.$current_output;
}
$result .= $current_output;
&Apache::lonnet::delenv('form.counter');