From: dpvc v. a. <we...@ma...> - 2005-11-12 00:33:07
|
Log Message: ----------- Make had the right idea, but used the wrong context (or what might be the wrong context in some circumstances). Modified Files: -------------- pg/macros: PGanswermacros.pl Revision Data ------------- Index: PGanswermacros.pl =================================================================== RCS file: /webwork/cvs/system/pg/macros/PGanswermacros.pl,v retrieving revision 1.42 retrieving revision 1.43 diff -Lmacros/PGanswermacros.pl -Lmacros/PGanswermacros.pl -u -r1.42 -r1.43 --- macros/PGanswermacros.pl +++ macros/PGanswermacros.pl @@ -2001,12 +2001,13 @@ # # Parse the previous answer, if any # - $cmp->install_pre_filter( + $cmp->install_evaluator( sub { my $rh_ans = shift; $rh_ans->{_filter_name} = "parse_previous_answer"; return $rh_ans unless defined $rh_ans->{prev_ans}; - my $oldContext = &$Context(); &$Context($context); + my $oldContext = &$Context(); + &$Context($rh_ans->{correct_value}{context}); $rh_ans->{prev_formula} = Parser::Formula($rh_ans->{prev_ans}); &$Context($oldContext); $rh_ans; |