version 1.151, 2010/12/16 16:01:01
|
version 1.152.2.1, 2011/08/03 03:37:23
|
Line 341 sub caparesponse_check_list {
|
Line 341 sub caparesponse_check_list {
|
$appendunit='%'.$appendunit; |
$appendunit='%'.$appendunit; |
} |
} |
# Zero does not need a dimension |
# Zero does not need a dimension |
if (($element==0) && ($unit!~/\w/) && ($answerunit=~/\w/)) { |
if (($element =~ /^[0\.]+$/) && ($unit!~/\w/) && ($answerunit=~/\w/)) { |
$appendunit=$answerunit; |
$appendunit=$answerunit; |
} |
} |
if ($appendunit ne '') { |
if ($appendunit ne '') { |
Line 364 sub caparesponse_check_list {
|
Line 364 sub caparesponse_check_list {
|
if (ref($LONCAPA::CAPAresponse_answer->{'answers'}) eq 'ARRAY') { |
if (ref($LONCAPA::CAPAresponse_answer->{'answers'}) eq 'ARRAY') { |
foreach my $strans (@{$LONCAPA::CAPAresponse_answer->{'answers'}}) { |
foreach my $strans (@{$LONCAPA::CAPAresponse_answer->{'answers'}}) { |
if (ref($strans) eq 'ARRAY') { |
if (ref($strans) eq 'ARRAY') { |
|
$ansstring = join("\0",@{$strans}); |
foreach my $item (@{$strans}) { |
foreach my $item (@{$strans}) { |
if ($item =~ /[\000-\037]/) { |
if ($item =~ /[\000-\037]/) { |
$allow_control_char = 1; |
$allow_control_char = 1; |
Line 372 sub caparesponse_check_list {
|
Line 373 sub caparesponse_check_list {
|
} |
} |
} |
} |
} |
} |
} |
|
if (($type eq 'cs') || ($type eq 'ci')) { |
|
if (ref($LONCAPA::CAPAresponse_answer->{'answers'}) eq 'ARRAY') { |
|
foreach my $answer (@{ $LONCAPA::CAPAresponse_answer->{'answers'} }) { |
|
if (ref($answer) eq 'ARRAY') { |
|
$ansstring = join("\0",@{$answer}); |
|
} |
|
} |
|
} |
|
} |
} |
|
|
# &LONCAPA_INTERNAL_DEBUG(&LONCAPA_INTERNAL_Dumper($responses)); |
# &LONCAPA_INTERNAL_DEBUG(&LONCAPA_INTERNAL_Dumper($responses)); |