--- loncom/interface/lonprintout.pm 2003/05/15 19:11:26 1.177 +++ loncom/interface/lonprintout.pm 2003/05/15 20:42:16 1.181 @@ -1,7 +1,7 @@ # The LearningOnline Network # Printout # -# $Id: lonprintout.pm,v 1.177 2003/05/15 19:11:26 sakharuk Exp $ +# $Id: lonprintout.pm,v 1.181 2003/05/15 20:42:16 sakharuk Exp $ # # Copyright Michigan State University Board of Trustees # @@ -667,11 +667,11 @@ ENDPART } my $courseidinfo = $ENV{'course.'.$ENV{'request.course.id'}.'.description'}; if ($current_output=~/\\documentclass/) { - $current_output =~ s/\\begin{document}/\\setlength{\\topmargin}{1cm}\\usepackage{fancyhdr}\\pagestyle{fancy}\\rhead{}\\chead{} \\begin{document}\\noindent\\lhead{\\textit{\\textbf{$fullname}} - $courseidinfo \\hfill \\thepage \\\\ \\textit{$assignment}}\\vskip 3 mm /; + $current_output =~ s/\\begin{document}/\\setlength{\\topmargin}{1cm} \\begin{document}\\noindent\\lhead{\\textit{\\textbf{$fullname}} - $courseidinfo \\hfill \\thepage \\\\ \\textit{$helper->{VARS}->{'assignment'}}}\\vskip 3 mm /; } else { my $blanspages = ''; for (my $j=0;$j<$helper->{'VARS'}->{'EMPTY_PAGES'};$j++) {$blanspages.='\clearpage\strut\clearpage';} - $current_output = '\strut\\newline\\noindent\\makebox[\\textwidth/$number_of_columns][b]{\\hrulefill}\\newline\\noindent{\\tiny Printed from LON-CAPA\\copyright MSU{\\hfill} Licensed under GNU General Public License }\\newpage \\vskip 3mm'.$blanspages.'\setcounter{page}{1}\noindent\parbox{\minipagewidth}{\noindent\\lhead{\\textit{\\textbf{'.$fullname.'}} - '.$courseidinfo.' \\hfill \\thepage \\\\ \\textit{'.$assignment.'}}\hskip 1.4in } \vskip 5 mm '.$current_output; + $current_output = '\strut\\newline\\noindent\\makebox[\\textwidth/$number_of_columns][b]{\\hrulefill}\\newline\\noindent{\\tiny Printed from LON-CAPA\\copyright MSU{\\hfill} Licensed under GNU General Public License }\\newpage '.$blanspages.'\setcounter{page}{1}\noindent\parbox{\minipagewidth}{\noindent\\lhead{\\textit{\\textbf{'.$fullname.'}} - '.$courseidinfo.' \\hfill \\thepage \\\\ \\textit{'.$helper->{VARS}->{'assignment'}.'}}} \vskip -5 mm '.$current_output; } $result .= $current_output; &Apache::lonnet::delenv('form.counter'); @@ -842,6 +842,7 @@ sub printHelper { $helper->declareVar('postdata'); $helper->declareVar('filename'); $helper->declareVar('construction'); + $helper->declareVar('assignment'); # This will persistently load in the data we want from the # very first screen. @@ -871,7 +872,7 @@ sub printHelper { } my ($resourceTitle,$sequenceTitle,$mapTitle) = &details_for_menu; - $helper->{VARS}->{'assignment'} = $sequenceTitle; + if ($sequenceTitle ne '') {$helper->{VARS}->{'assignment'}=$sequenceTitle;} # Extract map @@ -904,7 +905,6 @@ sub printHelper { $subdir='/home/httpd/html/res/'.$subdir; } - # What can be printed is a very dynamic decision based on # lots of factors. So we need to dynamically build this list. # To prevent security leaks, states are only added to the wizard