--- loncom/homework/response.pm 2009/05/04 16:45:44 1.215 +++ loncom/homework/response.pm 2009/05/24 13:08:18 1.216 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # various response type definitons response definition # -# $Id: response.pm,v 1.215 2009/05/04 16:45:44 bisitz Exp $ +# $Id: response.pm,v 1.216 2009/05/24 13:08:18 www Exp $ # # Copyright Michigan State University Board of Trustees # @@ -439,7 +439,7 @@ sub end_customresponse { ${$safeeval->varglob('LONCAPA::customresponse_submission')}= $response; - my $award = &Apache::run::run('{ my $submission=$LONCAPA::customresponse_submission;'.$Apache::response::custom_answer[-1].'}',$safeeval); + my ($award,$score) = &Apache::run::run('{ my $submission=$LONCAPA::customresponse_submission;'.$Apache::response::custom_answer[-1].'}',$safeeval); if (!&Apache::inputtags::valid_award($award)) { $error = $award; $award = 'ERROR'; @@ -447,6 +447,9 @@ sub end_customresponse { &Apache::response::handle_previous(\%previous,$award); $Apache::lonhomework::results{"resource.$part.$id.awarddetail"}= $award; + if ($award eq 'ASSIGNED_SCORE') { + $Apache::lonhomework::results{"resource.$part.$id.awarded"}=1.0*$score; + } if ($error) { $Apache::lonhomework::results{"resource.$part.$id.awardmsg"}= $error;