--- loncom/interface/lonprintout.pm 2004/05/10 14:25:02 1.301
+++ loncom/interface/lonprintout.pm 2004/05/27 14:08:58 1.303
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Printout
#
-# $Id: lonprintout.pm,v 1.301 2004/05/10 14:25:02 sakharuk Exp $
+# $Id: lonprintout.pm,v 1.303 2004/05/27 14:08:58 sakharuk Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -421,13 +421,13 @@ sub page_format {
} elsif($papersize eq '6') {
if ($layout eq 'book') {
if ($numberofcolumns == 1) {
- $textwidth = '18 cm';
- $textheight = '28 cm';
+ $textwidth = '176 mm';
+ $textheight = '254 mm';
$oddoffset = '-0.57 in';
$evenoffset = '-0.57 in';
} elsif ($numberofcolumns == 2) {
- $textwidth = '96 mm';
- $textheight = '2 cm';
+ $textwidth = '91 mm';
+ $textheight = '254 mm';
$oddoffset = '-0.57 in';
$evenoffset = '-0.57 in';
}
@@ -1103,7 +1103,7 @@ ENDPART
if ($urlp =~ m|/home/([^/]+)/public_html|) {
$urlp =~ s|/home/([^/]*)/public_html|/~$1|;
} else {
- $urlp =~ s|^/home/httpd/html||;
+ $urlp =~ s|^$Apache::lonnet::perlvar{'lonDocRoot'}||;
}
my $texversion=&Apache::lonnet::ssi($urlp,%form);
if(($helper->{'VARS'}->{'ANSWER_TYPE'} eq 'no') ||
@@ -1231,6 +1231,7 @@ ENDPART
&Apache::lonnet::appenv('cgi.'.$identifier.'.file' => $filename,
'cgi.'.$identifier.'.layout' => $laystyle,
'cgi.'.$identifier.'.numcol' => $numberofcolumns,
+ 'cgi.'.$identifier.'.paper' => $papersize,
'cgi.'.$identifier.'.selection' => $selectionmade,
'cgi.'.$identifier.'tableofcontents' => $helper->{'VARS'}->{'TABLE_CONTENTS'},
'cgi.'.$identifier.'tableofindex' => $helper->{'VARS'}->{'TABLE_INDEX'},
@@ -1494,7 +1495,7 @@ sub printHelper {
# "Delete everything after the last slash."
$subdir =~ s|/[^/]+$||;
if (not $helper->{VARS}->{'construction'}) {
- $subdir='/home/httpd/html/res/'.$subdir;
+ $subdir=$Apache::lonnet::perlvar{'lonDocRoot'}.'/res/'.$subdir;
}
# "Remove all duplicate slashes."
$subdir =~ s|/+|/|g;
@@ -1693,7 +1694,7 @@ CHOOSE_ANON2
}
# FIXME: That RE should come from a library somewhere.
- if ((((&Apache::lonnet::allowed('bre',$subdir) eq 'F') and ($helper->{VARS}->{'postdata'}=~/\.(problem|exam|quiz|assess|survey|form|library|page|xml|html|htm|xhtml|xhtm)/)) or defined $helper->{'VARS'}->{'construction'}) and $ENV{'request.role.adv'} and $subdir ne '/home/httpd/html/res/') {
+ if ((((&Apache::lonnet::allowed('bre',$subdir) eq 'F') and ($helper->{VARS}->{'postdata'}=~/\.(problem|exam|quiz|assess|survey|form|library|page|xml|html|htm|xhtml|xhtm)/)) or defined $helper->{'VARS'}->{'construction'}) and $ENV{'request.role.adv'} and $subdir ne $Apache::lonnet::perlvar{'lonDocRoot'}.'/res/') {
push @{$printChoices}, ["".&mt('Problems')." ".&mt('from current subdirectory')." $subdir", 'problems_from_directory', 'CHOOSE_FROM_SUBDIR'];
my $f = '$filename';