From: dpvc v. a. <we...@ma...> - 2008-06-28 19:44:58
|
Log Message: ----------- Fixed problem with Union answer checker where incorrect error messages could be given when intervals needed to be checked for syntax errors. Also fixed some comments. 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.117 retrieving revision 1.118 diff -Llib/Value/AnswerChecker.pm -Llib/Value/AnswerChecker.pm -u -r1.117 -r1.118 --- lib/Value/AnswerChecker.pm +++ lib/Value/AnswerChecker.pm @@ -3,7 +3,7 @@ ############################################################# # - # Implements the ->cmp method for Value objects. + # Implements the ->cmp method for Value objects. # Otherwise known as MathObjects. This produces # an answer checker appropriate for the type of object. # Additional options can be passed to the cmp method to @@ -30,12 +30,12 @@ # Internal use. # Set default flags for the answer checker in this object -# showTypeWarnings => 1 -# showEqualErrors => 1 +# showTypeWarnings => 1 +# showEqualErrors => 1 # ignoreStrings => 1 # studentsMustReduceUnions => 1 -# show UnionReduceWarnings => 1 -# +# showUnionReduceWarnings => 1 +# =cut @@ -1172,9 +1172,10 @@ # partial credit. Set the various types for error # messages. # +my $typeMatchInterval = Value::Interval->make(0,1); sub cmp_defaults {( Value::List::cmp_defaults(@_), - typeMatch => 'Value::Interval', + typeMatch => $typeMatchInterval, list_type => 'an interval, set or union', short_type => 'a union', entry_type => 'an interval or set', @@ -1431,7 +1432,7 @@ $entry = $self->Package("Formula")->new($entry) if !Value::isValue($entry); # - # Some words differ if ther eis only one entry in the student's list + # Some words differ if there is only one entry in the student's list # my $nth = ''; my $answer = 'answer'; my $class = $ans->{list_type} || $ans->{cmp_class}; |