[LON-CAPA-cvs] cvs: loncom /interface lonprintout.pm
foxr
foxr@source.lon-capa.org
Mon, 25 Apr 2011 16:59:54 -0000
foxr Mon Apr 25 16:59:54 2011 EDT
Modified files:
/loncom/interface lonprintout.pm
Log:
Kill off div by zero problem for CODE prints with PDF's by section.
Index: loncom/interface/lonprintout.pm
diff -u loncom/interface/lonprintout.pm:1.586 loncom/interface/lonprintout.pm:1.587
--- loncom/interface/lonprintout.pm:1.586 Fri Mar 11 05:01:36 2011
+++ loncom/interface/lonprintout.pm Mon Apr 25 16:59:54 2011
@@ -2,7 +2,7 @@
# The LearningOnline Network
# Printout
#
-# $Id: lonprintout.pm,v 1.586 2011/03/11 05:01:36 raeburn Exp $
+# $Id: lonprintout.pm,v 1.587 2011/04/25 16:59:54 foxr Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -2705,8 +2705,9 @@
my ($type) = split(/_/,$helper->{'VARS'}->{'PRINT_TYPE'});
&adjust_number_to_print($helper);
my $number_per_page=$helper->{'VARS'}->{'NUMBER_TO_PRINT'};
- if ($number_per_page eq '0' || $number_per_page eq 'all') {
- $number_per_page=$num_todo;
+ if ($number_per_page eq '0' || $number_per_page eq 'all'
+ || $number_per_page eq 'section') {
+ $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');