Skip to content

Commit

Permalink
Dev: Fix saving dual scale subquestions
Browse files Browse the repository at this point in the history
  • Loading branch information
olleharstedt committed Jun 5, 2018
1 parent c3a97d2 commit e6182d1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
11 changes: 4 additions & 7 deletions application/controllers/admin/questions.php
Original file line number Diff line number Diff line change
Expand Up @@ -708,13 +708,10 @@ public function _editsubquestion($surveyid, $gid, $qid)
// Check that there are subquestions translations for every language supported by the survey
foreach ($subquestiondata as $row) {
foreach ($aSurveyLanguages as $language) {
$qrow = QuestionL10n::model()->count('
qid = :qid AND
language = :$language',
array(
':qid' => $qid,
':language' => $language
));
$qrow = QuestionL10n::model()->count(
'qid = :qid',
[':qid' => $qid]
);
// Means that no record for the language exists in the questions table
if (empty($qrow)) {
$oQuestionL10n = new QuestionL10n;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,9 +132,9 @@
'surveyid' : surveyid,
'gid' : gid,
'qid' : row.qid,
'language' : row.language,
'language' : anslang,
'title' : row.title,
'question' : row.question,
'question' : row.questionL10ns[anslang].question,
'relevance' : row.relevance,
'oldCode' : true,
} %}
Expand Down

0 comments on commit e6182d1

Please sign in to comment.