From: dpvc v. a. <we...@ma...> - 2007-11-15 12:40:49
|
Log Message: ----------- When two sets are added, combine them rather than form a union. (This allows Inequailities context to report errors better when student answers are of the form x=a or x=b.) Modified Files: -------------- pg/lib/Value: Set.pm Revision Data ------------- Index: Set.pm =================================================================== RCS file: /webwork/cvs/system/pg/lib/Value/Set.pm,v retrieving revision 1.19 retrieving revision 1.20 diff -Llib/Value/Set.pm -Llib/Value/Set.pm -u -r1.19 -r1.20 --- lib/Value/Set.pm +++ lib/Value/Set.pm @@ -84,10 +84,11 @@ # # -# Addition forms additional sets +# Addition forms unions (or combines sets) # sub add { my ($self,$l,$r) = Value::checkOpOrderWithPromote(@_); + return $self->make($l->value,$r->value) if $l->type eq 'Set' && $r->type eq 'Set'; Value::Union::form($self->context,$l,$r); } sub dot {my $self = shift; $self->add(@_)} |