version 1.150, 2010/10/18 19:47:31
|
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 359 sub caparesponse_check_list {
|
Line 359 sub caparesponse_check_list {
|
|
|
my $allow_control_char = 0; |
my $allow_control_char = 0; |
my $control_chars_removed = 0; |
my $control_chars_removed = 0; |
|
my $ansstring; |
if ($type eq 'cs' || $type eq 'ci') { |
if ($type eq 'cs' || $type eq 'ci') { |
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 ($strans =~ /[\000-\037]/) { |
if (ref($strans) eq 'ARRAY') { |
$allow_control_char = 1; |
$ansstring = join("\0",@{$strans}); |
|
foreach my $item (@{$strans}) { |
|
if ($item =~ /[\000-\037]/) { |
|
$allow_control_char = 1; |
|
} |
|
} |
} |
} |
} |
} |
} |
} |
Line 476 sub caparesponse_check_list {
|
Line 482 sub caparesponse_check_list {
|
&LONCAPA_INTERNAL_DEBUG(" all final_awards ".join(':',@final_awards)); |
&LONCAPA_INTERNAL_DEBUG(" all final_awards ".join(':',@final_awards)); |
my ($final_award,$final_msg) = |
my ($final_award,$final_msg) = |
&LONCAPA_INTERNAL_FINALIZEAWARDS(\@final_awards,\@final_msg,undef,1); |
&LONCAPA_INTERNAL_FINALIZEAWARDS(\@final_awards,\@final_msg,undef,1); |
return ($final_award,$final_msg,$error,$control_chars_removed); |
return ($final_award,$final_msg,$error,$control_chars_removed,$ansstring); |
} |
} |
|
|
sub verify_stringresponse { |
sub verify_stringresponse { |