Diff for /loncom/interface/lonprintout.pm between versions 1.610.2.1 and 1.611

version 1.610.2.1, 2011/12/26 13:47:18 version 1.611, 2011/12/21 21:25:40
Line 1 Line 1
   
 # The LearningOnline Network  # The LearningOnline Network
 # Printout  # Printout
 #  #
Line 40  use Apache::admannotations; Line 41  use Apache::admannotations;
 use Apache::lonenc;  use Apache::lonenc;
 use Apache::entities;  use Apache::entities;
 use Apache::londefdef;  use Apache::londefdef;
 # use Apache::structurelags; # for language management.  
   
 use File::Basename;  use File::Basename;
   
Line 660  sub include_pdf { Line 660  sub include_pdf {
   
   
 }  }
 ##  
 #  Collect the various \select_language{language_name}  
 #  latex tags to build a \usepackage[lang-list]{babel} which will  
 #  appear just prior to the \begin{document} at the front of the concatenated  
 #  set of resources:  
 # @param doc - The string of latex to search/replace.  
 # @return string  
 # @retval - the modified document stringt.  
 #  
 sub collect_languages {  
     my $doc = shift;  
     my %languages;  
     while ($doc =~ /\\selectlanguage{(\w+)}/mg) {  
  $languages{$1} = 1; # allows us to request each language exactly once.  
     }  
     my @lang_list = (keys(%languages)); # List of unique languages  
     if (scalar @lang_list) {  
  my $babel_header = '\usepackage[' . join(',', @lang_list) .']{babel}'. "\n";  
  $doc =~ s/\\begin{document}/$babel_header\\begin{document}/;  
     }  
     return $doc;  
 }  
 #-------------------------------------------------------------------  
   
 #  #
 #   ssi_with_retries- Does the server side include of a resource.  #   ssi_with_retries- Does the server side include of a resource.
Line 2900  ENDPART Line 2878  ENDPART
      ($helper->{'VARS'}->{'PRINT_ANNOTATIONS'} eq 'yes')) {       ($helper->{'VARS'}->{'PRINT_ANNOTATIONS'} eq 'yes')) {
      $moreenv{'problem_split'}='yes';       $moreenv{'problem_split'}='yes';
  }   }
  my %prog_state=&Apache::lonhtmlcommon::Create_PrgWin($r,'Print Status','Class Print Status',$#students+1,'inline','75');   my %prog_state=&Apache::lonhtmlcommon::Create_PrgWin($r,$#students+1);
  my $student_counter=-1;   my $student_counter=-1;
  my $i = 0;   my $i = 0;
  my $last_section = (split(/:/,$students[0]))[2];   my $last_section = (split(/:/,$students[0]))[2];
Line 3015  ENDPART Line 2993  ENDPART
      $number_per_page=$num_todo > 0 ? $num_todo : 1;       $number_per_page=$num_todo > 0 ? $num_todo : 1;
  }   }
  my $flag_latex_header_remove = 'NO';    my $flag_latex_header_remove = 'NO'; 
  my %prog_state=&Apache::lonhtmlcommon::Create_PrgWin($r,'Print Status','Class Print Status',$num_todo,'inline','75');   my %prog_state=&Apache::lonhtmlcommon::Create_PrgWin($r,$num_todo);
  my $count=0;   my $count=0;
  foreach my $code (sort(@allcodes)) {   foreach my $code (sort(@allcodes)) {
      my $file_num=int($count/$number_per_page);       my $file_num=int($count/$number_per_page);
Line 3144  ENDPART Line 3122  ENDPART
   
     $result = set_font_size($result);      $result = set_font_size($result);
   
     # Insert any babel headers required.  
   
     $result       = &collect_languages($result);  
   
   
 #-- writing .tex file in prtspool   #-- writing .tex file in prtspool 
     my $temp_file;      my $temp_file;
     my $identifier = &Apache::loncommon::get_cgi_id();      my $identifier = &Apache::loncommon::get_cgi_id();

Removed from v.1.610.2.1  
changed lines
  Added in v.1.611


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