From: dpvc v. a. <we...@ma...> - 2005-09-13 14:07:03
|
Log Message: ----------- The ORIGINAL_NUM_CMP was calling str_cmp as a code reference rather than as the more modern AnswerEvaluator object. This causes error messages when string answers were used. It now uses the evaluate() method of the AnswerEvaluator. Modified Files: -------------- pg/macros: PGanswermacros.pl Revision Data ------------- Index: PGanswermacros.pl =================================================================== RCS file: /webwork/cvs/system/pg/macros/PGanswermacros.pl,v retrieving revision 1.35 retrieving revision 1.36 diff -Lmacros/PGanswermacros.pl -Lmacros/PGanswermacros.pl -u -r1.35 -r1.36 --- macros/PGanswermacros.pl +++ macros/PGanswermacros.pl @@ -4327,7 +4327,7 @@ my $sensibleAnswer = 0; $ans = str_filters( $ans, 'compress_whitespace' ); # remove trailing, leading, and double spaces. my ($ans_eval) = str_cmp($rh_ans->{correct_ans}); - my $temp_ans_hash = &$ans_eval($ans); + my $temp_ans_hash = $ans_eval->evaluate($ans); $rh_ans->{test} = $temp_ans_hash; if ($temp_ans_hash->{score} ==1 ) { # students answer matches the correct answer. |