--- loncom/interface/lonprintout.pm 2002/10/29 13:42:14 1.84 +++ loncom/interface/lonprintout.pm 2002/11/14 15:39:35 1.87 @@ -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.87 2002/11/14 15:39:35 sakharuk Exp $ # # Copyright Michigan State University Board of Trustees # @@ -92,13 +92,13 @@ sub menu_for_output { Current document $title_for_single_resource (prints what you just saw on the screen)
ENDMENUOUT1 - if ((not $ENV{'request.role'}=~m/^au\./) and (not $ENV{'request.role'}=~m/^ca\./)) { + if ($ENV{'form.postdata'}=~/\/res\//) { $r->print(< All problems from $title_for_sequence
All problems plus any pages or html/xml files from $title_for_sequence
ENDMENUOUT2 } - if ($ENV{'request.role'}=~m/^cc\./ or $ENV{'request.role'}=~m/^in\./ or $ENV{'request.role'}=~m/^ta\./) { + if (($ENV{'request.role'}=~m/^cc\./ or $ENV{'request.role'}=~m/^in\./ or $ENV{'request.role'}=~m/^ta\./) and ($ENV{'form.postdata'}=~/\/res\//)) { $r->print(< All problems in this course (warning: this may be time consuming)

@@ -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; }