зеркало из https://github.com/nextcloud/forms.git
Fix export multiple answers
Signed-off-by: Jonas Rittershofer <jotoeri@users.noreply.github.com>
This commit is contained in:
Родитель
e80b8ae3e8
Коммит
488b3568d3
|
@ -186,7 +186,14 @@ class SubmissionService {
|
|||
|
||||
// Answers, make sure we keep the question order
|
||||
$answers = array_reduce($this->answerMapper->findBySubmission($submission->getId()), function (array $carry, Answer $answer) {
|
||||
$carry[$answer->getQuestionId()] = $answer->getText();
|
||||
$questionId = $answer->getQuestionId();
|
||||
|
||||
// If key exists, insert separator
|
||||
if (key_exists($questionId, $carry)) {
|
||||
$carry[$questionId] .= '; ';
|
||||
}
|
||||
$carry[$questionId] .= $answer->getText();
|
||||
|
||||
return $carry;
|
||||
}, []);
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче