version 1.100, 2004/06/29 22:32:14
|
version 1.104, 2004/09/24 19:44:00
|
Line 46 sub start_response {
|
Line 46 sub start_response {
|
push (@Apache::inputtags::response,$id); |
push (@Apache::inputtags::response,$id); |
push (@Apache::inputtags::responselist,$id); |
push (@Apache::inputtags::responselist,$id); |
@Apache::inputtags::inputlist=(); |
@Apache::inputtags::inputlist=(); |
if ($Apache::inputtags::part eq '') { |
if ($Apache::inputtags::part eq '' && |
|
!$Apache::lonhomework::ignore_response_errors) { |
&Apache::lonxml::error(&HTML::Entities::encode(&mt("Found a <*response> outside of a <part> in a <part>ed problem"),'<>&"')); |
&Apache::lonxml::error(&HTML::Entities::encode(&mt("Found a <*response> outside of a <part> in a <part>ed problem"),'<>&"')); |
} |
} |
if ($Apache::inputtags::response_with_no_part && |
if ($Apache::inputtags::response_with_no_part && |
Line 499 sub answer_footer {
|
Line 500 sub answer_footer {
|
} |
} |
|
|
sub showallfoils { |
sub showallfoils { |
my $return=0; |
if (defined($ENV{'form.showallfoils'})) { |
if (defined($ENV{'form.showallfoils'}) && |
my ($symb)=&Apache::lonxml::whichuser(); |
$ENV{'request.state'} eq 'construct') { |
if ($ENV{'request.state'} eq 'construct' || |
$return=1; |
($ENV{'user.adv'} && $symb eq '')) { |
|
return 1; |
|
} |
} |
} |
return $return; |
return 0; |
} |
} |
|
|
sub getresponse { |
sub getresponse { |
Line 529 sub getresponse {
|
Line 532 sub getresponse {
|
$Apache::lonhomework::results{"resource.$part.$id.scantron"}.= |
$Apache::lonhomework::results{"resource.$part.$id.scantron"}.= |
$response; |
$response; |
if ($resulttype ne 'letter') { |
if ($resulttype ne 'letter') { |
$response = $let_to_num{$response}; |
if ($resulttype eq 'A is 1') { |
|
$response = $let_to_num{$response}; |
|
} else { |
|
$response = $let_to_num{$response}+1; |
|
} |
} |
} |
} else { |
} else { |
$response = $ENV{$formparm}; |
$response = $ENV{$formparm}; |