version 1.10, 2001/01/19 21:44:12
|
version 1.12, 2001/02/19 20:36:49
|
Line 58 sub end_foilgroup {
|
Line 58 sub end_foilgroup {
|
if ( $response =~ /[^\s]/) { |
if ( $response =~ /[^\s]/) { |
my $id = $Apache::inputtags::response['-1']; |
my $id = $Apache::inputtags::response['-1']; |
$Apache::lonhomework::results{"resource.$Apache::inputtags::part.$id.submission"}=$response; |
$Apache::lonhomework::results{"resource.$Apache::inputtags::part.$id.submission"}=$response; |
&Apache::lonxml::debug("submitted a $response<br>\n"); |
&Apache::lonxml::debug("submitted a $response<br />\n"); |
if ($response == $answer) { |
if ($response == $answer) { |
$Apache::lonhomework::results{"resource.$Apache::inputtags::part.$id.awarddetail"}='EXACT_ANS'; |
$Apache::lonhomework::results{"resource.$Apache::inputtags::part.$id.awarddetail"}='EXACT_ANS'; |
} else { |
} else { |
Line 100 sub displayfoils {
|
Line 100 sub displayfoils {
|
my $name; |
my $name; |
|
|
foreach $name (@names) { |
foreach $name (@names) { |
#result.="<br><b>$name</b> is <i> $Apache::response::foilgroup{$name.'.value'} </i>"; |
#result.="<br /><b>$name</b> is <i> $Apache::response::foilgroup{$name.'.value'} </i>"; |
if ($Apache::response::foilgroup{$name.'.value'} eq 'true') { |
if ($Apache::response::foilgroup{$name.'.value'} eq 'true') { |
push (@truelist,$name); |
push (@truelist,$name); |
} elsif ($Apache::response::foilgroup{$name.'.value'} eq 'false') { |
} elsif ($Apache::response::foilgroup{$name.'.value'} eq 'false') { |
Line 124 sub displayfoils {
|
Line 124 sub displayfoils {
|
&Apache::lonxml::debug("the true statement is $answer"); |
&Apache::lonxml::debug("the true statement is $answer"); |
if ($Apache::lonhomework::history{"resource.$Apache::inputtags::part.solved"} =~ /^correct/ ) { |
if ($Apache::lonhomework::history{"resource.$Apache::inputtags::part.solved"} =~ /^correct/ ) { |
foreach $name (@whichfalse) { |
foreach $name (@whichfalse) { |
$result.="<br />".$Apache::response::foilgroup{$name.'.value'}. |
$result.="<br />"; |
":".$Apache::response::foilgroup{$name.'.text'}."</input>\n"; |
if ($Apache::response::foilgroup{$name.'.value'} eq 'true') { |
|
$result.='Correct'; |
|
} else { |
|
$result.='Incorrect'; |
|
} |
|
$result.=":".$Apache::response::foilgroup{$name.'.text'}."</input>\n"; |
} |
} |
} else { |
} else { |
my $temp=0; |
my $temp=0; |