Skip to content

Commit

Permalink
fix for passing the question to storeAnswersForQuestion
Browse files Browse the repository at this point in the history
  • Loading branch information
tpokorra committed Jan 5, 2024
1 parent 858da4a commit 81554b2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/Controller/ApiController.php
Original file line number Diff line number Diff line change
Expand Up @@ -966,8 +966,6 @@ public function getSubmissions(string $hash): DataResponse {
* @param array $answerArray [arrayOfString]
*/
private function storeAnswersForQuestion($submissionId, array $question, array $answerArray) {
$question = $questions[$questionIndex];

foreach ($answerArray as $answer) {
$answerText = '';

Expand Down Expand Up @@ -1092,6 +1090,8 @@ public function insertSubmission(int $formId, array $answers, string $shareHash
continue;
}

$question = $questions[$questionIndex];

$this->storeAnswersForQuestion($submission->getId(), $question, $answerArray);
}

Expand Down

0 comments on commit 81554b2

Please sign in to comment.