version 1.178, 2007/09/27 19:05:03
|
version 1.184, 2007/11/13 11:06:54
|
Line 451 sub end_customresponse {
|
Line 451 sub end_customresponse {
|
} |
} |
if ($target eq 'grade' || $target eq 'web' || $target eq 'answer' || |
if ($target eq 'grade' || $target eq 'web' || $target eq 'answer' || |
$target eq 'tex' || $target eq 'analyze') { |
$target eq 'tex' || $target eq 'analyze') { |
&Apache::lonxml::increment_counter(&Apache::response::repetition()); |
&Apache::lonxml::increment_counter(&Apache::response::repetition(), |
|
"$part.$id"); |
|
if ($target eq 'analyze') { |
|
&Apache::lonhomework::set_bubble_lines(); |
|
} |
} |
} |
pop(@Apache::lonxml::namespace); |
pop(@Apache::lonxml::namespace); |
pop(@Apache::response::custom_answer); |
pop(@Apache::response::custom_answer); |
Line 880 sub getresponse {
|
Line 884 sub getresponse {
|
if (!defined($lines)) { |
if (!defined($lines)) { |
$lines = 1; |
$lines = 1; |
} |
} |
|
|
my %let_to_num=('A'=>0,'B'=>1,'C'=>2,'D'=>3,'E'=>4,'F'=>5,'G'=>6,'H'=>7, |
my %let_to_num=('A'=>0,'B'=>1,'C'=>2,'D'=>3,'E'=>4,'F'=>5,'G'=>6,'H'=>7, |
'I'=>8,'J'=>9,'K'=>10,'L'=>11,'M'=>12,'N'=>13,'O'=>14, |
'I'=>8,'J'=>9,'K'=>10,'L'=>11,'M'=>12,'N'=>13,'O'=>14, |
'P'=>15,'Q'=>16,'R'=>17,'S'=>18,'T'=>19,'U'=>20,'V'=>21, |
'P'=>15,'Q'=>16,'R'=>17,'S'=>18,'T'=>19,'U'=>20,'V'=>21, |
Line 891 sub getresponse {
|
Line 894 sub getresponse {
|
|
|
my $line; |
my $line; |
for ($line = 0; $line < $lines; $line++) { |
for ($line = 0; $line < $lines; $line++) { |
$response = $env{'scantron.'. |
my $theline = $Apache::lonxml::counter+$offset-1+$line; |
($Apache::lonxml::counter+$offset-1+$line). |
$response = $env{"scantron.$theline.answer"}; |
'.answer'}; |
if ((defined($response)) && ($response ne "") && ($response ne " ")) { |
if ($response ne "") { |
|
last; |
last; |
} |
} |
|
|
Line 903 sub getresponse {
|
Line 905 sub getresponse {
|
# save bubbled letter for later |
# save bubbled letter for later |
$Apache::lonhomework::results{"resource.$part.$id.scantron"}.= |
$Apache::lonhomework::results{"resource.$part.$id.scantron"}.= |
$response; |
$response; |
|
|
if ($resulttype ne 'letter') { |
if ($resulttype ne 'letter') { |
if ($resulttype eq 'A is 1') { |
if ($resulttype eq 'A is 1') { |
$response = $let_to_num{$response}+1; |
$response = $let_to_num{$response}+1; |
Line 1046 sub show_answer {
|
Line 1047 sub show_answer {
|
my $award = $Apache::lonhomework::history{"resource.$part.solved"}; |
my $award = $Apache::lonhomework::history{"resource.$part.solved"}; |
my $status = $Apache::inputtags::status[-1]; |
my $status = $Apache::inputtags::status[-1]; |
return ( ($award =~ /^correct/ |
return ( ($award =~ /^correct/ |
&& lc($Apache::lonhomework::problemstatus) ne 'no') |
&& &Apache::lonhomework::show_problem_status()) |
|| $status eq "SHOW_ANSWER"); |
|| $status eq "SHOW_ANSWER"); |
} |
} |
|
|