| … | |
… | |
| 1120 | my $cmp = $r->cmp(%options); |
1120 | my $cmp = $r->cmp(%options); |
| 1121 | $cmp->install_pre_filter(sub { |
1121 | $cmp->install_pre_filter(sub { |
| 1122 | my $rh_ans = shift; |
1122 | my $rh_ans = shift; |
| 1123 | $rh_ans->{original_student_ans} = $rh_ans->{student_ans}; |
1123 | $rh_ans->{original_student_ans} = $rh_ans->{student_ans}; |
| 1124 | $rh_ans->{original_correct_ans} = $rh_ans->{correct_ans}; |
1124 | $rh_ans->{original_correct_ans} = $rh_ans->{correct_ans}; |
|
|
1125 | return $rh_ans; |
|
|
1126 | }); |
|
|
1127 | $cmp->install_post_filter(sub { |
|
|
1128 | my $rh_ans = shift; |
|
|
1129 | $rh_ans->{student_ans} = $rh_ans->{student_value}->string |
|
|
1130 | if ref($rh_ans->{student_value}); |
| 1125 | return $rh_ans; |
1131 | return $rh_ans; |
| 1126 | }); |
1132 | }); |
| 1127 | $cmp->{debug} = $num_params{debug}; |
1133 | $cmp->{debug} = $num_params{debug}; |
| 1128 | &$Context($oldContext); |
1134 | &$Context($oldContext); |
| 1129 | |
1135 | |