version 1.82, 2003/07/25 20:56:08
|
version 1.87, 2003/09/24 18:18:38
|
Line 303 sub displayfoils {
|
Line 303 sub displayfoils {
|
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]; |
my $status=$Apache::inputtags::status[-1]; |
if ( |
if ( ($target ne 'tex') && |
($target ne 'tex') && |
&Apache::response::show_answer() ) { |
(($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 437 sub displayfoils {
|
Line 436 sub displayfoils {
|
sub optionlist_correction { |
sub optionlist_correction { |
|
|
my $texoptionlist = shift; |
my $texoptionlist = shift; |
if ($texoptionlist=~/<option selected/) { |
if ($texoptionlist=~/<option selected/ or $texoptionlist=~/<option>[^<]+<\/option>/) { |
$texoptionlist =~ s/<option><\/option>/\\item \[\] Possible answers are:/; |
$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 623 sub end_foil {
|
Line 622 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 631 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; |
} |
} |