Skip to content

Commit

Permalink
Fixed issue #14598: Bad order shown in List question (#1237)
Browse files Browse the repository at this point in the history
Dev: question order get group_order
Dev: add “Group / “ before Question order
  • Loading branch information
Shnoulle committed May 2, 2019
1 parent 48b1078 commit 3337b5a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
8 changes: 5 additions & 3 deletions application/models/Question.php
Expand Up @@ -980,8 +980,8 @@ public function search()
'desc'=>'t.qid desc',
),
'question_order'=>array(
'asc'=>'t.question_order asc',
'desc'=>'t.question_order desc',
'asc'=>'groups.group_order asc, t.question_order asc',
'desc'=>'groups.group_order desc,t.question_order desc',
),
'title'=>array(
'asc'=>'t.title asc',
Expand All @@ -1008,7 +1008,9 @@ public function search()
),
);

$sort->defaultOrder = array('question_order' => CSort::SORT_ASC);
$sort->defaultOrder = array(
'question_order' => CSort::SORT_ASC,
);

$criteria = new CDbCriteria;
$criteria->with = array('groups');
Expand Down
6 changes: 4 additions & 2 deletions application/views/admin/survey/Question/listquestions.php
Expand Up @@ -73,9 +73,9 @@
'value'=>'$data->qid',
),
array(
'header' => gT('Question order'),
'header' => gT("Group / Question order"),
'name' => 'question_order',
'value'=>'$data->question_order',
'value'=>'$data->groups->group_order ." / ". $data->question_order',
),
array(
'header' => gT('Code'),
Expand All @@ -96,11 +96,13 @@
'value'=>'$data->typedesc',
'htmlOptions' => array('class' => 'col-md-1'),
),

array(
'header' => gT('Group'),
'name' => 'group',
'value'=>'$data->groups->group_name',
),

array(
'header' => gT('Mandatory'),
'type' => 'raw',
Expand Down

0 comments on commit 3337b5a

Please sign in to comment.