| … | |
… | |
| 483 | } |
483 | } |
| 484 | $rh_ans; |
484 | $rh_ans; |
| 485 | } |
485 | } |
| 486 | |
486 | |
| 487 | sub get_student_answer { |
487 | sub get_student_answer { |
| 488 | my $self = shift; |
488 | my $self = shift; |
| 489 | my $input = shift; |
489 | my $input = shift; |
| 490 | my %answer_options = @_; |
490 | my %answer_options = @_; |
|
|
491 | warn "Raw student answer is |$input|" if $self->{debug}; |
| 491 | $input = '' unless defined($input); |
492 | $input = '' unless defined($input); |
| 492 | if (ref($input) =~/AnswerHash/) { |
493 | if (ref($input) =~/AnswerHash/) { |
| 493 | # in this case nothing needs to be done, since the student's answer is already in an answerhash. |
494 | # in this case nothing needs to be done, since the student's answer is already in an answerhash. |
| 494 | # This is useful when an AnswerEvaluator is used as a filter in another answer evaluator. |
495 | # This is useful when an AnswerEvaluator is used as a filter in another answer evaluator. |
| 495 | } elsif ($input =~ /\0/ ) { # this case may occur with older versions of CGI?? |
496 | } elsif ($input =~ /\0/ ) { # this case may occur with older versions of CGI?? |