Log Message:
-----------
Take care of the issue where Preview could be used to gather
information about whether an answer is correct by using the "this
answer is the same as the previous one" message. Now if Preview is
used, the warning is given whether the answer is right or not.
(Maybe it is not necessary to check for correct at all, since that was
there to prevent the message from being issued when there are multiple
answer blanks and the student is working on other ones. But the exact
match check will take care of those. Should the message be issued if
the student changes a correct answer to an equivalent one?)
Modified Files:
--------------
pg/macros:
PGanswermacros.pl
Revision Data
-------------
Index: PGanswermacros.pl
===================================================================
RCS file: /webwork/cvs/system/pg/macros/PGanswermacros.pl,v
retrieving revision 1.44
retrieving revision 1.45
diff -Lmacros/PGanswermacros.pl -Lmacros/PGanswermacros.pl -u -r1.44 -r1.45
--- macros/PGanswermacros.pl
+++ macros/PGanswermacros.pl
@@ -2036,10 +2036,10 @@
sub {
my $rh_ans = shift;
$rh_ans->{_filter_name} = "produce_equivalence_message";
- return $rh_ans unless $rh_ans->{prev_equals_current} && $rh_ans->{score} == 0;
+ 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 the previous entry
- # might have been from the preview button, or because there are multiple
+ # 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
# right. We should only give this message when the student is actually
# working on this answer.
|