Merge pull request #386 from nextcloud/fix/result_order
This commit is contained in:
commit
af898d3ea4
5 changed files with 62 additions and 54 deletions
|
|
@ -648,16 +648,8 @@ class ApiController extends Controller {
|
|||
$submissions[] = $submission;
|
||||
}
|
||||
|
||||
// Load question-texts, including deleted ones.
|
||||
try {
|
||||
$questionEntities = $this->questionMapper->findByForm($form->getId());
|
||||
} catch (DoesNotExistException $e) {
|
||||
//handle silently
|
||||
}
|
||||
$questions = [];
|
||||
foreach ($questionEntities as $questionEntity) {
|
||||
$questions[] = $questionEntity->read();
|
||||
}
|
||||
// Load currently active questions
|
||||
$questions = $this->formsService->getQuestions($form->getId());
|
||||
|
||||
$response = [
|
||||
'submissions' => $submissions,
|
||||
|
|
|
|||
|
|
@ -85,7 +85,12 @@ class FormsService {
|
|||
$this->currentUser = $userSession->getUser();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Load options corresponding to question
|
||||
*
|
||||
* @param integer $questionId
|
||||
* @return array
|
||||
*/
|
||||
public function getOptions(int $questionId): array {
|
||||
$optionList = [];
|
||||
try {
|
||||
|
|
@ -100,6 +105,12 @@ class FormsService {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Load questions corresponding to form
|
||||
*
|
||||
* @param integer $formId
|
||||
* @return array
|
||||
*/
|
||||
public function getQuestions(int $formId): array {
|
||||
$questionList = [];
|
||||
try {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue