--- loncom/homework/caparesponse/caparesponse.pm 2005/07/11 18:24:12 1.173 +++ loncom/homework/caparesponse/caparesponse.pm 2005/07/11 18:35:23 1.174 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # caparesponse definition # -# $Id: caparesponse.pm,v 1.173 2005/07/11 18:24:12 albertel Exp $ +# $Id: caparesponse.pm,v 1.174 2005/07/11 18:35:23 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -353,7 +353,11 @@ sub end_numericalresponse { #} } my $response=$ans; - if ($unit) { + my $hideunit=&Apache::lonnet::EXT('resource.'.$partid.'_'. + $id.'.turnoffunit'); + if ($unit ne '' && + ! ($Apache::lonhomework::type eq 'exam' || + lc($hideunit) eq "yes") ) { my $cleanunit=$unit; $cleanunit=~s/\$\,//g; $response.=" $cleanunit";