--- loncom/homework/hint.pm	2009/06/28 19:40:41	1.76
+++ loncom/homework/hint.pm	2011/06/08 20:38:47	1.78
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA 
 # implements the tags that control the hints
 #
-# $Id: hint.pm,v 1.76 2009/06/28 19:40:41 www Exp $
+# $Id: hint.pm,v 1.78 2011/06/08 20:38:47 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -81,6 +81,10 @@ sub start_hintgroup {
        }
     }
     @Apache::hint::which=();
+    if (($#Apache::functionplotresponse::failedrules>=0) && ($target eq 'web')) {
+        @Apache::hint::which=@Apache::functionplotresponse::failedrules;
+        undef @Apache::functionplotresponse::failedrules;
+    }
     return $result;
 }
 
@@ -129,6 +133,8 @@ sub start_numericalhint {
 					     $token,40).
 	        &Apache::loncommon::help_open_topic('Formula_Response_Sampling');
 	}
+        $result.=&Apache::edit::text_arg('Pre-Processor Subroutine:','preprocess',
+                                             $token,10);
 	$result.=&Apache::edit::end_row();
 	$result.=&Apache::edit::start_spanning_row();
     } elsif ($target eq 'modified') {
@@ -136,11 +142,11 @@ sub start_numericalhint {
 	if ($token->[1] eq 'numericalhint') {
 	    $constructtag=&Apache::edit::get_new_args($token,$parstack,
 						     $safeeval,'name',
-						     'answer','unit','format');
+						     'answer','unit','format','preprocess');
 	} elsif ($token->[1] eq 'formulahint') {
 	    $constructtag=&Apache::edit::get_new_args($token,$parstack,
 						     $safeeval,'name','answer',
-						     'samples');
+						     'samples','preprocess');
 	}
 	if ($constructtag) {
 	    $result  = &Apache::edit::rebuild_tag($token);
@@ -377,13 +383,15 @@ sub start_stringhint {
 			 [['cs','Case Sensitive'],['ci','Case Insensitive'],
 			  ['mc','Case Insensitive, Any Order'],
 			  ['re','Regular Expression']],$token);
+        $result.=&Apache::edit::text_arg('Pre-Processor Subroutine:','preprocess',
+                                             $token,10);
 	$result.=&Apache::edit::end_row();
 	$result.=&Apache::edit::start_spanning_row();
     } elsif ($target eq 'modified') {
 	my $constructtag;
 	$constructtag=&Apache::edit::get_new_args($token,$parstack,
 						  $safeeval,'name','answer',
-						  'type');
+						  'type','preprocess');
 	$result  = &Apache::edit::rebuild_tag($token);
     } elsif ($target eq 'web') {
 	&Apache::response::reset_params();