--- loncom/interface/lonprintout.pm 2006/07/03 12:59:58 1.454
+++ loncom/interface/lonprintout.pm 2006/07/07 21:55:05 1.456
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Printout
#
-# $Id: lonprintout.pm,v 1.454 2006/07/03 12:59:58 foxr Exp $
+# $Id: lonprintout.pm,v 1.456 2006/07/07 21:55:05 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -758,16 +758,16 @@ sub page_format_transformation {
my $name = &get_name();
my $courseidinfo = &get_course();
if (defined($courseidinfo)) { $courseidinfo=' - '.$courseidinfo }
- my $HeaderText = $parmhash{'print_header_format'};
- $HeaderText = &format_page_header($HeaderText, $assignment, $courseidinfo, $name);
- &Apache::lonnet::logthis("Header Format: $HeaderText");
+ my $header_text = $parmhash{'print_header_format'};
+ $header_text = &format_page_header($header_text, $assignment,
+ $courseidinfo, $name);
my $topmargintoinsert = '';
if ($topmargin ne '0') {$topmargintoinsert='\setlength{\topmargin}{'.$topmargin.'}';}
my $fancypagestatement='';
if ($numberofcolumns eq '2') {
- $fancypagestatement="\\fancyhead{}\\fancyhead[LO]{$HeaderText}";
+ $fancypagestatement="\\fancyhead{}\\fancyhead[LO]{$header_text}";
} else {
- $fancypagestatement="\\rhead{}\\chead{}\\lhead{$HeaderText}";
+ $fancypagestatement="\\rhead{}\\chead{}\\lhead{$header_text}";
}
if ($layout eq 'album') {
$text =~ s/\\begin{document}/\\setlength{\\oddsidemargin}{$oddoffset}\\setlength{\\evensidemargin}{$evenoffset}$topmargintoinsert\n\\setlength{\\textwidth}{$textwidth}\\setlength{\\textheight}{$textheight}\\setlength{\\textfloatsep}{8pt plus 2\.0pt minus 4\.0pt}\n\\newlength{\\minipagewidth}\\setlength{\\minipagewidth}{\\textwidth\/\$number_of_columns-0\.2cm}\\usepackage{fancyhdr}\\addtolength{\\headheight}{\\baselineskip}\n\\pagestyle{fancy}$fancypagestatement\\begin{document}\\voffset=-0\.8 cm\\setcounter{page}{1}\n /;
@@ -1296,7 +1296,7 @@ ENDPART
}
if ($helper->{VARS}->{'construction'} eq '1') {$result=~s/(\\begin{document})/$1 \\fbox\{RANDOM SEED IS $rndseed\} /;}
$result .= '\end{document}';
- } elsif ($cleanURL=~/\/(smppg|grppg|syllabus|aboutme|bulletinboard)$/) {
+ } elsif ($cleanURL=~/\/(smppg|syllabus|aboutme|bulletinboard)$/) {
$form{'latex_type'}=$helper->{'VARS'}->{'LATEX_TYPE'};
if ($currentURL=~/\/syllabus$/) {$currentURL=~s/\/res//;}
$resources_printed .= $currentURL.':';
@@ -1406,21 +1406,20 @@ ENDPART
my $courseidinfo = &get_course();
if (defined($courseidinfo)) { $courseidinfo=' - '.$courseidinfo }
$prevassignment=$assignment;
- my $HeaderText = $parmhash{'print_header_format'};
- $HeaderText = &format_page_header($HeaderText,
- $assignment,
- $courseidinfo,
- $name);
- &Apache::lonnet::logthis("Hdr Format $HeaderText");
+ my $header_text = $parmhash{'print_header_format'};
+ $header_text = &format_page_header($header_text,
+ $assignment,
+ $courseidinfo,
+ $name);
if ($numberofcolumns eq '1') {
- $result .='\newpage \noindent\parbox{\minipagewidth}{\noindent\\lhead{'.$HeaderText.'}} \vskip 5 mm ';
+ $result .='\newpage \noindent\parbox{\minipagewidth}{\noindent\\lhead{'.$header_text.'}} \vskip 5 mm ';
} else {
- $result .='\newpage \noindent\parbox{\minipagewidth}{\noindent\\fancyhead[LO]{'.$HeaderText.'}} \vskip 5 mm ';
+ $result .='\newpage \noindent\parbox{\minipagewidth}{\noindent\\fancyhead[LO]{'.$header_text.'}} \vskip 5 mm ';
}
}
$result .= $texversion;
$flag_latex_header_remove = 'YES';
- } elsif ($urlp=~/\/(smppg|grppg|syllabus|aboutme|bulletinboard)$/) {
+ } elsif ($urlp=~/\/(smppg|syllabus|aboutme|bulletinboard)$/) {
$form{'latex_type'}=$helper->{'VARS'}->{'LATEX_TYPE'};
if ($urlp=~/\/syllabus$/) {$urlp=~s/\/res//;}
$resources_printed .= $urlp.':';
@@ -1915,7 +1914,7 @@ sub print_resources {
$rendered =~ s/\\end{document}//;
}
$current_output .= $rendered;
- } elsif ($res_url=~/\/(smppg|grppg|syllabus|aboutme|bulletinboard)$/) {
+ } elsif ($res_url=~/\/(smppg|syllabus|aboutme|bulletinboard)$/) {
$printed .= $curresline.':';
my $rendered = &Apache::loncommon::get_student_view($curresline,$username,$userdomain,$env{'request.course.id'},'tex',$moreenv);
@@ -2241,7 +2240,7 @@ HELPERFRAGMENT
# If the user has pfo (print for otheres) allow them to print all
# problems and resources in the entier course, optionally for selected students
if ($perm{'pfo'} &&
- ($helper->{VARS}->{'postdata'}=~/\/res\// || $helper->{VARS}->{'postdata'}=~/\/(syllabus|smppg|grppg|aboutme|bulletinboard)$/)) {
+ ($helper->{VARS}->{'postdata'}=~/\/res\// || $helper->{VARS}->{'postdata'}=~/\/(syllabus|smppg|aboutme|bulletinboard)$/)) {
push @{$printChoices}, ['Problems from entire course', 'all_problems', 'ALL_PROBLEMS'];
push @{$printChoices}, ['Resources from entire course', 'all_resources', 'ALL_RESOURCES'];