From: Sam H. v. a. <we...@ma...> - 2005-12-14 00:54:19
|
Log Message: ----------- parser version was ok, bug #752 fixed in non-parser version. Modified Files: -------------- pg/macros: PGanswermacros.pl Revision Data ------------- Index: PGanswermacros.pl =================================================================== RCS file: /webwork/cvs/system/pg/macros/PGanswermacros.pl,v retrieving revision 1.50 retrieving revision 1.51 diff -Lmacros/PGanswermacros.pl -Lmacros/PGanswermacros.pl -u -r1.50 -r1.51 --- macros/PGanswermacros.pl +++ macros/PGanswermacros.pl @@ -2030,13 +2030,15 @@ ); # - # Produce a message if the previous answer equals this one and is not specified the same way + # Produce a message if the previous answer equals this one + # (and is not correct, and is not specified the same way) # $cmp->install_post_filter( sub { my $rh_ans = shift; $rh_ans->{_filter_name} = "produce_equivalence_message"; - return $rh_ans unless $rh_ans->{prev_equals_current}; + return $rh_ans unless $rh_ans->{prev_equals_current} && + ($rh_ans->{score} != 1 || $rh_ans->{isPreview}); # # If the match is exact don't give an error since there may be multiple # entry blanks and the student is trying to get one of the other ones @@ -2333,10 +2335,9 @@ $answer_evaluator->install_post_filter( sub { my $rh_ans = shift; - if ( defined($rh_ans->{'ans_equals_prev_ans'}) and $rh_ans->{'ans_equals_prev_ans'}) { -## $rh_ans->{ans_message} = "This answer is the same as the one you just submitted or previewed."; - $rh_ans->{ans_message} = "This answer is equivalent to the one you just submitted or previewed."; ## DPVC - } + $rh_ans->{ans_message} = "This answer is equivalent to the one you just submitted or previewed." + if defined $rh_ans->{'ans_equals_prev_ans'} and $rh_ans->{'ans_equals_prev_ans'} + and ($rh_ans->{score}!=1 || $rh_ans->{isPreview}); $rh_ans; } ); |