[LON-CAPA-cvs] cvs: loncom(bz2851) /interface lonprintout.pm
foxr
foxr@source.lon-capa.org
Mon, 26 Oct 2009 09:55:32 -0000
This is a MIME encoded message
--foxr1256550932
Content-Type: text/plain
foxr Mon Oct 26 09:55:32 2009 EDT
Modified files: (Branch: bz2851)
/loncom/interface lonprintout.pm
Log:
Removed debug logging.
--foxr1256550932
Content-Type: text/plain
Content-Disposition: attachment; filename="foxr-20091026095532.txt"
Index: loncom/interface/lonprintout.pm
diff -u loncom/interface/lonprintout.pm:1.560.2.6 loncom/interface/lonprintout.pm:1.560.2.7
--- loncom/interface/lonprintout.pm:1.560.2.6 Tue Oct 13 11:01:16 2009
+++ loncom/interface/lonprintout.pm Mon Oct 26 09:55:32 2009
@@ -1,10 +1,8 @@
#
-
-
# The LearningOnline Network
# Printout
#
-# $Id: lonprintout.pm,v 1.560.2.6 2009/10/13 11:01:16 foxr Exp $
+# $Id: lonprintout.pm,v 1.560.2.7 2009/10/26 09:55:32 foxr Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -92,7 +90,6 @@
$sort_choice,
$variable,
$next_state) = @_;
- &Apache::lonnet::logthis("Student chooser next state: $next_state, this state: $this_state");
my $result = <<CHOOSE_STUDENTS;
<state name="$this_state" title="Select Students and Resources">
<message><b>Select sorting order of printout</b> </message>
@@ -148,7 +145,6 @@
$value_func,
$start_new_option) = @_;
- &Apache::lonnet::logthis("Top URL = $top_url");
my $result = <<CHOOSE_RESOURCES;
<state name="$this_state" title="$prompt_text">
<resource variable="$variable" $resource_options
@@ -1746,7 +1742,7 @@
# A reference to a page break hash.
#
#
-use Data::Dumper;
+# use Data::Dumper;
#sub dump_helper_vars {
# my ($helper) = @_;
# my $helpervars = Dumper($helper->{'VARS'});
@@ -2164,7 +2160,6 @@
} elsif (($helper->{'VARS'}->{'PRINT_TYPE'} eq 'map_problems_pages') or
($helper->{'VARS'}->{'PRINT_TYPE'} eq 'map_resources_in_page'))
{
- &Apache::lonnet::logthis("Selectionmade => 3");
$selectionmade = 3;
} elsif (($helper->{'VARS'}->{'PRINT_TYPE'} eq 'all_problems')
) {
@@ -2208,7 +2203,6 @@
$urlp=&Apache::lonnet::clutter($urlp);
$form{'symb'}=$master_seq[$i];
- &Apache::lonnet::logthis("Element $i Sequence $sequence Middle $middle_thingy URLP $urlp");
my $assignment=&Apache::lonxml::latex_special_symbols(&Apache::lonnet::gettitle($sequence),'header'); #title of the assignment which contains this problem
if ($selectionmade==7) {$helper->{VARS}->{'assignment'}=$assignment;}
@@ -2216,17 +2210,11 @@
my $texversion='';
if ($urlp!~m|^/adm/|
&& $urlp=~/\.(problem|exam|quiz|assess|survey|form|library|page|xml|html|htm|xhtml|xhtm)$/) {
- &Apache::lonnet::logthis("Problem");
$resources_printed .= $urlp.':';
&Apache::lonxml::remember_problem_counter();
- &Apache::lonnet::logthis("Fetching tex for $urlp");
- my $debug = Dumper(%form);
- &Apache::lonnet::logthis("Form: $debug");
$texversion.=&ssi_with_retries($urlp, $ssi_retry_count, %form);
- &Apache::lonnet::logthis("texversion so far: $texversion");
if ($urlp=~/\.page$/) {
- &Apache::lonnet::logthis("Special page actions");
($texversion,my $number_of_columns_page) = &page_cleanup($texversion);
if ($number_of_columns_page > $number_of_columns) {$number_of_columns=$number_of_columns_page;}
$texversion =~ s/\\end{document}\d*/\\end{document}/;
@@ -2248,7 +2236,6 @@
$texversion=~s/(\\keephidden{ENDOFPROBLEM})/$answer$1/;
} else {
if ($urlp=~/\.(problem|exam|quiz|assess|survey|form|library)$/) {
- &Apache::lonnet::logthis("problem printing");
$texversion=&print_latex_header($helper->{'VARS'}->{'LATEX_TYPE'});
$texversion =~ s/\\begin{document}//;
my $title = &Apache::lonnet::gettitle($master_seq[$i]);
@@ -2270,9 +2257,7 @@
}
if ($flag_latex_header_remove ne 'NO') {
- &Apache::lonnet::logthis("Removing header/footer 1");
$texversion = &latex_header_footer_remove($texversion);
- &Apache::lonnet::logthis("With h/f removed we have: $texversion");
} else {
$texversion =~ s/\\end{document}//;
}
@@ -2296,7 +2281,6 @@
}
}
$result .= $texversion;
- &Apache::lonnet::logthis("About to set rem header true with $result");
$flag_latex_header_remove = 'YES';
} elsif ($urlp=~/\/(smppg|syllabus|aboutme|bulletinboard)$/) {
$form{'latex_type'}=$helper->{'VARS'}->{'LATEX_TYPE'};
@@ -2309,7 +2293,6 @@
}
if ($flag_latex_header_remove ne 'NO') {
- &Apache::lonnet::logthis("Removing header & footer 2");
$texversion = &latex_header_footer_remove($texversion);
} else {
$texversion =~ s/\\end{document}/\\vskip 0\.5mm\\noindent\\makebox\[\\textwidth\/\$number_of_columns\]\[b\]\{\\hrulefill\}/;
@@ -2337,7 +2320,6 @@
$texversion=&unsupported($urlp,$helper->{'VARS'}->{'LATEX_TYPE'},
$master_seq[$i]);
if ($flag_latex_header_remove ne 'NO') {
- &Apache::lonnet::logthis("Removing header/footer 3");
$texversion = &latex_header_footer_remove($texversion);
} else {
$texversion =~ s/\\end{document}//;
@@ -2401,7 +2383,6 @@
$helper->{'VARS'}->{'NUMBER_TO_PRINT'} = $#students+1;
}
my @master_seq=split /\|\|\|/, $helper->{'VARS'}->{'RESOURCES'};
- &Apache::lonnet::logthis("RESOURCES: ". $helper->{'VARS'}->{'RESOURCES'});
#loop over students
@@ -2605,7 +2586,6 @@
$newurlp=&path_to_problem($newurlp,$LaTeXwidth);
$texversion =~ s/(\\begin{minipage}{\\textwidth})/$1 $newurlp/;
if ($flag_latex_header_remove ne 'NO') {
- &Apache::lonnet::logthis("Removing header/footer: 4");
$texversion = &latex_header_footer_remove($texversion);
} else {
$texversion =~ s/\\end{document}//;
@@ -2810,10 +2790,8 @@
# so we will just rely on prntout.pl to strip ENDOFSTUDENTSTAMP from the
# postscript. Each ENDOFSTUDENTSTAMP will go on a line by itself.
#
- &Apache::lonnet::logthis("In print_resources");
foreach my $curresline (@{$master_seq}) {
- &Apache::lonnet::logthis("Res: $curresline");
if (defined $page_breaks{$curresline}) {
if($i != 0) {
$current_output.= "\\newpage\n";
@@ -2831,7 +2809,6 @@
&Apache::lonxml::remember_problem_counter();
my $rendered = &get_student_view_with_retries($curresline,$ssi_retry_count,$username,$userdomain,$env{'request.course.id'},'tex',$moreenv);
- &Apache::lonnet::logthis("student view: $rendered");
if(($helper->{'VARS'}->{'ANSWER_TYPE'} eq 'no') ||
($helper->{'VARS'}->{'ANSWER_TYPE'} eq 'only')) {
# Use a copy of the hash so we don't pervert it on future loop passes.
@@ -2859,14 +2836,13 @@
$rendered = $header.$body;
}
}
- &Apache::lonnet::logthis("After preprending header: $rendered");
if ($helper->{'VARS'}->{'PRINT_ANNOTATIONS'} eq 'yes') {
my $url = &Apache::lonnet::clutter($res_url);
my $annotation = &annotate($url);
$rendered =~ s/(\\keephidden{ENDOFPROBLEM})/$annotation$1/;
}
+ my $junk;
if ($remove_latex_header eq 'YES') {
- &Apache::lonnet::logthis("Removing header/footer: 5");
$rendered = &latex_header_footer_remove($rendered);
} else {
$rendered =~ s/\\end{document}//;
@@ -2881,7 +2857,6 @@
$annotation =~ s/(\\end{document})/$annotation$1/;
}
if ($remove_latex_header eq 'YES') {
- &Apache::lonnet::logthis("Removing header/footer: 6");
$rendered = &latex_header_footer_remove($rendered);
} else {
$rendered =~ s/\\end{document}//;
@@ -2891,14 +2866,12 @@
my $url = &Apache::lonnet::clutter($res_url);
my $rendered = &include_pdf($url);
if ($remove_latex_header ne 'NO') {
- &Apache::lonnet::logthis("Removing header/footer: 7");
$rendered = &latex_header_footer_remove($rendered);
}
$current_output .= $rendered;
} else {
my $rendered = &unsupported($res_url,$helper->{'VARS'}->{'LATEX_TYPE'},$curresline);
if ($remove_latex_header ne 'NO') {
- &Apache::lonnet::logthis("Removing header/footer: 8");
$rendered = &latex_header_footer_remove($rendered);
} else {
$rendered =~ s/\\end{document}//;
@@ -3151,7 +3124,6 @@
} else {
$url = $helper->{VARS}->{'postdata'};
$is_published=1; # From resource space.
- &Apache::lonnet::logthis("Resource url $url");
}
$url = &Apache::lonnet::clutter($url);
if (!$resourceTitle) { # if the resource doesn't have a title, use the filename
@@ -3277,7 +3249,6 @@
push @{$printChoices}, [&mt('Selected [_1]Resources[_2] from folder [_3]','<b>','</b>','<b><i>'.$sequenceTitle.'</i></b>'),
'map_problems_pages',
'CHOOSE_PROBLEMS_HTML'];
- &Apache::lonnet::logthis("Map url : $map");
my $helperFragment = &generate_resource_chooser('CHOOSE_PROBLEMS',
'Select Problem(s) to print',
'multichoice="1" toponly="1" addstatus="1" closeallpages="1"',
@@ -3388,7 +3359,7 @@
'RESOURCES',
'PRINT_FORMATTING',
'',
- $isProblem, , $symbFilter,
+ $isProblem, '', $symbFilter,
$start_new_option);
$resource_selector .= <<RESOURCE_SELECTOR;
<state name="PRINT_FORMATTING" title="How should results be printed?">
@@ -3516,7 +3487,6 @@
$url,
$isProblem, '', $symbFilter,
$start_new_option);
- &Apache::lonnet::logthis('XML for anonpage: '.$anon_page);
&Apache::lonxml::xmlparse($r, 'helper', $anon_page);
--foxr1256550932--