--- loncom/homework/response.pm 2006/12/04 20:35:06 1.150 +++ loncom/homework/response.pm 2006/12/04 21:23:01 1.152 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # various response type definitons response definition # -# $Id: response.pm,v 1.150 2006/12/04 20:35:06 www Exp $ +# $Id: response.pm,v 1.152 2006/12/04 21:23:01 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -373,7 +373,7 @@ sub start_customresponse { if ( &Apache::response::show_answer() ) { my $answer = &Apache::lonxml::get_param('answerdisplay',$parstack, $safeeval); - $Apache::inputtags::answertxt{$id}=$answer; + $Apache::inputtags::answertxt{$id}=[$answer]; } } elsif ($target eq 'edit') { $result.=&Apache::edit::tag_start($target,$token); @@ -464,7 +464,7 @@ sub start_mathresponse { if ( &Apache::response::show_answer() ) { my $answer = &Apache::lonxml::get_param('answerdisplay',$parstack, $safeeval); - $Apache::inputtags::answertxt{$id}=$answer; + $Apache::inputtags::answertxt{$id}=[$answer]; } } elsif ($target eq 'edit') { $result.=&Apache::edit::tag_start($target,$token); @@ -516,14 +516,8 @@ sub end_mathresponse { my $award = &Apache::run::run('{ my $submission=$LONCAPA::mathresponse_submission;'.$Apache::response::custom_answer.'}',$safeeval); if (!&Apache::inputtags::valid_award($award)) { - if ($award==1) { - $award='EXACT_ANS'; - } elsif ($award==0) { - $award='INCORRECT'; - } else { - $error = $award; - $award = 'ERROR'; - } + $error = $award; + $award = 'ERROR'; } &Apache::response::handle_previous(\%previous,$award); $Apache::lonhomework::results{"resource.$part.$id.awarddetail"}=