Made sure Survey default question types upgrades with "Yes" being 1 and "No" being 0.
This commit is contained in:
parent
3d5c7e23d7
commit
6f4f5d9414
1 changed files with 7 additions and 1 deletions
|
|
@ -69,7 +69,13 @@ sub _loadValues{
|
|||
for my $value(@$values){
|
||||
my $answer = _getAnswer();
|
||||
$answer->{text} = $value->[0];
|
||||
$answer->{recordedAnswer} = $value->[1];
|
||||
if($answer->{text} eq 'No'){
|
||||
$answer->{recordedAnswer} = 0;
|
||||
}elsif($answer->{text} eq 'Yes'){
|
||||
$answer->{recordedAnswer} = 1;
|
||||
}else{
|
||||
$answer->{recordedAnswer} = $value->[1];
|
||||
}
|
||||
$answer->{verbatim} = $value->[2];
|
||||
push @$answers,$answer;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue