Diff for /loncom/homework/default_homework.lcpm between versions 1.87 and 1.90

version 1.87, 2004/06/09 21:16:43 version 1.90, 2004/10/11 16:31:34
Line 41  sub caparesponse_check { Line 41  sub caparesponse_check {
     my $type=$LONCAPA::CAPAresponse_args{'type'};      my $type=$LONCAPA::CAPAresponse_args{'type'};
     my $tol=$LONCAPA::CAPAresponse_args{'tol'};      my $tol=$LONCAPA::CAPAresponse_args{'tol'};
     my $sig=$LONCAPA::CAPAresponse_args{'sig'};      my $sig=$LONCAPA::CAPAresponse_args{'sig'};
     my $ans_fmt=$LONCAPA::CAPAresponse_args{'ans_fmt'};      my $ans_fmt=$LONCAPA::CAPAresponse_args{'format'};
     my $unit=$LONCAPA::CAPAresponse_args{'unit'};      my $unit=$LONCAPA::CAPAresponse_args{'unit'};
     my $calc=$LONCAPA::CAPAresponse_args{'calc'};      my $calc=$LONCAPA::CAPAresponse_args{'calc'};
     my $samples=$LONCAPA::CAPAresponse_args{'samples'};      my $samples=$LONCAPA::CAPAresponse_args{'samples'};
Line 70  sub caparesponse_check { Line 70  sub caparesponse_check {
  $response=~s/ +/ /g;   $response=~s/ +/ /g;
     }      }
     if ($type eq 'float') { $response=~s/,//g; }      if ($type eq 'float') { $response=~s/,//g; }
       if ($type eq 'float' && $ans_fmt=~/\$/) {
    if ($response!~/^\$/)  { return "NO_UNIT: Missing \$ "; }
    $response=~s/\$//g;
       }
       $ans_fmt=~s/\W//g;
   
     if (length($response) > 500) { return "TOO_LONG: Answer too long"; }      if (length($response) > 500) { return "TOO_LONG: Answer too long"; }
   
     if ($type eq '' ) {      if ($type eq '' ) {
Line 508  sub chemparse { Line 514  sub chemparse {
     }      }
     next;      next;
  }   }
  $token =~ /^\s*(\d*)(.*)/;   $token =~ /^\s*(\d*(?:&frac\d\d)?)(.*)/;
  $formula .= $1 if ($1 > 1);  # stoichiometric coefficient          $formula .= $1 if ($1 ne '1');  # stoichiometric coefficient
   
  my $molecule = $2;   my $molecule = $2;
  # subscripts   # subscripts

Removed from v.1.87  
changed lines
  Added in v.1.90


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