version 1.55, 2002/11/15 17:06:08
|
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,"; |
Line 567 sub map {
|
Line 572 sub map {
|
} |
} |
} |
} |
} |
} |
&random_set_seed(@seed); |
&random_set_seed(@oldseed); |
return ''; |
return ''; |
} |
} |
|
|