version 1.63, 2003/01/07 22:13:07
|
version 1.64, 2003/04/02 15:09:00
|
Line 370 sub displayfoils {
|
Line 370 sub displayfoils {
|
} |
} |
} |
} |
} else { |
} else { |
my @alphabet = ('A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z'); |
my @alphabet = ('A'..'Z'); |
my $i = 0; |
my $i = 0; |
my $temp=0; |
my $temp=0; |
my $id=$Apache::inputtags::response['-1']; |
my $id=$Apache::inputtags::response['-1']; |
Line 379 sub displayfoils {
|
Line 379 sub displayfoils {
|
my %lastresponse=&Apache::lonnet::str2hash($lastresponse); |
my %lastresponse=&Apache::lonnet::str2hash($lastresponse); |
foreach my $name (@whichfoils) { |
foreach my $name (@whichfoils) { |
if ($target ne 'tex') { |
if ($target ne 'tex') { |
$result.="<br /><input type=\"radio\" name=\"HWVAL$Apache::inputtags::response['-1']\" value=\"$temp\" "; |
my $ValueForInput; |
|
if ($Apache::lonhomework::type ne 'exam') {$ValueForInput=$temp;} else {$ValueForInput=$alphabet[$temp];} |
|
$result.="<br /><input type=\"radio\" name=\"HWVAL$Apache::inputtags::response['-1']\" value=\"$ValueForInput\" "; |
if (defined($lastresponse{$name})) { $result .= 'checked="on"'; } |
if (defined($lastresponse{$name})) { $result .= 'checked="on"'; } |
$result .= '>'.$Apache::response::foilgroup{$name.'.text'}."</input>\n"; |
$result .= '>'.$Apache::response::foilgroup{$name.'.text'}."</input>\n"; |
if ($Apache::lonhomework::type eq 'exam') { |
|
$result .= '<table border="1"><tr><td>A: Correct</td><td>B: Incorrect</td></tr></table>'; |
|
} |
|
} else { |
} else { |
if ($Apache::lonhomework::type eq 'exam') { |
if ($Apache::lonhomework::type eq 'exam') { |
$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 |