From: dpvc v. a. <we...@ma...> - 2010-06-12 11:13:00
|
Log Message: ----------- Clear all previous anwer data when the problem is reset Modified Files: -------------- pg/macros: problemRandomize.pl Revision Data ------------- Index: problemRandomize.pl =================================================================== RCS file: /webwork/cvs/system/pg/macros/problemRandomize.pl,v retrieving revision 1.13 retrieving revision 1.14 diff -Lmacros/problemRandomize.pl -Lmacros/problemRandomize.pl -u -r1.13 -r1.14 --- macros/problemRandomize.pl +++ macros/problemRandomize.pl @@ -233,6 +233,8 @@ foreach my $id (split(/;/,$status->{answers})) {delete $main::inputs_ref->{$id}} foreach my $id (1..$status->{ans_rule_count}) {delete $main::inputs_ref->{"${main::QUIZ_PREFIX}${main::ANSWER_PREFIX}$id"}} + foreach my $id (keys %{$main::inputs_ref}) + {if ($id =~ m/^previous_(.*)$/) {delete $main::inputs_ref->{$1}; delete $main::inputs_ref->{$id}}} $main::inputs_ref->{_status} = $self->encode(\%defaultStatus); $status->{seed} = ($main::inputs_ref->{_reseed} || seed()); } |