--- loncom/interface/lonprintout.pm 2018/12/29 23:24:40 1.666 +++ loncom/interface/lonprintout.pm 2020/02/29 16:05:30 1.671 @@ -1,7 +1,7 @@ # The LearningOnline Network # Printout # -# $Id: lonprintout.pm,v 1.666 2018/12/29 23:24:40 raeburn Exp $ +# $Id: lonprintout.pm,v 1.671 2020/02/29 16:05:30 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -847,8 +847,9 @@ sub set_font_size { if ($font_size ne '') { $text =~ s/\\begin\{document}/\\begin{document}{\\$font_size/; + $text =~ s/\\end\{document}/}\\end{document}/; + } - $text =~ s/\\end\{document}/}\\end{document}/; return $text; @@ -1233,7 +1234,7 @@ sub is_valid_alpha_code { sub is_code_valid { my ($code_value, $code_option) = @_; my ($code_type, $code_length) = ('letter', 6); # defaults. - my @lines = &Apache::grades::get_scantronformat_file(); + my @lines = &Apache::lonnet::get_scantronformat_file(); foreach my $line (@lines) { my ($name, $type, $length) = (split(/:/, $line))[0,2,4]; if($name eq $code_option) { @@ -2078,9 +2079,10 @@ sub unsupported { $currentURL=~s|^http://https://|https://|; my $title=&Apache::lonnet::gettitle($symb); $title = &Apache::lonxml::latex_special_symbols($title); - $result.=' \strut \\\\ '.$title.' \strut \\\\ '.$currentURL.' '; + my $url = &Apache::lonxml::latex_special_symbols($currentURL); + $result.=' \strut \\\\ '.$title.' \strut \\\\ '.$url.' '; } else { - $result.=$currentURL; + $result.= &Apache::lonxml::latex_special_symbols($currentURL); } $result.= '\vskip 0.5mm\noindent\makebox[\textwidth/$number_of_columns][b]{\hrulefill} \end{document}'; return $result; @@ -3233,7 +3235,7 @@ ENDPART my $single_code = $helper->{'VARS'}->{'SINGLE_CODE'}; my $selected_code = $helper->{'VARS'}->{'CODE_SELECTED_FROM_LIST'}; my $code_option=$helper->{'VARS'}->{'CODE_OPTION'}; - my @lines = &Apache::grades::get_scantronformat_file(); + my @lines = &Apache::lonnet::get_scantronformat_file(); my ($code_type,$code_length,$bubbles_per_row)=('letter',6,10); foreach my $line (@lines) { chomp($line); @@ -4081,10 +4083,11 @@ sub printHelper { } if ($env{'form.url'}) { $helper->{VARS}->{'symb'} = &Apache::lonnet::symbread($helper->{VARS}->{'postdata'}); - } - $helper->{VARS}->{'symb'}= - &Apache::lonenc::check_encrypt($helper->{VARS}->{'symb'}); + if ($helper->{VARS}->{'symb'} ne '') { + $helper->{VARS}->{'symb'}= + &Apache::lonenc::check_encrypt($helper->{VARS}->{'symb'}); + } my ($resourceTitle,$sequenceTitle,$mapTitle) = &details_for_menu($helper); if ($sequenceTitle ne '') {$helper->{VARS}->{'assignment'}=$sequenceTitle;} @@ -4519,7 +4522,7 @@ ALL_PROBLEMS } - my @lines = &Apache::grades::get_scantronformat_file(); + my @lines = &Apache::lonnet::get_scantronformat_file(); my $codechoice=''; foreach my $line (@lines) { next if (($line =~ /^\#/) || ($line eq '')); @@ -4825,7 +4828,7 @@ CHOOSE_FROM_ANY_SEQUENCE my $xmlfrag = << "FONT_SELECTION"; - + return 'normalsize';