Diff for /loncom/interface/lonprintout.pm between versions 1.554.2.2 and 1.555

version 1.554.2.2, 2009/06/22 09:26:01 version 1.555, 2009/06/17 15:27:14
Line 70  my $ssi_last_error;  # The error text fr Line 70  my $ssi_last_error;  # The error text fr
 my $ssi_retry_count = 5; # Some arbitrary value.  my $ssi_retry_count = 5; # Some arbitrary value.
   
   
 #  Font size:  
   
 my $font_size = 'normalsize'; # Default is normalsize...  
   
   
 # Fetch the contents of a resource, uninterpreted.  # Fetch the contents of a resource, uninterpreted.
 # This is used here to fetch a latex file to be included  # This is used here to fetch a latex file to be included
Line 118  sub annotate { Line 114  sub annotate {
     return $result;      return $result;
 }  }
   
 #  
 #   Set a global document font size:  
 #   This is done by replacing \begin{document}  
 #   with \begin{document}{\some-font-directive  
 #   and \end{document} with  
 #   }\end{document  
 #  
 sub set_font_size {  
   
     my ($text) = @_;  
   
     $text =~ s/\\begin{document}/\\begin{document}{\\$font_size/;  
     $text =~ s/\\end{document}/}\\end{document}/;  
     return $text;  
   
   
 }  
   
 # include_pdf - PDF files are included into the   # include_pdf - PDF files are included into the 
 # output as follows:  # output as follows:
 #  - The PDF, if necessary, is replicated.  #  - The PDF, if necessary, is replicated.
Line 1519  sub output_data { Line 1497  sub output_data {
     my %parmhash = %$rparmhash;      my %parmhash = %$rparmhash;
     $ssi_error = 0; # This will be set nonzero by failing ssi's.      $ssi_error = 0; # This will be set nonzero by failing ssi's.
     $resources_printed = '';      $resources_printed = '';
     $font_size = $helper->{'VARS'}->{'fontsize'};  
     my $do_postprocessing = 1;      my $do_postprocessing = 1;
     my $js = <<ENDPART;      my $js = <<ENDPART;
 <script type="text/javascript">  <script type="text/javascript">
Line 2245  ENDPART Line 2222  ENDPART
     $URLback=~s|^/~|/priv/|;      $URLback=~s|^/~|/priv/|;
  }   }
     }      }
     #  
     # Final adjustment of the font size:  
     #  
   
     $result = set_font_size($result);  
   
 #-- writing .tex file in prtspool   #-- writing .tex file in prtspool 
     my $temp_file;      my $temp_file;
