Diff for /loncom/interface/lonprintout.pm between versions 1.666 and 1.670

version 1.666, 2018/12/29 23:24:40 version 1.670, 2020/02/17 13:40:16
Line 847  sub set_font_size { Line 847  sub set_font_size {
     if ($font_size ne '') {      if ($font_size ne '') {
   
  $text =~ s/\\begin\{document}/\\begin{document}{\\$font_size/;   $text =~ s/\\begin\{document}/\\begin{document}{\\$font_size/;
           $text =~ s/\\end\{document}/}\\end{document}/;
   
     }      }
     $text =~ s/\\end\{document}/}\\end{document}/;  
     return $text;      return $text;
   
   
Line 1233  sub is_valid_alpha_code { Line 1234  sub is_valid_alpha_code {
 sub is_code_valid {  sub is_code_valid {
     my ($code_value, $code_option) = @_;      my ($code_value, $code_option) = @_;
     my ($code_type, $code_length) = ('letter', 6); # defaults.      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) {      foreach my $line (@lines) {
  my ($name, $type, $length) = (split(/:/, $line))[0,2,4];   my ($name, $type, $length) = (split(/:/, $line))[0,2,4];
  if($name eq $code_option) {   if($name eq $code_option) {
Line 2075  sub unsupported { Line 2076  sub unsupported {
     my $result.= &print_latex_header($mode);      my $result.= &print_latex_header($mode);
     if ($currentURL=~m|^(/adm/wrapper/)?ext/|) {      if ($currentURL=~m|^(/adm/wrapper/)?ext/|) {
  $currentURL=~s|^(/adm/wrapper/)?ext/|http://|;   $currentURL=~s|^(/adm/wrapper/)?ext/|http://|;
         $currentURL=~s|^http://https://|https://|;          $currentURL=~s|^http://https://?|https://|;
  my $title=&Apache::lonnet::gettitle($symb);   my $title=&Apache::lonnet::gettitle($symb);
  $title = &Apache::lonxml::latex_special_symbols($title);   $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 {      } else {
  $result.=$currentURL;   $result.= &Apache::lonxml::latex_special_symbols($currentURL);
     }      }
     $result.= '\vskip 0.5mm\noindent\makebox[\textwidth/$number_of_columns][b]{\hrulefill} \end{document}';      $result.= '\vskip 0.5mm\noindent\makebox[\textwidth/$number_of_columns][b]{\hrulefill} \end{document}';
     return $result;      return $result;
Line 3233  ENDPART Line 3235  ENDPART
  my $single_code = $helper->{'VARS'}->{'SINGLE_CODE'};   my $single_code = $helper->{'VARS'}->{'SINGLE_CODE'};
  my $selected_code = $helper->{'VARS'}->{'CODE_SELECTED_FROM_LIST'};   my $selected_code = $helper->{'VARS'}->{'CODE_SELECTED_FROM_LIST'};
  my $code_option=$helper->{'VARS'}->{'CODE_OPTION'};   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);   my ($code_type,$code_length,$bubbles_per_row)=('letter',6,10);
  foreach my $line (@lines) {   foreach my $line (@lines) {
              chomp($line);               chomp($line);
Line 4081  sub printHelper { Line 4083  sub printHelper {
     }      }
     if ($env{'form.url'}) {      if ($env{'form.url'}) {
         $helper->{VARS}->{'symb'} = &Apache::lonnet::symbread($helper->{VARS}->{'postdata'});          $helper->{VARS}->{'symb'} = &Apache::lonnet::symbread($helper->{VARS}->{'postdata'});
   
     }      }
     $helper->{VARS}->{'symb'}=      if ($helper->{VARS}->{'symb'} ne '') {
  &Apache::lonenc::check_encrypt($helper->{VARS}->{'symb'});          $helper->{VARS}->{'symb'}=
       &Apache::lonenc::check_encrypt($helper->{VARS}->{'symb'});
       }
     my ($resourceTitle,$sequenceTitle,$mapTitle) = &details_for_menu($helper);      my ($resourceTitle,$sequenceTitle,$mapTitle) = &details_for_menu($helper);
     if ($sequenceTitle ne '') {$helper->{VARS}->{'assignment'}=$sequenceTitle;}      if ($sequenceTitle ne '') {$helper->{VARS}->{'assignment'}=$sequenceTitle;}
   
Line 4519  ALL_PROBLEMS Line 4522  ALL_PROBLEMS
   
  }   }
   
         my @lines = &Apache::grades::get_scantronformat_file();          my @lines = &Apache::lonnet::get_scantronformat_file();
  my $codechoice='';   my $codechoice='';
  foreach my $line (@lines) {   foreach my $line (@lines) {
             next if (($line =~ /^\#/) || ($line eq ''));              next if (($line =~ /^\#/) || ($line eq ''));
Line 4825  CHOOSE_FROM_ANY_SEQUENCE Line 4828  CHOOSE_FROM_ANY_SEQUENCE
             my $xmlfrag = << "FONT_SELECTION";              my $xmlfrag = << "FONT_SELECTION";
   
                       
             <dropdown variable='fontsize' multichoice='0', allowempty='0'>              <dropdown variable='fontsize' multichoice='0' allowempty='0'>
             <defaultvalue>              <defaultvalue>
   return 'normalsize';    return 'normalsize';
             </defaultvalue>              </defaultvalue>

Removed from v.1.666  
changed lines
  Added in v.1.670


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>