[LON-CAPA-cvs] cvs: loncom /interface lonprintout.pm
albertel
lon-capa-cvs@mail.lon-capa.org
Sat, 13 Nov 2004 09:27:47 -0000
albertel Sat Nov 13 04:27:47 2004 EDT
Modified files:
/loncom/interface lonprintout.pm
Log:
- BUG#3594 when reprinting a set of saved CODEs you had to specify the number f saved codes in order for it not to ISE
Index: loncom/interface/lonprintout.pm
diff -u loncom/interface/lonprintout.pm:1.335 loncom/interface/lonprintout.pm:1.336
--- loncom/interface/lonprintout.pm:1.335 Sat Nov 13 04:18:52 2004
+++ loncom/interface/lonprintout.pm Sat Nov 13 04:27:47 2004
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Printout
#
-# $Id: lonprintout.pm,v 1.335 2004/11/13 09:18:52 albertel Exp $
+# $Id: lonprintout.pm,v 1.336 2004/11/13 09:27:47 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -1096,20 +1096,13 @@
my $num_todo=$helper->{'VARS'}->{'NUMBER_TO_PRINT_TOTAL'};
my $code_name=$helper->{'VARS'}->{'ANON_CODE_STORAGE_NAME'};
my $old_name=$helper->{'VARS'}->{'REUSE_OLD_CODES'};
- my @master_seq=split /\|\|\|/, $helper->{'VARS'}->{'RESOURCES'};
- my ($type) = split(/_/,$helper->{'VARS'}->{'PRINT_TYPE'});
- 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;
- }
- my $flag_latex_header_remove = 'NO';
my %moreenv = ('textwidth' => &get_textwidth($helper,$LaTeXwidth));
- my %prog_state=&Apache::lonhtmlcommon::Create_PrgWin($r,'Print Status','Class Print Status',$num_todo,'inline','75');
my $seed=time+($$<<16)+($$);
my @allcodes;
if ($old_name) {
my %result=&Apache::lonnet::get('CODEs',[$old_name],$cdom,$cnum);
@allcodes=split(',',$result{$old_name});
+ $num_todo=scalar(@allcodes);
} else {
my %allcodes;
srand($seed);
@@ -1123,6 +1116,14 @@
}
@allcodes=keys(%allcodes);
}
+ my @master_seq=split /\|\|\|/, $helper->{'VARS'}->{'RESOURCES'};
+ my ($type) = split(/_/,$helper->{'VARS'}->{'PRINT_TYPE'});
+ 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;
+ }
+ my $flag_latex_header_remove = 'NO';
+ my %prog_state=&Apache::lonhtmlcommon::Create_PrgWin($r,'Print Status','Class Print Status',$num_todo,'inline','75');
my $count=0;
foreach my $code (sort(@allcodes)) {
my $file_num=int($count/$number_per_page);