Diff for /loncom/homework/default_homework.lcpm between versions 1.127 and 1.128

version 1.127, 2008/03/05 16:06:39 version 1.128, 2008/03/05 18:05:05
Line 310  sub caparesponse_check_list { Line 310  sub caparesponse_check_list {
     my $unit;      my $unit;
     if ($type eq '' || $type eq 'float') {      if ($type eq '' || $type eq 'float') {
  #for numerical problems split off the unit   #for numerical problems split off the unit
  if ( $responses->[0][-1]=~ /(.*[^\s])\s+([^\s]+)/ ) {  # if ( $responses->[0][-1]=~ /(.*[^\s])\s+([^\s]+)/ ) {
           if ( $responses->[0][-1]=~ /^([\d\.\,\s\$]*(?:(?:[xX\*]10[\^\*]*|[eE]*)[\+\-]*\d*)*(?:^|\S)\d)([\w\s][\$\s\w\^\*\/\(\)\+\-]*)$/ ) {
     $responses->[0][-1]=$1;      $responses->[0][-1]=$1;
     $unit=$2;      $unit=&capa_formula_fix($2);
               &LONCAPA_INTERNAL_DEBUG("Found unit :$unit:");
  }   }
     }      }
     &LONCAPA_INTERNAL_DEBUG("Final final response :$responses->[0][-1]:$unit:");      &LONCAPA_INTERNAL_DEBUG("Final final response :$responses->[0][-1]:$unit:");

Removed from v.1.127  
changed lines
  Added in v.1.128


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>