version 1.226, 2008/06/10 15:22:39
|
version 1.227.2.1, 2008/09/12 10:09:18
|
Line 311 sub start_numericalresponse {
|
Line 311 sub start_numericalresponse {
|
if ($unit =~ /\S/) { $result.=" (in $unit) "; } |
if ($unit =~ /\S/) { $result.=" (in $unit) "; } |
} |
} |
if (($token->[1] eq 'formularesponse') && |
if (($token->[1] eq 'formularesponse') && |
($Apache::inputtags::status['-1'] eq 'CAN_ANSWER') && |
($Apache::inputtags::status['-1'] eq 'CAN_ANSWER')) { |
(!&Apache::lonxml::get_param_var('samples',$parstack,$safeeval))) { |
|
$result.=&edit_formula_button($id,"HWVAL_$id"); |
$result.=&edit_formula_button($id,"HWVAL_$id"); |
} |
} |
if ( &Apache::response::show_answer() ) { |
if ( &Apache::response::show_answer() ) { |
Line 465 sub check_submission {
|
Line 464 sub check_submission {
|
use Time::HiRes; |
use Time::HiRes; |
my $t0 = [Time::HiRes::gettimeofday()]; |
my $t0 = [Time::HiRes::gettimeofday()]; |
my ($result,@msgs) = |
my ($result,@msgs) = |
&Apache::run::run("&caparesponse_check_list()",$safeeval); |
&Apache::run::run("&caparesponse_check_list($tag)",$safeeval); |
&Apache::lonxml::debug("checking $name $result with $response took ".&Time::HiRes::tv_interval($t0)); |
&Apache::lonxml::debug("checking $name $result with $response took ".&Time::HiRes::tv_interval($t0)); |
&Apache::lonxml::debug('msgs are '.join(':',@msgs)); |
&Apache::lonxml::debug('msgs are '.join(':',@msgs)); |
my ($awards)=split(/:/,$result); |
my ($awards)=split(/:/,$result); |
Line 1178 sub end_stringresponse {
|
Line 1177 sub end_stringresponse {
|
foreach my $name (keys(%answer)) { |
foreach my $name (keys(%answer)) { |
&Apache::lonxml::debug(" doing $name with ".join(':',@{ $answer{$name}{'answers'} })); |
&Apache::lonxml::debug(" doing $name with ".join(':',@{ $answer{$name}{'answers'} })); |
${$safeeval->varglob('LONCAPA::CAPAresponse_answer')}=dclone($answer{$name}); |
${$safeeval->varglob('LONCAPA::CAPAresponse_answer')}=dclone($answer{$name}); |
my ($result, @msgs)=&Apache::run::run("&caparesponse_check_list()",$safeeval); |
my ($result, @msgs)=&Apache::run::run("&caparesponse_check_list($$tagstack[-1])",$safeeval); |
&Apache::lonxml::debug('msgs are'.join(':',@msgs)); |
&Apache::lonxml::debug('msgs are'.join(':',@msgs)); |
my ($awards)=split(/:/,$result); |
my ($awards)=split(/:/,$result); |
my (@awards) = split(/,/,$awards); |
my (@awards) = split(/,/,$awards); |