Line 3261  CHOOSE_FROM_ANY_SEQUENCE Line 3233  CHOOSE_FROM_ANY_SEQUENCE
  &addMessage('<br />'   &addMessage('<br />'
                    .'<h3>'.&mt('Print Options').'</h3>'                     .'<h3>'.&mt('Print Options').'</h3>'
                    .&Apache::lonhtmlcommon::start_pick_box()                     .&Apache::lonhtmlcommon::start_pick_box()
   #                  .&Apache::lonhtmlcommon::row_headline()
   #                  .'<h3>'.&mt('Print Options').'</h3>'
   #                  .&Apache::lonhtmlcommon::row_closure()
                    .&Apache::lonhtmlcommon::row_title(                     .&Apache::lonhtmlcommon::row_title(
                        '<label for="ANSWER_TYPE_forminput">'                         '<label for="ANSWER_TYPE_forminput">'
                       .&mt('Print Answers')                        .&mt('Print Answers')
Line 3278  CHOOSE_FROM_ANY_SEQUENCE Line 3253  CHOOSE_FROM_ANY_SEQUENCE
         Apache::lonhelper::dropdown->new();          Apache::lonhelper::dropdown->new();
  &addMessage(&Apache::lonhtmlcommon::row_closure());   &addMessage(&Apache::lonhtmlcommon::row_closure());
  $startedTable = 1;   $startedTable = 1;
   
 #  
 #  Select font size.  
 #  
   
             $helper->declareVar('fontsize');  
             &addMessage(&Apache::lonhtmlcommon::row_title(&mt('Font Size')));  
             my $xmlfrag = << "FONT_SELECTION";  
   
             
             <dropdown variable='fontsize' multichoice='0', allowempty='0'>  
             <defaultvalue>  
   return 'normalsize';  
             </defaultvalue>  
             <choice computer='tiny'>Tiny</choice>  
             <choice computer='sub/superscriptsize'>Script Size</choice>  
             <choice computer='footnotesize'>Footnote Size</choice>  
             <choice computer='small'>Small</choice>  
             <choice computer='normalsize'>Normal (default)</choice>  
             <choice computer='large'>larger than normal</choice>  
             <choice computer='Large'>Even larger than normal</choice>  
             <choice computer='LARGE'>Still larger than normal</choice>  
             <choice computer='huge'>huge font size</choice>  
             <choice computer='Huge'>Largest possible size</choice>  
             </dropdown>  
 FONT_SELECTION  
             &Apache::lonxml::xmlparse($r, 'helper', $xmlfrag);  
             &addMessage(&Apache::lonhtmlcommon::row_closure(1));  
     }      }
   
     if ($perm{'pav'}) {      if ($perm{'pav'}) {
Line 3405  FONT_SELECTION Line 3352  FONT_SELECTION
     $paramHash->{'multichoice'} = "true";      $paramHash->{'multichoice'} = "true";
     $paramHash->{'allowempty'}  = "true";      $paramHash->{'allowempty'}  = "true";
     $paramHash->{'variable'}   = "showallfoils";      $paramHash->{'variable'}   = "showallfoils";
     $paramHash->{'CHOICES'} = [ ["Show all foils", "1"] ];      $paramHash->{'CHOICES'} = [ [&mt('Show All Foils'), "1"] ];
     Apache::lonhelper::choices->new();      Apache::lonhelper::choices->new();
             &addMessage(&Apache::lonhtmlcommon::row_closure(1));              &addMessage(&Apache::lonhtmlcommon::row_closure(1));
  }   }
Line 3442  FONT_SELECTION Line 3389  FONT_SELECTION
 .qq|<a href="javascript:openbrowser('helpform','style_file_forminput','sty')">|  .qq|<a href="javascript:openbrowser('helpform','style_file_forminput','sty')">|
 .$selectfiletext.'</a>'  .$selectfiletext.'</a>'
             .&Apache::lonhtmlcommon::row_closure()              .&Apache::lonhtmlcommon::row_closure()
             .&Apache::lonhtmlcommon::row_title(&mt('Show all foils'))              .&Apache::lonhtmlcommon::row_title(&mt('Show All Foils'))
             .'</message>              .'</message>
      <choices allowempty="1" multichoice="true" variable="showallfoils">       <choices allowempty="1" multichoice="true" variable="showallfoils">
                 <choice computer="1">&nbsp;</choice>                  <choice computer="1">&nbsp;</choice>
Line 3471  FONT_SELECTION Line 3418  FONT_SELECTION
  </dropdown>   </dropdown>
 PROBTYPE  PROBTYPE
             &Apache::lonxml::xmlparse($r, 'helper', $xmlfrag);              &Apache::lonxml::xmlparse($r, 'helper', $xmlfrag);
       
             &addMessage(&Apache::lonhtmlcommon::row_closure(1));              &addMessage(&Apache::lonhtmlcommon::row_closure(1));
   
   
   
         }          }
     }      }
   
Line 3584  sub render { Line 3530  sub render {
     my $pdfFormLabel=&mt('PDF-Formfields');      my $pdfFormLabel=&mt('PDF-Formfields');
     my $with=&mt('with Formfields');      my $with=&mt('with Formfields');
     my $without=&mt('without Formfields');      my $without=&mt('without Formfields');
       
   
     $result.='<h3>'.&mt('Layout Options').'</h3>'      $result.='<h3>'.&mt('Layout Options').'</h3>'
             .&Apache::loncommon::start_data_table()              .&Apache::loncommon::start_data_table()
             .&Apache::loncommon::start_data_table_header_row()              .&Apache::loncommon::start_data_table_header_row()

Removed from v.1.554.2.2  
changed lines
  Added in v.1.555


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