Log Message:
-----------
Improve error messages for unreduced unions.
Modified Files:
--------------
pg/lib/Value:
AnswerChecker.pm
Union.pm
Revision Data
-------------
Index: AnswerChecker.pm
===================================================================
RCS file: /webwork/cvs/system/pg/lib/Value/AnswerChecker.pm,v
retrieving revision 1.107
retrieving revision 1.108
diff -Llib/Value/AnswerChecker.pm -Llib/Value/AnswerChecker.pm -u -r1.107 -r1.108
--- lib/Value/AnswerChecker.pm
+++ lib/Value/AnswerChecker.pm
@@ -321,7 +321,8 @@
my ($result,$error) = $student->isReduced;
return unless $error;
return {
- overlaps => "Your$nth union can be written without overlaps",
+ "overlaps" => "Your$nth union contains overlapping intervals",
+ "overlaps in sets" => "Your$nth union contains sets and intervals that overlap",
"uncombined intervals" => "Your$nth union can be simplified by combining intervals",
"uncombined sets" => "Your$nth union can be simplified by combining some sets",
"repeated elements in set" => "Your$nth union contains sets with repeated elements",
Index: Union.pm
===================================================================
RCS file: /webwork/cvs/system/pg/lib/Value/Union.pm,v
retrieving revision 1.41
retrieving revision 1.42
diff -Llib/Value/Union.pm -Llib/Value/Union.pm -u -r1.41 -r1.42
--- lib/Value/Union.pm
+++ lib/Value/Union.pm
@@ -250,7 +250,7 @@
if ($x->intersects($y)) {$error = "overlaps"; last}
if (($x + $y)->reduce->type ne 'Union') {$error = "uncombined intervals"; last}
}
- $error = "overlaps" if !$error && $S->intersects($U);
+ $error = "overlaps in sets" if !$error && $S->intersects($U);
$error = "uncombined sets" if !$error && $Sn > 1 && !$self->getFlag('reduceSets');
$error = "repeated elements in set" if !$error && !$S->isReduced;
return $error eq "" unless $error && wantarray;
|