Diff for /loncom/homework/default_homework.lcpm between versions 1.56 and 1.57

version 1.56, 2003/02/10 21:41:25 version 1.57, 2003/02/12 22:45:01
Line 152  sub get_array_args { Line 152  sub get_array_args {
 sub caparesponse_check_list {  sub caparesponse_check_list {
   my ($response,$expr)=@_;    my ($response,$expr)=@_;
   my $result;    my $result;
     $expr =~ s/\\/\\\\/g;
     $expr =~ s/\'/\\\'/g;
   my ($result,@list) = &get_array_args($expr,'answer');    my ($result,@list) = &get_array_args($expr,'answer');
   my $aresult='';    my $aresult='';
   my $current_answer;    my $current_answer;
Line 180  sub caparesponse_check_list { Line 182  sub caparesponse_check_list {
   my $awards='';    my $awards='';
   for ($i=0; $i<@list;$i++) {    for ($i=0; $i<@list;$i++) {
     $result.="trying answer :$list[$i]:\n";      $result.="trying answer :$list[$i]:\n";
       my $thisanswer=$list[$i];
       $thisanswer=~ s/\\/\\\\/g;
       $thisanswer =~ s/\'/\\\'/g;
     if ($unit eq '') {      if ($unit eq '') {
       $aresult=&caparesponse_check($responselist[$i],        $aresult=&caparesponse_check($responselist[$i],
      $expr.';my $answer=\''.$list[$i].'\';');       $expr.';my $answer=\''.$thisanswer.'\';');
     } else {      } else {
       $aresult=&caparesponse_check($responselist[$i]." $unit",        $aresult=&caparesponse_check($responselist[$i]." $unit",
    $expr.';my $answer=\''.$list[$i].'\';');     $expr.';my $answer=\''.$thisanswer.'\';');
     }      }
     my ($temp)=split /:/, $aresult;      my ($temp)=split /:/, $aresult;
     $awards.="$temp,";      $awards.="$temp,";

Removed from v.1.56  
changed lines
  Added in v.1.57


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