version 1.350, 2005/01/05 12:07:27
|
version 1.351, 2005/01/10 11:46:03
|
Line 1014 ENDPART
|
Line 1014 ENDPART
|
my $flag_latex_header_remove = 'NO'; |
my $flag_latex_header_remove = 'NO'; |
my $flag_page_in_sequence = 'NO'; |
my $flag_page_in_sequence = 'NO'; |
my @master_seq=split /\|\|\|/, $helper->{'VARS'}->{'RESOURCES'}; |
my @master_seq=split /\|\|\|/, $helper->{'VARS'}->{'RESOURCES'}; |
my @page_breaks = split /\|\|\|/, $helper->{'VARS'}->{'FINISHPAGE'}; |
my %page_breaks; |
my $page_index = 0; |
foreach my $break (split /\|\|\|/, $helper->{'VARS'}->{'FINISHPAGE'}) { |
|
$page_breaks{$break} = 1; |
|
} |
my $prevassignment=''; |
my $prevassignment=''; |
&Apache::lonnet::delenv('form.counter'); |
&Apache::lonnet::delenv('form.counter'); |
&Apache::lonxml::init_counter(); |
&Apache::lonxml::init_counter(); |
Line 1024 ENDPART
|
Line 1026 ENDPART
|
# Note due to document structure, not allowed to put \newpage |
# Note due to document structure, not allowed to put \newpage |
# prior to the first resource |
# prior to the first resource |
|
|
if (($master_seq[$i] eq $page_breaks[$page_index])) { |
if (defined $page_breaks{$master_seq[$i]}) { |
$page_index++; |
|
if($i != 0) { |
if($i != 0) { |
$result.="\\newpage\n"; |
$result.="\\newpage\n"; |
} |
} |
Line 1425 sub print_resources {
|
Line 1426 sub print_resources {
|
$namepostfix="\\\\Name: "; |
$namepostfix="\\\\Name: "; |
$fullname = "CODE - ".$moreenv->{'CODE'}; |
$fullname = "CODE - ".$moreenv->{'CODE'}; |
} |
} |
my @page_breaks = split /\|\|\|/,$helper->{'VARS'}->{'FINISHPAGE'}; |
my %page_breaks; |
my $page_index = 0; |
foreach my $break (split /\|\|\|/,$helper->{'VARS'}->{'FINISHPAGE'}) { |
|
$page_breaks{$break} = 1; |
|
} |
my $i = 0; |
my $i = 0; |
#goes through all resources, checks if they are available for |
#goes through all resources, checks if they are available for |
#current student, and produces output |
#current student, and produces output |
&Apache::lonnet::delenv('form.counter'); |
&Apache::lonnet::delenv('form.counter'); |
&Apache::lonxml::init_counter(); |
&Apache::lonxml::init_counter(); |
foreach my $curresline (@{$master_seq}) { |
foreach my $curresline (@{$master_seq}) { |
if ($curresline eq $page_breaks[$page_index]) { |
if (defined $page_breaks{$curresline}) { |
# |
|
# Due to document structure, we cannot put a |
|
# page break prior to the first document |
|
# |
|
if($i != 0) { |
if($i != 0) { |
$current_output.= "\\newpage\n"; |
$current_output.= "\\newpage\n"; |
} |
} |
$page_index++; |
|
} |
} |
$i++; |
$i++; |
if ( !($type eq 'problems' && |
if ( !($type eq 'problems' && |