version 1.48, 2004/03/12 18:41:43
|
version 1.49, 2004/03/12 21:06:19
|
Line 163 sub end_numericalhint {
|
Line 163 sub end_numericalhint {
|
$$parstack[$#$parstack]; |
$$parstack[$#$parstack]; |
#need to get all possible parms |
#need to get all possible parms |
foreach my $key (keys(%Apache::inputtags::params)) { |
foreach my $key (keys(%Apache::inputtags::params)) { |
$expression.= ';my $'. #' |
$expression.= ';my $__LC__'. #' |
$key.'="'.$Apache::inputtags::params{$key}.'"'; |
$key.'="'.$Apache::inputtags::params{$key}.'"'; |
} |
} |
if ($$tagstack[-1] eq 'formulahint') { |
if ($$tagstack[-1] eq 'formulahint') { |
$expression.=';my $type="fml";'; |
$expression.=';my $__LC__type="fml";'; |
} elsif ($$tagstack[-1] eq 'numericalhint') { |
} elsif ($$tagstack[-1] eq 'numericalhint') { |
$expression.=';my $type="float";'; |
$expression.=';my $__LC__type="float";'; |
} |
} |
$expression.="');"; |
$expression.="');"; |
my @answer=&Apache::lonxml::get_param_var('answer',$parstack,$safeeval); |
my @answer=&Apache::lonxml::get_param_var('answer',$parstack,$safeeval); |
&Apache::lonxml::debug('answer is'.join(':',@answer)); |
&Apache::lonxml::debug('answer is'.join(':',@answer)); |
@{$safeeval->varglob('CAPARESPONSE_CHECK_LIST_answer')}=@answer; |
@{$safeeval->varglob('CAPARESPONSE_CHECK_LIST_answer')}=@answer; |
|
|
$result = &Apache::run::run($expression,$safeeval); |
($result,my @msgs) = &Apache::run::run($expression,$safeeval); |
&Apache::lonxml::debug("$expression:result:$result:$Apache::lonxml::curdepth"); |
&Apache::lonxml::debug("$expression:result:$result:$Apache::lonxml::curdepth"); |
my ($awards) = split /:/ , $result; |
my ($awards) = split /:/ , $result; |
my ($ad) = &Apache::inputtags::finalizeawards(split /,/ , $awards); |
my ($ad) = &Apache::inputtags::finalizeawards(split /,/ , $awards); |