--- loncom/homework/chemresponse.pm 2006/12/04 21:23:01 1.71 +++ loncom/homework/chemresponse.pm 2007/04/18 00:19:37 1.72 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # chemical equation style response # -# $Id: chemresponse.pm,v 1.71 2006/12/04 21:23:01 albertel Exp $ +# $Id: chemresponse.pm,v 1.72 2007/04/18 00:19:37 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -542,6 +542,9 @@ sub end_reactionresponse { } $result.=&Apache::response::answer_footer('reactionresponse'); } + if ($target eq 'web') { + &Apache::response::setup_prior_tries_hash(\&format_prior_response_reaction); + } if ($target eq 'grade' || $target eq 'web' || $target eq 'answer' || $target eq 'tex' || $target eq 'analyze') { @@ -551,6 +554,12 @@ sub end_reactionresponse { return $result; } +sub format_prior_response_reaction { + my ($mode,$answer) =@_; + return ''. + &HTML::Entities::encode($answer,'"<>&').''; +} + sub start_chem { my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$style) = @_; my $result = '';