From ac15ca875841824272dea56221a43fe3731dc595 Mon Sep 17 00:00:00 2001 From: GabrielJenik Date: Fri, 10 Jul 2020 14:56:12 -0300 Subject: [PATCH] Fixed issue #16454: Sometimes, question_order is assigned from survey_id When deleting a question, the order of questions in the group were reassigned by calling updateQuestionOrder, but the survey ID was passed as starting position. --- application/models/Question.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/application/models/Question.php b/application/models/Question.php index 6b7612cbb69..71e8a4920cb 100644 --- a/application/models/Question.php +++ b/application/models/Question.php @@ -428,7 +428,7 @@ public function delete() $this->removeFromLastVisited(); if (parent::delete()) { - Question::model()->updateQuestionOrder($this->gid, $this->sid); + Question::model()->updateQuestionOrder($this->gid); return true; } return false;