From f51a603f4c4ecc30829c20c9c3c6ab32787cf466 Mon Sep 17 00:00:00 2001 From: Gabriel Jenik Date: Wed, 25 Feb 2015 01:01:53 -0300 Subject: [PATCH] Fixed Issue: Reordering doesn't have to consider subquestions. --- 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 56a53c8c3e1..4ffb37751eb 100644 --- a/application/models/Question.php +++ b/application/models/Question.php @@ -168,7 +168,7 @@ public static function updateSortOrder($gid, $surveyid) function updateQuestionOrder($gid,$language,$position=0) { $data=Yii::app()->db->createCommand()->select('qid') - ->where(array('and','gid=:gid','language=:language')) + ->where(array('and','gid=:gid','language=:language', 'parent_qid=0')) ->order('question_order, title ASC') ->from('{{questions}}') ->bindParam(':gid', $gid, PDO::PARAM_INT)