Survey bug fixes: Verbatim responses now properly recorded

Added useText option to responseValuesByVariableName so that it can be
used for both branch expressions and [[var]] text substitution correctly
Added extra verbatim handling to [[var]] text substitution
All survey test now pass, except for one involving True/False
multi-chocie bundle, soon to be fixed by updating bundle
This commit is contained in:
Patrick Donelan 2009-04-22 05:16:29 +00:00
parent fe671d74e5
commit 99855719d0
4 changed files with 123 additions and 126 deletions

View file

@ -1037,10 +1037,9 @@ sub addAnswersToQuestion {
# when updating answer text without causing side-effects for the caller's $address
my @address_copy = @{$address};
for my $answer_index ( 0 .. $#{$answers} ) {
for my $answer (@$answers) {
# Add a new answer to question
push @{ $self->question( \@address_copy )->{answers} }, $answers->[$answer_index];
push @{ $self->question( \@address_copy )->{answers} }, $answer;
}
return;