| … | |
… | |
| 26 | sub cmp { |
26 | sub cmp { |
| 27 | my $self = shift; |
27 | my $self = shift; |
| 28 | my $ans = new AnswerEvaluator; |
28 | my $ans = new AnswerEvaluator; |
| 29 | $ans->ans_hash( |
29 | $ans->ans_hash( |
| 30 | type => "Value (".$self->class.")", |
30 | type => "Value (".$self->class.")", |
| 31 | correct_ans => $self->string, |
31 | correct_ans => protectHTML($self->string), |
| 32 | correct_value => $self, |
32 | correct_value => $self, |
| 33 | $self->cmp_defaults, |
33 | $self->cmp_defaults, |
| 34 | @_ |
34 | @_ |
| 35 | ); |
35 | ); |
| 36 | $ans->install_evaluator(sub {$ans = shift; $ans->{correct_value}->cmp_parse($ans)}); |
36 | $ans->install_evaluator(sub {$ans = shift; $ans->{correct_value}->cmp_parse($ans)}); |