version 1.198.2.3, 2007/01/25 21:03:45
|
version 1.201, 2006/12/14 04:59:51
|
Line 40 BEGIN {
|
Line 40 BEGIN {
|
} |
} |
|
|
my %answer; |
my %answer; |
my @answers; |
|
sub get_answer { return %answer; }; |
|
sub push_answer{ push(@answers,dclone(\%answer)); undef(%answer) } |
|
sub pop_answer { %answer = %{pop(@answers)}; }; |
|
|
|
my $cur_name; |
my $cur_name; |
my $tag_internal_answer_name = 'INTERNAL'; |
my $tag_internal_answer_name = 'INTERNAL'; |
|
|
Line 329 sub check_submission {
|
Line 324 sub check_submission {
|
} |
} |
|
|
if ($tag eq 'formularesponse') { |
if ($tag eq 'formularesponse') { |
# if ($$args_ref{'samples'}) { |
if ($$args_ref{'samples'}) { |
$$args_ref{'type'}='fml'; |
$$args_ref{'type'}='fml'; |
# } else { |
} else { |
# $$args_ref{'type'}='math'; |
$$args_ref{'type'}='math'; |
# } |
} |
} elsif ($tag eq 'numericalresponse') { |
} elsif ($tag eq 'numericalresponse') { |
$$args_ref{'type'}='float'; |
$$args_ref{'type'}='float'; |
} |
} |
Line 405 sub end_numericalresponse {
|
Line 400 sub end_numericalresponse {
|
&Apache::lonxml::debug($$parstack[-1] . "\n<br>"); |
&Apache::lonxml::debug($$parstack[-1] . "\n<br>"); |
|
|
if ( &Apache::response::submitted('scantron')) { |
if ( &Apache::response::submitted('scantron')) { |
&add_in_tag_answer($parstack,$safeeval); |
|
my ($values,$display)=&make_numerical_bubbles($partid,$id, |
my ($values,$display)=&make_numerical_bubbles($partid,$id, |
$target,$parstack,$safeeval); |
$target,$parstack,$safeeval); |
$response=$values->[$response]; |
$response=$values->[$response]; |