--- loncom/interface/lonprintout.pm 2011/12/26 13:47:18 1.610.2.1 +++ loncom/interface/lonprintout.pm 2011/12/21 21:25:40 1.611 @@ -1,7 +1,8 @@ + # The LearningOnline Network # Printout # -# $Id: lonprintout.pm,v 1.610.2.1 2011/12/26 13:47:18 foxr Exp $ +# $Id: lonprintout.pm,v 1.611 2011/12/21 21:25:40 www Exp $ # # Copyright Michigan State University Board of Trustees # @@ -40,7 +41,6 @@ use Apache::admannotations; use Apache::lonenc; use Apache::entities; use Apache::londefdef; -# use Apache::structurelags; # for language management. use File::Basename; @@ -660,29 +660,7 @@ 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. @@ -2900,7 +2878,7 @@ ENDPART ($helper->{'VARS'}->{'PRINT_ANNOTATIONS'} eq '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 $i = 0; my $last_section = (split(/:/,$students[0]))[2]; @@ -3015,7 +2993,7 @@ ENDPART $number_per_page=$num_todo > 0 ? $num_todo : 1; } 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; foreach my $code (sort(@allcodes)) { my $file_num=int($count/$number_per_page); @@ -3144,11 +3122,6 @@ ENDPART $result = set_font_size($result); - # Insert any babel headers required. - - $result = &collect_languages($result); - - #-- writing .tex file in prtspool my $temp_file; my $identifier = &Apache::loncommon::get_cgi_id();