version 1.227.2.3, 2008/09/20 00:28:34
|
version 1.233, 2008/09/13 02:08:33
|
Line 310 sub start_numericalresponse {
|
Line 310 sub start_numericalresponse {
|
$safeeval); |
$safeeval); |
if ($unit =~ /\S/) { $result.=" (in $unit) "; } |
if ($unit =~ /\S/) { $result.=" (in $unit) "; } |
} |
} |
|
if (($token->[1] eq 'formularesponse') && |
|
($Apache::inputtags::status['-1'] eq 'CAN_ANSWER')) { |
|
} |
if ( &Apache::response::show_answer() ) { |
if ( &Apache::response::show_answer() ) { |
&set_answertext($tag_internal_answer_name,$target,$token,$tagstack, |
&set_answertext($tag_internal_answer_name,$target,$token,$tagstack, |
$parstack,$parser,$safeeval,-1); |
$parstack,$parser,$safeeval,-1); |
Line 514 sub end_numericalresponse {
|
Line 517 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); |
&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]; |
} |
} |
$Apache::lonhomework::results{"resource.$partid.$id.submission"}=$response; |
$Apache::lonhomework::results{"resource.$partid.$id.submission"}=$response; |
my ($ad,$msg,$name)=&check_submission($response,$partid,$id, |
my ($ad,$msg,$name)=&check_submission($response,$partid,$id, |
$tag,$parstack, |
$tag,$parstack, |
$safeeval); |
$safeeval); |
Line 608 sub end_numericalresponse {
|
Line 611 sub end_numericalresponse {
|
} |
} |
if (($target eq 'web') && ($tag eq 'formularesponse') |
if (($target eq 'web') && ($tag eq 'formularesponse') |
&& ($Apache::lonhomework::type ne 'exam') && ($Apache::inputtags::status['-1'] eq 'CAN_ANSWER') |
&& ($Apache::lonhomework::type ne 'exam') && ($Apache::inputtags::status['-1'] eq 'CAN_ANSWER') |
&& (&Apache::lonnet::EXT('resource.'.$partid.'_'.$id.'.turnoneditor') ne 'no')) { |
&& (&Apache::lonnet::EXT('resource.'.$partid.'_'.$id.'.turnoneditor') ne 'no')){ |
$result.=&Apache::response::edit_mathresponse_button($id,"HWVAL_$id"); |
$result.=&Apache::response::edit_mathresponse_button($id,"HWVAL_$id"); |
|
#hier |
} |
} |
|
|
&Apache::response::setup_prior_tries_hash(\&format_prior_response_numerical); |
&Apache::response::setup_prior_tries_hash(\&format_prior_response_numerical); |
} elsif ($target eq 'edit') { |
} elsif ($target eq 'edit') { |
$result.='</td></tr>'.&Apache::edit::end_table; |
$result.='</td></tr>'.&Apache::edit::end_table; |