--- loncom/interface/lonprintout.pm 2008/08/25 10:16:27 1.537 +++ loncom/interface/lonprintout.pm 2008/09/05 09:09:38 1.538 @@ -1,7 +1,7 @@ # The LearningOnline Network # Printout # -# $Id: lonprintout.pm,v 1.537 2008/08/25 10:16:27 foxr Exp $ +# $Id: lonprintout.pm,v 1.538 2008/09/05 09:09:38 onken Exp $ # # Copyright Michigan State University Board of Trustees # @@ -280,6 +280,13 @@ sub format_page_header { # to \% else LaTeX will think they are comments and terminate # the line.. which is bad!!! + # If the user has role author, $course and $assignment are empty so + # there is '\\ \\ ' in the page header. That's cause a error in LaTeX + if($format =~ /\\\\\s\\\\\s/) { + #TODO find sensible caption for page header + my $testPrintout = '\\\\'.&mt('Construction Space').' \\\\'.&mt('Test-Printout '); + $format =~ s/\\\\\s\\\\\s/$testPrintout/; + } return $format;