[LON-CAPA-cvs] cvs: loncom /interface lonprintout.pm
sakharuk
lon-capa-cvs@mail.lon-capa.org
Wed, 20 Nov 2002 17:26:52 -0000
sakharuk Wed Nov 20 12:26:52 2002 EDT
Modified files:
/loncom/interface lonprintout.pm
Log:
My own small bug is fixed coupled with the absence of the assignment name in output.
Index: loncom/interface/lonprintout.pm
diff -u loncom/interface/lonprintout.pm:1.92 loncom/interface/lonprintout.pm:1.93
--- loncom/interface/lonprintout.pm:1.92 Tue Nov 19 10:45:25 2002
+++ loncom/interface/lonprintout.pm Wed Nov 20 12:26:52 2002
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Printout
#
-# $Id: lonprintout.pm,v 1.92 2002/11/19 15:45:25 sakharuk Exp $
+# $Id: lonprintout.pm,v 1.93 2002/11/20 17:26:52 sakharuk Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -107,7 +107,7 @@
}
my $subdirtoprint = &Apache::lonnet::filelocation("",$ENV{'form.url'});
$subdirtoprint =~ s/\/[^\/]+$//;
- if ((&Apache::lonnet::allowed('bre',$subdirtoprint) eq 'F') and ($ENV{'form.postdata'}=~/\.(problem|exam|quiz|assess|survey|form|library|page|xml|html|htm|xhtml|xhtm)$/)) {
+ if ((&Apache::lonnet::allowed('bre',$subdirtoprint) eq 'F') and ($ENV{'form.postdata'}=~/\.(problem|exam|quiz|assess|survey|form|library|page|xml|html|htm|xhtml|xhtm)/)) {
$r->print(<<ENDMENUOUT4);
<input type="radio" name="choice" value="Subdirectory print"> Problems from current subdirectory <b>$subdir_to_print</b><br />
ENDMENUOUT4
@@ -165,6 +165,7 @@
<input type="hidden" name="choice" value="$ENV{'form.choice'}">
<input type="hidden" name="layout" value="$ENV{'form.layout'}">
<input type="hidden" name="papersize" value="$ENV{'form.papersize'}">
+<input type="hidden" name="assignment" value="$ENV{'form.assignment'}">
<input type="hidden" name="numberofcolumns" value="$ENV{'form.numberofcolumns'}">
<h1>Mark item(s) which you want to print</h1>
<script>
@@ -465,7 +466,7 @@
($result,$number_of_columns) = &page_cleanup($result);
}
} else{
- $result='\documentclass[letterpaper]{article}\usepackage{calc}\begin{document}You are trying to print eather sequence or something simular. Currently this option is not supported. Sorry for the inconvenience. Bye.\end{document}'
+ $result='\documentclass[letterpaper]{article}\usepackage{calc}\begin{document}You are trying to print eather sequence or something simular. Currently this option is not supported. Sorry for the inconvenience. Bye. Your current URL is '.$ENV{'form.url'}.' \end{document}'
}
} elsif ($choice eq 'Standard LaTeX output for the primary sequence' or
$choice eq 'Standard LaTeX output for whole primary sequence') {
@@ -1173,7 +1174,7 @@
sub page_format_transformation {
my ($papersize,$layout,$numberofcolumns,$choice,$text,$assignment) = @_;
my ($textwidth,$textheight,$oddoffset,$evenoffset) = &page_format($papersize,$layout,$numberofcolumns);
- my $courseidinfo = $ENV{'course.'.$ENV{'request.course.id'}.'.description'};
+ my $courseidinfo = $ENV{'course.'.$ENV{'request.course.id'}.'.description'};
if ($layout eq 'CBI') {
$text =~ s/\\begin{document}/\\setlength{\\oddsidemargin}{$oddoffset}\\setlength{\\evensidemargin}{$evenoffset}\\setlength{\\topmargin}{200pt}\\setlength{\\textwidth}{$textwidth}\\setlength{\\textheight}{$textheight}\\setlength{\\parindent}{20pt}\\setlength{\\marginparwidth}{90pt}\\setlength{\\textfloatsep}{8pt plus 2\.0pt minus 4\.0pt}\\newlength{\\minipagewidth}\\setlength{\\minipagewidth}{\\textwidth\/\$number_of_columns-0\.2cm} \\begin{document}\\setcounter{page}{1}\\noindent\\parbox{\\minipagewidth}{\\noindent\\fbox{\\textbf{$ENV{'environment.firstname'} $ENV{'environment.lastname'}}} \\hfill $courseidinfo} \\vskip 5 mm /;
} elsif ($layout eq 'CAPA') {