--- loncom/homework/hint.pm	2001/01/22 16:42:01	1.5
+++ loncom/homework/hint.pm	2001/02/07 00:27:32	1.7
@@ -2,6 +2,7 @@ package Apache::hinttags;
 
 use strict;
 use Apache::lonnet;
+use capa;
 
 sub BEGIN {
   &Apache::lonxml::register('Apache::hinttags',('hintgroup','hintpart','numericalhint'));
@@ -26,7 +27,7 @@ sub start_hintgroup {
       if ($target eq 'web') {$result='<table bgcolor="#dddddd"><tr><td>';}
     }	
   }
-  if ($skiptoend) {
+  if ($skiptoend && $target ne 'meta') {
     &Apache::lonxml::get_all_text("/hintgroup",$$parser[$#$parser]);
   }
   @Apache::hint::which=();
@@ -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<br>result:$result:$Apache::lonxml::curdepth<br>\n");
     $result='';
   }
   return $result;