version 1.173, 2003/05/15 13:32:02
|
version 1.175, 2003/05/15 14:55:24
|
Line 1041 sub character_chart {
|
Line 1041 sub character_chart {
|
sub page_format { |
sub page_format { |
my ($papersize,$layout,$numberofcolumns) = @_; |
my ($papersize,$layout,$numberofcolumns) = @_; |
my ($textwidth,$textheight,$oddoffset,$evenoffset) = (0,0,0,0); |
my ($textwidth,$textheight,$oddoffset,$evenoffset) = (0,0,0,0); |
|
|
|
|
if ($papersize=~/Letter/) { |
if ($papersize=~/Letter/) { |
if ($layout eq 'CAPA') { |
if ($layout eq 'CAPA') { |
if ($numberofcolumns == 1) { |
if ($numberofcolumns == 1) { |
Line 1511 ENDPART
|
Line 1513 ENDPART
|
$selectionmade = 6; |
$selectionmade = 6; |
my @list_of_files=split /\|\|\|/, $helper->{'VARS'}->{'FILES'}; |
my @list_of_files=split /\|\|\|/, $helper->{'VARS'}->{'FILES'}; |
@list_of_files=sort @list_of_files; |
@list_of_files=sort @list_of_files; |
my $flag_latex_header_remove = 'NO'; |
my $flag_latex_header_remove = 'NO'; |
|
my $rndseed=time; |
for (my $i=0;$i<=$#list_of_files;$i++) { |
for (my $i=0;$i<=$#list_of_files;$i++) { |
my $urlp = $list_of_files[$i]; |
my $urlp = $list_of_files[$i]; |
if ($urlp=~/\//) { |
if ($urlp=~/\//) { |
my %form; |
my %form; |
$form{'grade_target'}='tex'; |
$form{'grade_target'}='tex'; |
$form{'textwidth'}=$LaTeXwidth; |
$form{'textwidth'}=$LaTeXwidth; |
|
$form{'rndseed'}=$rndseed; |
if ($urlp =~ m|/home/([^/]+)/public_html|) { |
if ($urlp =~ m|/home/([^/]+)/public_html|) { |
$urlp =~ s|/home/([^/]*)/public_html|/~$1|; |
$urlp =~ s|/home/([^/]*)/public_html|/~$1|; |
} else { |
} else { |
$urlp =~ s|^/home/httpd/html||; |
$urlp =~ s|^/home/httpd/html||; |
} |
} |
my $texversion=&Apache::lonnet::ssi($urlp,%form); |
my $texversion=&Apache::lonnet::ssi($urlp,%form); |
|
if($helper->{'VARS'}->{'ANSWER_TYPE'} eq 'no') { |
|
my %form; |
|
$form{'grade_target'}='answer'; |
|
$form{'answer_output_mode'}='tex'; |
|
$form{'rndseed'}=$rndseed; |
|
my $answer=&Apache::lonnet::ssi($urlp,%form); |
|
$texversion=~s/(\\keephidden{ENDOFPROBLEM})/$answer$1/; |
|
} |
#this chunck is responsible for printing the path to problem |
#this chunck is responsible for printing the path to problem |
my $newurlp = ''; |
my $newurlp = ''; |
my $HowMany = length($urlp)*2; |
my $HowMany = length($urlp)*2; |
Line 1553 ENDPART
|
Line 1565 ENDPART
|
} |
} |
$flag_latex_header_remove = 'YES'; |
$flag_latex_header_remove = 'YES'; |
} |
} |
|
if ($helper->{VARS}->{'construction'} eq '1') {$result=~s/(\\typeout)/ RANDOM SEED IS $rndseed $1/;} |
$result .= '\end{document}'; |
$result .= '\end{document}'; |
} |
} |
#-------------------------------------------------------- corrections for the different page formats |
#-------------------------------------------------------- corrections for the different page formats |