[system] / trunk / pg / macros / PGanswermacros.pl Repository:
ViewVC logotype

Diff of /trunk/pg/macros/PGanswermacros.pl

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 3614 Revision 3615
4325# last: 'STRING' post_filter will clear the error (avoiding pink screen.) 4325# last: 'STRING' post_filter will clear the error (avoiding pink screen.)
4326 4326
4327 my $sensibleAnswer = 0; 4327 my $sensibleAnswer = 0;
4328 $ans = str_filters( $ans, 'compress_whitespace' ); # remove trailing, leading, and double spaces. 4328 $ans = str_filters( $ans, 'compress_whitespace' ); # remove trailing, leading, and double spaces.
4329 my ($ans_eval) = str_cmp($rh_ans->{correct_ans}); 4329 my ($ans_eval) = str_cmp($rh_ans->{correct_ans});
4330 my $temp_ans_hash = &$ans_eval($ans); 4330 my $temp_ans_hash = $ans_eval->evaluate($ans);
4331 $rh_ans->{test} = $temp_ans_hash; 4331 $rh_ans->{test} = $temp_ans_hash;
4332 4332
4333 if ($temp_ans_hash->{score} ==1 ) { # students answer matches the correct answer. 4333 if ($temp_ans_hash->{score} ==1 ) { # students answer matches the correct answer.
4334 $rh_ans->{score} = 1; 4334 $rh_ans->{score} = 1;
4335 $sensibleAnswer = 1; 4335 $sensibleAnswer = 1;

Legend:
Removed from v.3614  
changed lines
  Added in v.3615

aubreyja at gmail dot com
ViewVC Help
Powered by ViewVC 1.0.9