version 1.150, 2010/10/18 19:47:31
|
version 1.151, 2010/12/16 16:01:01
|
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; |
foreach my $item (@{$strans}) { |
|
if ($item =~ /[\000-\037]/) { |
|
$allow_control_char = 1; |
|
} |
|
} |
|
} |
|
} |
|
} |
|
} |
|
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}); |
} |
} |
} |
} |
} |
} |
Line 476 sub caparesponse_check_list {
|
Line 490 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 { |