--- loncom/interface/lonprintout.pm 2009/12/16 11:06:48 1.567 +++ loncom/interface/lonprintout.pm 2009/12/21 12:11:51 1.568 @@ -2,7 +2,7 @@ # The LearningOnline Network # Printout # -# $Id: lonprintout.pm,v 1.567 2009/12/16 11:06:48 foxr Exp $ +# $Id: lonprintout.pm,v 1.568 2009/12/21 12:11:51 foxr Exp $ # # Copyright Michigan State University Board of Trustees # @@ -2805,6 +2805,7 @@ sub print_resources { # so we will just rely on prntout.pl to strip ENDOFSTUDENTSTAMP from the # postscript. Each ENDOFSTUDENTSTAMP will go on a line by itself. # + my $syllabus_first = 0; foreach my $curresline (@{$master_seq}) { if (defined $page_breaks{$curresline}) { if($i != 0) { @@ -2863,8 +2864,10 @@ sub print_resources { } $current_output .= $rendered; } elsif ($res_url=~/\/(smppg|syllabus|aboutme|bulletinboard)$/) { + if ($i == 1) { + $syllabus_first = 1; + } $printed .= $curresline.':'; - my $rendered = &get_student_view_with_retries($curresline,$ssi_retry_count,$username,$userdomain,$env{'request.course.id'},'tex',$moreenv); if ($helper->{'VARS'}->{'PRINT_ANNOTATIONS'} eq 'yes') { my $url = &Apache::lonnet::clutter($res_url); @@ -2908,8 +2911,11 @@ sub print_resources { my $header_start = ($columns_in_format == 1) ? '\lhead' : '\fancyhead[LO]'; $header_line = $header_start.'{'.$header_line.'}'; - if ($current_output=~/\\documentclass/) { + if ($current_output=~/\\documentclass/ && (!$syllabus_first)) { $current_output =~ s/\\begin{document}/\\setlength{\\topmargin}{1cm} \\begin{document}\\noindent\\parbox{\\minipagewidth}{\\noindent$header_line$namepostfix}\\vskip 5 mm /; + } elsif ($syllabus_first) { + + $current_output =~ s/\\\\ Last updated:/Last updated:/ } else { my $blankpages = '\clearpage\strut\clearpage'x$helper->{'VARS'}->{'EMPTY_PAGES'};