version 1.18, 2002/03/21 16:15:34
|
version 1.19, 2002/03/21 18:46:15
|
Line 70 sub menu_for_output {
|
Line 70 sub menu_for_output {
|
<input type="hidden" name="url" value="$ENV{'form.postdata'}"> |
<input type="hidden" name="url" value="$ENV{'form.postdata'}"> |
<input type="radio" name="choice" value="Standard LaTeX output for current document"> Current document |
<input type="radio" name="choice" value="Standard LaTeX output for current document"> Current document |
(you will print what you see on the screen)<br /> |
(you will print what you see on the screen)<br /> |
<input type="radio" name="choice" value="Standard LaTeX output for the primary sequence"> Standard LaTeX output for the primary sequence<br /> |
<input type="radio" name="choice" value="Standard LaTeX output for the primary sequence"> All problems from the primary sequence<br /> |
<input type="radio" name="choice" value="Standard LaTeX output for the top level sequence"> All documents from the top level sequence<br /> |
<input type="radio" name="choice" value="Standard LaTeX output for the top level sequence"> All problems from the top level sequence<br /> |
<br /><hr /><br /> |
<br /><hr /><br /> |
<h1>And what page format do you prefer?</h1> |
<h1>And what page format do you prefer?</h1> |
<input type="radio" name="layout" value="CBI" checked> CBI <br /> |
<input type="radio" name="layout" value="CBI" checked> CBI <br /> |
Line 155 ENDPART
|
Line 155 ENDPART
|
} |
} |
} elsif ($choice eq 'Standard LaTeX output for the top level sequence') { |
} elsif ($choice eq 'Standard LaTeX output for the top level sequence') { |
my @master_seq = (); |
my @master_seq = (); |
my $keyword = 0; |
my @add_file_seq = (); |
my $output_seq = ''; |
|
#-- where is the main sequence of the course? |
#-- where is the main sequence of the course? |
my $main_seq = '/res/'.$ENV{'request.course.uri'}; |
my $main_seq = '/res/'.$ENV{'request.course.uri'}; |
my $file=&Apache::lonnet::filelocation("",$main_seq); |
my $file=&Apache::lonnet::filelocation("",$main_seq); |
my $filecontents=&Apache::lonnet::getfile($file); |
my $filecontents=&Apache::lonnet::getfile($file); |
my @file_seq = &content_map($filecontents); |
my @file_seq = &content_map($filecontents); |
#-- temporary solution (without sequence inside sequence) - have to be generalized |
#-- do we have any other sequence inside? |
|
my $i=0; |
|
while ($i<=$#file_seq) { |
|
$_ = $file_seq[$i]; |
|
if (/\.sequence$/) { |
# if (defined @master_seq) { |
$file = &Apache::lonnet::filelocation("",$file_seq[$i]); |
# my $old_value = $#master_seq; |
$filecontents=&Apache::lonnet::getfile($file); |
# my $total_value = $#master_seq + $#file_seq +2; |
@add_file_seq = &content_map($filecontents); |
# for (my $j=0; $j<=$old_value-$keyword+1; $j++) { |
splice(@file_seq,$i,1,@add_file_seq); |
# $master_seq[$total_value-$j] = $master_seq[$old_value-$j]; |
@add_file_seq = (); |
# } |
$i = -1; |
# for (my $j=0; $j<=$#file_seq; $j++){ |
} |
# $master_seq[$keyword+$j] = $file_seq[$j]; |
$i++; |
# } |
} |
# @file_seq = (); |
@master_seq = @file_seq; |
# $keyword = 0; |
|
# } else { |
|
@master_seq = @file_seq; |
|
# @file_seq = (); |
|
# } |
|
|
|
#-- checking wether .sequence file is among the set of files |
|
# my $current_file = ''; |
|
# for (my $i=0; $i<=$#file_seq; $i++) { |
|
# $_ = $file_seq[$i]; |
|
# if (m/(.*)\.sequence/) { |
|
# $current_file = $_; |
|
# $keyword = $i; |
|
# last; |
|
# } |
|
# } |
|
|
|
#-- produce an output string |
#-- produce an output string |
for (my $i=0;$i<=$#master_seq;$i++) { |
for (my $i=0;$i<=$#master_seq;$i++) { |
$_ = $master_seq[$i]; |
$_ = $master_seq[$i]; |