Log Message:
-----------
Fixed a bug where correct_ans could not be overridden in the cmp()
method for Lists.
Modified Files:
--------------
pg/lib/Value:
AnswerChecker.pm
Revision Data
-------------
Index: AnswerChecker.pm
===================================================================
RCS file: /webwork/cvs/system/pg/lib/Value/AnswerChecker.pm,v
retrieving revision 1.67
retrieving revision 1.68
diff -Llib/Value/AnswerChecker.pm -Llib/Value/AnswerChecker.pm -u -r1.67 -r1.68
--- lib/Value/AnswerChecker.pm
+++ lib/Value/AnswerChecker.pm
@@ -1002,11 +1002,12 @@
#
sub cmp {
my $self = shift;
+ my %params = @_;
my $cmp = $self->SUPER::cmp(@_);
if ($cmp->{rh_ans}{removeParens}) {
$self->{open} = $self->{close} = '';
$cmp->ans_hash(correct_ans => $self->stringify)
- unless defined($self->{correct_ans});
+ unless defined($self->{correct_ans}) || defined($params{correct_ans});
}
return $cmp;
}
|