--- loncom/interface/lonprintout.pm 2009/12/16 11:06:48 1.567 +++ loncom/interface/lonprintout.pm 2010/02/25 04:37:28 1.568.4.1 @@ -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.4.1 2010/02/25 04:37:28 raeburn 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'}; @@ -3375,7 +3381,7 @@ ALL_PROBLEMS 'multichoice="1" addstatus="1" closeallpages="1"', 'RESOURCES', 'PRINT_FORMATTING', - '', + $map, $isProblem, '', $symbFilter, $start_new_option); $resource_selector .= <