--- loncom/homework/default_homework.lcpm 2011/02/26 17:50:13 1.152 +++ loncom/homework/default_homework.lcpm 2011/08/03 03:37:23 1.152.2.1 @@ -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.152 2011/02/26 17:50:13 raeburn Exp $ +# $Id: default_homework.lcpm,v 1.152.2.1 2011/08/03 03:37:23 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -341,7 +341,7 @@ sub caparesponse_check_list { $appendunit='%'.$appendunit; } # Zero does not need a dimension - if (($element==0) && ($unit!~/\w/) && ($answerunit=~/\w/)) { + if (($element =~ /^[0\.]+$/) && ($unit!~/\w/) && ($answerunit=~/\w/)) { $appendunit=$answerunit; } if ($appendunit ne '') {