Skip to content

Commit

Permalink
Merge pull request #903 from drgrice1/bugfix/single-option-radio-or-c…
Browse files Browse the repository at this point in the history
…heck-hotfix

Fix the response group for single option radio or checkbox answers (hotfix).
  • Loading branch information
pstaabp authored Aug 10, 2023
2 parents de1a4bb + cc3a4cd commit 5201eb8
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/PGresponsegroup.pm
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,10 @@ sub append_response {
if (not_null($response_label)) {
if (not exists($self->{responses}{$response_label})) {
push @{ $self->{response_order} }, $response_label;
$self->{responses}{$response_label} = $response_value;
$self->{responses}{$response_label} =
ref($response_value) eq 'HASH'
? [ map { [ $_ => $response_value->{$_} ] } keys %$response_value ]
: $response_value;
} else {
$self->internal_debug_message(
"PGresponsegroup::append_response error: there is already an answer labeled $response_label",
Expand Down

0 comments on commit 5201eb8

Please sign in to comment.