openwebwork/pg — pull request #161 by dpvc (2014-09-04 15:43:50+00:00)
Title: Have set addition produce an actual union, so it is controlled by the reduceUnions flag.

This fixes the issue we discussed in the openwebwork/pg#159 where `reduceUnions` didn't control all the different ways of making unions. Now `reduceSets` only controls the removal of repeated items from a set, and `reduceUnions` controls addition of sets, and creation of unions of sets via `Compute()` or `Union()`.

Test cases:

Context("Interval")->flags->set(reduceSets=>0,reduceUnions=>0);
TEXT(Set(1,1,2) + Set(2,3));
TEXT(Compute("{1,1,2} U {2,3}"));
TEXT(Union("{1,1,2}","{2,3}"));

should all produce `"{1,1,2} U {2,3}"`. Changing to `reduceSets=>1` should produce `{1,2} U {2,3}`. Changing to `reduceUnions=>1` (with either value of `reduceSets`) should produce `{1,2,3}`.