Diff for /loncom/homework/default_homework.lcpm between versions 1.145 and 1.147

version 1.145, 2009/06/23 03:01:15 version 1.147, 2010/01/06 16:59:30
Line 326  sub caparesponse_check_list { Line 326  sub caparesponse_check_list {
               $element =~ s/\s//g;                $element =~ s/\s//g;
           }            }
           my $appendunit=$unit;            my $appendunit=$unit;
           if (($unit=~/\%/) && ($answerunit ne '%'))  {  # Deal with percentages
              $element=$element/100;  # unit is unit entered by student, answerunit is unit by author
              $appendunit=~s/\%//;  # Deprecated: divide answer by 100 if student entered percent,
           }      # but author did not. Too much confusion
   #          if (($unit=~/\%/) && ($answerunit ne '%'))  {
   #             $element=$element/100;
   #             $appendunit=~s/\%//;
   #          }    
   # Author entered percent, student did not
             if (($unit!~/\%/) && ($answerunit=~/\%/)) {
                $element=$element*100;
                $appendunit='%'.$appendunit;
             }
   # Zero does not need a dimension
           if (($element==0) && ($unit!~/\w/) && ($answerunit=~/\w/)) {            if (($element==0) && ($unit!~/\w/) && ($answerunit=~/\w/)) {
              $appendunit=$answerunit;               $appendunit=$answerunit;
           }            }

Removed from v.1.145  
changed lines
  Added in v.1.147


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