--- loncom/interface/lonprintout.pm 2002/10/29 13:42:14 1.84 +++ loncom/interface/lonprintout.pm 2002/11/14 14:47:53 1.86 @@ -1,7 +1,7 @@ # The LearningOnline Network # Printout # -# $Id: lonprintout.pm,v 1.84 2002/10/29 13:42:14 sakharuk Exp $ +# $Id: lonprintout.pm,v 1.86 2002/11/14 14:47:53 sakharuk Exp $ # # Copyright Michigan State University Board of Trustees # @@ -378,7 +378,7 @@ ENDPART $selectionmade = 1; my %moreenv; $moreenv{'form.grade_target'}='tex'; - if ($ENV{'request.role'}=~m/^au\./ or $ENV{'request.role'}=~m/^ca\./) { + if (&Apache::lonnet::allowed('bre',$ENV{'form.url'})) { $ENV{'form.url'}=~s/http:\/\/[^\/]+//; } $moreenv{'request.filename'}=$ENV{'form.url'}; @@ -518,7 +518,7 @@ ENDPART } if ($current_output=~/\\documentclass/) { my $courseidinfo = $ENV{'course.'.$ENV{'request.course.id'}.'.description'}; - $current_output =~ s/\\begin{document}/\\begin{document}\\noindent\\parbox{\\minipagewidth}{\\noindent{\\textbf{$ENV{'environment.firstname'} $ENV{'environment.lastname'}} $courseidinfo - $assignment}\\hskip 1\.4in } \\vskip 5 mm /; + $current_output =~ s/\\begin{document}/\\setlength{\\topmargin}{1cm}\\setlength{\\headheight}{1cm}\\setlength{\\headsep}{0.5cm}\\pagestyle{myheadings}\\markboth{}{{\\textbf{$fullname} $courseidinfo - $assignment}}\\begin{document} /; } else { $current_output = '\\vskip 3mm\noindent\parbox{\minipagewidth}{\noindent\fbox{\textbf{'.$fullname.'}}\hskip 1.4in } \vskip 5 mm '.$current_output; }