version 1.58, 2002/10/25 19:02:38
|
version 1.62, 2002/12/02 17:06:08
|
Line 345 sub displayfoils {
|
Line 345 sub displayfoils {
|
my $result; |
my $result; |
|
|
my ($answer,@whichfoils)=&whichfoils($max,$randomize); |
my ($answer,@whichfoils)=&whichfoils($max,$randomize); |
if ($Apache::lonhomework::history{"resource.$Apache::inputtags::part.solved"} =~ /^correct/ || ($Apache::inputtags::status[-1] eq 'SHOW_ANSWER')) { |
my $part=$Apache::inputtags::part; |
|
my $solved=$Apache::lonhomework::history{"resource.$part.solved"}; |
|
my $status=$Apache::inputtags::status[-1]; |
|
if ( ($target ne 'tex') && |
|
(($solved =~ /^correct/) || ($status eq 'SHOW_ANSWER')) ) { |
foreach my $name (@whichfoils) { |
foreach my $name (@whichfoils) { |
if ($target ne 'tex') { |
if ($target ne 'tex') { |
$result.="<br />"; |
$result.="<br />"; |
} else { |
} else { |
$result.='\vskip 0 mm \item '; |
$result.='\item \vskip -2 mm '; |
} |
} |
if ($Apache::response::foilgroup{$name.'.value'} eq 'true') { |
if ($Apache::response::foilgroup{$name.'.value'} eq 'true') { |
if ($target ne 'tex') { $result.='Correct:<b>'; } else { $result.='Correct: ';} |
if ($target ne 'tex') { $result.='Correct:<b>'; } else { $result.='Correct: \textbf{';} |
} else { |
} else { |
$result.='Incorrect:'; |
$result.='Incorrect:'; |
} |
} |
Line 363 sub displayfoils {
|
Line 367 sub displayfoils {
|
$result.=$Apache::response::foilgroup{$name.'.text'}; |
$result.=$Apache::response::foilgroup{$name.'.text'}; |
} |
} |
if ($Apache::response::foilgroup{$name.'.value'} eq 'true') { |
if ($Apache::response::foilgroup{$name.'.value'} eq 'true') { |
if ($target ne 'tex') { $result.='</b>';} |
if ($target ne 'tex') { $result.='</b>';} else {$result.='}';} |
} |
} |
} |
} |
} else { |
} else { |
Line 387 sub displayfoils {
|
Line 391 sub displayfoils {
|
$result .= '{\small \textbf{'.$alphabet[$i].'}}$\bigcirc$'.$Apache::response::foilgroup{$name.'.text'}.'\\\\'; #' stupid emacs |
$result .= '{\small \textbf{'.$alphabet[$i].'}}$\bigcirc$'.$Apache::response::foilgroup{$name.'.text'}.'\\\\'; #' stupid emacs |
$i++; |
$i++; |
} else { |
} else { |
$result .= '\item '.$Apache::response::foilgroup{$name.'.text'}; |
$result .= '\vspace*{-2 mm}\item '.$Apache::response::foilgroup{$name.'.text'}; |
} |
} |
} |
} |
$temp++; |
$temp++; |