[LON-CAPA-cvs] cvs: loncom /interface lonprintout.pm
sakharuk
lon-capa-cvs@mail.lon-capa.org
Mon, 18 Nov 2002 14:35:26 -0000
sakharuk Mon Nov 18 09:35:26 2002 EDT
Modified files:
/loncom/interface lonprintout.pm
Log:
Corrections done in the printing from the construction space - now you can
redefine printing options: number of columns, papersize, and layuot.
Index: loncom/interface/lonprintout.pm
diff -u loncom/interface/lonprintout.pm:1.88 loncom/interface/lonprintout.pm:1.89
--- loncom/interface/lonprintout.pm:1.88 Thu Nov 14 15:02:00 2002
+++ loncom/interface/lonprintout.pm Mon Nov 18 09:35:25 2002
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Printout
#
-# $Id: lonprintout.pm,v 1.88 2002/11/14 20:02:00 sakharuk Exp $
+# $Id: lonprintout.pm,v 1.89 2002/11/18 14:35:25 sakharuk Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -420,14 +420,14 @@
my $laystyle = 'book';
my $assignment = $ENV{'form.assignment'};
if ($choice eq 'Subdirectory print') {
- $layout = 'CAPA';
- $papersize = 'Letter [8 1/2x11 in]';
- $numberofcolumns = 2;
+ if ($ENV{'form.layout'} eq '') {$layout = 'CAPA';}
+ if ($ENV{'form.papersize'} eq '') {$papersize = 'Letter [8 1/2x11 in]';}
+ if ($ENV{'form.numberofcolumns'} eq '') {$numberofcolumns = 2;}
}
if (($choice eq 'Standard LaTeX output for current document') && ($ENV{'request.role'}=~m/^au\./ or $ENV{'request.role'}=~m/^ca\./)) {
- $layout = 'CAPA';
- $papersize = 'Letter [8 1/2x11 in]';
- $numberofcolumns = 1;
+ if ($ENV{'form.layout'} eq '') {$layout = 'CAPA';}
+ if ($ENV{'form.papersize'} eq '') {$papersize = 'Letter [8 1/2x11 in]';}
+ if ($ENV{'form.numberofcolumns'} eq '') {$numberofcolumns = 2;}
}
my $result = '';
my $number_of_columns = 1; #used only for pages to determine the width of the cell
@@ -571,9 +571,9 @@
}
if ($current_output=~/\\documentclass/) {
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{}{{\\textbf{$fullname} $courseidinfo - $assignment}}\\begin{document} /;
+ $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\noindent\parbox{\minipagewidth}{\noindent\fbox{\textbf{'.$fullname.'}}\hskip 1.4in } \vskip 5 mm '.$current_output;
+ $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;
}
$result .= $current_output;
&Apache::lonnet::delenv('form.counter');