--- loncom/homework/caparesponse/caparesponse.pm 2015/10/30 03:49:55 1.256 +++ loncom/homework/caparesponse/caparesponse.pm 2016/02/18 18:40:05 1.257 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # caparesponse definition # -# $Id: caparesponse.pm,v 1.256 2015/10/30 03:49:55 raeburn Exp $ +# $Id: caparesponse.pm,v 1.257 2016/02/18 18:40:05 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -790,7 +790,10 @@ sub end_numericalresponse { $tag,$parstack, $safeeval,1); $error=&mt("Computer's answer is incorrect ([_1]).",'"'.join(', ',@$response).'"').' '; - if ($sigline ne '') { + if ($ad eq 'UNIT_INVALID_STUDENT') { + $error.=&mt('Unable to interpret units. Computer reads units as "[_1]".',$msg).' '. + &mt('The unit attribute in the numericalresponse item needs to be a supported physical unit.'); + } elsif ($sigline ne '') { $error.=&mt('It is likely that the tolerance range [_1] or significant figures [_2] need to be adjusted.',$tolline,$sigline); } else { $error.=&mt('It is likely that the tolerance range [_1] needs to be adjusted.',$tolline);