--- loncom/interface/lonprintout.pm 2016/08/09 23:43:48 1.649 +++ loncom/interface/lonprintout.pm 2016/12/06 03:28:29 1.651 @@ -1,7 +1,7 @@ # The LearningOnline Network # Printout # -# $Id: lonprintout.pm,v 1.649 2016/08/09 23:43:48 raeburn Exp $ +# $Id: lonprintout.pm,v 1.651 2016/12/06 03:28:29 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -1976,8 +1976,8 @@ sub latex_corrections { if ($result =~ m/&(\w+|#\d+);/) { $result = &character_chart($result); } - $result =~ s/(\\end{tabular})\s*\\vskip 0 mm/$1/g; - $result =~ s/(\\begin{enumerate})\s*\\noindent/$1/g; + $result =~ s/(\\end\{tabular})\s*\\vskip 0 mm/$1/g; + $result =~ s/(\\begin\{enumerate})\s*\\noindent/$1/g; return $result; } @@ -2586,7 +2586,7 @@ sub print_construction_sequence { $result .= $texversion; } } - if ($helper->{VARS}->{'construction'} eq '1') {$result=~s/(\\begin{document})/$1 \\fbox\{RANDOM SEED IS $rndseed\} /;} + if ($helper->{VARS}->{'construction'} eq '1') {$result=~s/(\\begin\{document})/$1 \\fbox\{RANDOM SEED IS $rndseed\} /;} return $result; } @@ -2743,7 +2743,7 @@ ENDPART $cleanURL=$currentURL; } $selectionmade = 1; - + if ($cleanURL!~m|^/adm/| && $cleanURL=~/\.(problem|exam|quiz|assess|survey|form|library|xml|html|htm|xhtml|xhtm)$/) { my $rndseed=time; @@ -2956,12 +2956,13 @@ ENDPART my $texversion=''; if ($urlp!~m|^/adm/| && $urlp=~/\.(problem|exam|quiz|assess|survey|form|library|page|xml|html|htm|xhtml|xhtm)$/) { + my $extension = $1; $resources_printed .= $urlp.':'; &Apache::lonxml::remember_problem_counter(); if ($flag_latex_header_remove eq 'NO') { $texversion.=&print_latex_header($helper->{'VARS'}->{'LATEX_TYPE'}); # RF unless (($helper->{'VARS'}->{'ANSWER_TYPE'} eq 'only') || - (($i==0) && + (($i==0) && ($extension !~ /^x?html?$/) && (($urlp=~/\.page$/) || ($print_type eq 'map_problems_in_page') || ($print_type eq 'map_resources_in_page')))) {