--- rat/lonpage.pm 2015/07/17 19:11:03 1.111 +++ rat/lonpage.pm 2016/08/10 04:37:32 1.111.2.2 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Page Handler # -# $Id: lonpage.pm,v 1.111 2015/07/17 19:11:03 raeburn Exp $ +# $Id: lonpage.pm,v 1.111.2.2 2016/08/10 04:37:32 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -192,7 +192,7 @@ sub handler { my $now = time; my ($pagefirstaccess,%hastimeleft,%countdowndisp); my ($pagesymb,$courseid,$domain,$name)=&Apache::lonnet::whichuser(); - if (($pagesymb && ($courseid ne '') && ($domain ne '') && ($name ne '')) { + if ($pagesymb && ($courseid ne '') && ($domain ne '') && ($name ne '')) { my %times=&Apache::lonnet::get('firstaccesstimes', [$courseid."\0".$pagesymb], $domain,$name); @@ -315,8 +315,8 @@ ENDEXT my $output=Apache::lonnet::ssi($src,%posthash); $output=~s|//(\s*)?\s||gs; if (($target eq 'tex') || ($target eq 'tex_answer')) { - $output =~ s/^([^&]+)\\begin{document}//; - $output =~ s/\\end{document}//; + $output =~ s/^([^&]+)\\begin\{document}//; + $output =~ s/\\end\{document}//; # $output = '\parbox{\minipagewidth}{ '.$output.' }'; #some additional cleanup necessary for LateX (due to limitations of table environment $output =~ s/(\\vskip\s*\d+mm)\s*(\\\\)+/$1/g;