--- loncom/homework/default_homework.lcpm 2008/03/03 19:14:51 1.125 +++ loncom/homework/default_homework.lcpm 2008/03/05 15:31:57 1.126 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # used by lonxml::xmlparse() as input variable $safeinit to Apache::run::run() # -# $Id: default_homework.lcpm,v 1.125 2008/03/03 19:14:51 www Exp $ +# $Id: default_homework.lcpm,v 1.126 2008/03/05 15:31:57 www Exp $ # # Copyright Michigan State University Board of Trustees # @@ -166,7 +166,7 @@ sub caparesponse_check { $response=~s/[\s,]//g; } if ($type eq 'float' && $unit=~/\$/) { - if ($response!~/^\$/) { return ('NO_UNIT', undef); } + if ($response!~/^\$|\$$/) { return ('NO_UNIT', undef); } $response=~s/\$//g; } if ($type eq 'float' && $unit=~/\,/ && (&check_commas($response)<0)) {