[system] / trunk / pg / lib / Value / AnswerChecker.pm Repository:
ViewVC logotype

Diff of /trunk/pg/lib/Value/AnswerChecker.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 3506 Revision 3507
255 unless $reduced->type eq 'Union' && $reduced->length == $student->length; 255 unless $reduced->type eq 'Union' && $reduced->length == $student->length;
256 my @R = $reduced->sort->value; 256 my @R = $reduced->sort->value;
257 my @S = $student->sort->value; 257 my @S = $student->sort->value;
258 foreach my $i (0..$#R) { 258 foreach my $i (0..$#R) {
259 return "Your$nth union can be written in a simpler form" 259 return "Your$nth union can be written in a simpler form"
260 unless $R[$i] == $S[$i]; 260 unless $R[$i] == $S[$i] && $R[$i]->length == $S[$i]->length;
261 } 261 }
262 } elsif ($student->type eq 'Set') { 262 } elsif ($student->type eq 'Set' && $student->length >= 2) {
263 my $reduced = $student->reduce;
264 return "Your$nth set should have no redundant elements" 263 return "Your$nth set should have no redundant elements"
265 unless $reduced->length == $student->length; 264 unless $student->reduce->length == $student->length;
266 } 265 }
267 return; 266 return;
268} 267}
269 268
270# 269#

Legend:
Removed from v.3506  
changed lines
  Added in v.3507

aubreyja at gmail dot com
ViewVC Help
Powered by ViewVC 1.0.9