version 1.84, 2003/08/01 19:04:06
|
version 1.89, 2003/10/13 19:25:30
|
Line 302 sub displayfoils {
|
Line 302 sub displayfoils {
|
my $id=$Apache::inputtags::response[-1]; |
my $id=$Apache::inputtags::response[-1]; |
my $break; |
my $break; |
my $solved=$Apache::lonhomework::history{"resource.$part.solved"}; |
my $solved=$Apache::lonhomework::history{"resource.$part.solved"}; |
my $status=$Apache::inputtags::status[-1]; |
if ( ($target ne 'tex') && |
if ( |
&Apache::response::show_answer() ) { |
($target ne 'tex') && |
|
(($solved =~ /^correct/) || ($status eq 'SHOW_ANSWER')) ) { |
|
foreach $name (@whichopt) { |
foreach $name (@whichopt) { |
my $text=$Apache::response::foilgroup{$name.'.text'}; |
my $text=$Apache::response::foilgroup{$name.'.text'}; |
if ($text!~/^\s*$/) { |
if ($text!~/^\s*$/) { |
Line 438 sub optionlist_correction {
|
Line 436 sub optionlist_correction {
|
|
|
my $texoptionlist = shift; |
my $texoptionlist = shift; |
if ($texoptionlist=~/<option selected/ or $texoptionlist=~/<option>[^<]+<\/option>/) { |
if ($texoptionlist=~/<option selected/ or $texoptionlist=~/<option>[^<]+<\/option>/) { |
$texoptionlist =~ s/<option><\/option>/\\item \[\] Choose from: /; |
$texoptionlist =~ s/<option><\/option>/\\item \[\] Choices: /; |
$texoptionlist =~ s/<option>/\{\\bf /g; |
$texoptionlist =~ s/<option>/\{\\bf /g; |
$texoptionlist =~ s/<option selected="on">/\{\\bf /g; |
$texoptionlist =~ s/<option selected="on">/\{\\bf /g; |
$texoptionlist =~ s/<\/option>/\},/g; |
$texoptionlist =~ s/<\/option>/\},/g; |
Line 603 sub end_foil {
|
Line 601 sub end_foil {
|
my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$style)=@_; |
my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$style)=@_; |
my $text =''; |
my $text =''; |
my $result = ''; |
my $result = ''; |
if ($target eq 'web' || $target eq 'tex') { |
if ($target eq 'web' || $target eq 'tex' || $target eq 'analyze') { |
$text=&Apache::lonxml::endredirection; |
$text=&Apache::lonxml::endredirection; |
if ($target eq 'tex' and $Apache::lonhomework::type ne 'exam') { $text = '\vspace*{-2 mm}\item '.$text; } |
if ($target eq 'tex' and $Apache::lonhomework::type ne 'exam') { $text = '\vspace*{-2 mm}\item '.$text; } |
} |
} |
Line 623 sub end_foil {
|
Line 621 sub end_foil {
|
if ($target eq 'tex' and $Apache::lonhomework::type eq 'exam') { |
if ($target eq 'tex' and $Apache::lonhomework::type eq 'exam') { |
$Apache::response::conceptgroup{"$name.text"} = '\vskip 4 mm $\triangleright$ '.$text; |
$Apache::response::conceptgroup{"$name.text"} = '\vskip 4 mm $\triangleright$ '.$text; |
} else { |
} else { |
if ($target eq 'tex' and $Apache::lonhomework::type eq 'exam') { |
$Apache::response::conceptgroup{"$name.text"} = $text; |
$Apache::response::conceptgroup{"$name.text"} = ' $\triangleright$ '.$text; |
|
} else { |
|
$Apache::response::conceptgroup{"$name.text"} = $text; |
|
} |
|
} |
} |
$Apache::response::conceptgroup{"$name.location"} = $location; |
$Apache::response::conceptgroup{"$name.location"} = $location; |
} else { |
} else { |
Line 636 sub end_foil {
|
Line 630 sub end_foil {
|
if ($target eq 'tex' and $Apache::lonhomework::type eq 'exam') { |
if ($target eq 'tex' and $Apache::lonhomework::type eq 'exam') { |
$Apache::response::foilgroup{"$name.text"} = '\vskip 5 mm $\triangleright$ '.$text; |
$Apache::response::foilgroup{"$name.text"} = '\vskip 5 mm $\triangleright$ '.$text; |
} else { |
} else { |
if ($target eq 'tex' and $Apache::lonhomework::type eq 'exam') { |
$Apache::response::foilgroup{"$name.text"} = $text; |
$Apache::response::foilgroup{"$name.text"} = ' $\triangleright$ '.$text; |
|
} else { |
|
$Apache::response::foilgroup{"$name.text"} = $text; |
|
} |
|
} |
} |
$Apache::response::foilgroup{"$name.location"} = $location; |
$Apache::response::foilgroup{"$name.location"} = $location; |
} |
} |