--- loncom/homework/hint.pm 2001/01/22 16:42:01 1.5 +++ loncom/homework/hint.pm 2001/01/22 19:58:09 1.6 @@ -2,6 +2,7 @@ package Apache::hinttags; use strict; use Apache::lonnet; +use capa; sub BEGIN { &Apache::lonxml::register('Apache::hinttags',('hintgroup','hintpart','numericalhint')); @@ -61,6 +62,7 @@ sub end_numericalhint { my $result; if ($target ne 'meta' && $target ne 'grade') { my $args =''; + $safeeval->share_from('capa',['&caparesponse_capa_check_answer']); if ( $#$parstack > -1 ) { $args=$$parstack[$#$parstack]; } my $name = &Apache::run::run("{$args;".'return $name}',$safeeval); my $response = $Apache::lonhomework::history{"resource.$Apache::inputtags::part.$Apache::inputtags::response['-1'].submission"}; @@ -71,10 +73,10 @@ sub end_numericalhint { ';my $sig="'.$Apache::inputtags::params{'sig'}.'"'. "');"; $result = &Apache::run::run($expression,$safeeval); + &Apache::lonxml::debug("$expression:result:$result:$Apache::lonxml::curdepth"); my ($awards) = split /:/ , $result; my ($ad) = &Apache::inputtags::finalizeawards(split /,/ , $awards); if ($ad eq 'EXACT_ANS' || $ad eq 'APPROX_ANS') { push (@Apache::hint::which,$name); } - &Apache::lonxml::debug("\n
result:$result:$Apache::lonxml::curdepth
\n"); $result=''; } return $result;