--- loncom/homework/default_homework.lcpm 2008/06/14 16:34:54 1.137 +++ loncom/homework/default_homework.lcpm 2008/09/06 21:39:15 1.138 @@ -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.137 2008/06/14 16:34:54 www Exp $ +# $Id: default_homework.lcpm,v 1.138 2008/09/06 21:39:15 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -316,7 +316,9 @@ sub caparesponse_check_list { $unit=~s/\s//; foreach my $response (@$responses) { foreach my $element (@$response) { - $element =~ s/\s//g; + if (($type eq 'float') || (($type eq '') && ($unit ne ''))) { + $element =~ s/\s//g; + } my $appendunit=$unit; if ($unit=~/\%/) { $element=$element/100;