Skip to content

Commit

Permalink
Fixed issue: Quota not working for array 10-point
Browse files Browse the repository at this point in the history
  • Loading branch information
olleharstedt committed Mar 27, 2020
1 parent d2df443 commit 83683d3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions application/controllers/admin/quotas.php
Expand Up @@ -546,14 +546,14 @@ public function getQuotaAnswers($iQuestionId, $iSurveyId, $iQuotaId)
}
}
} elseif ($aQuestionType == 'B') {
$aAnsResults = Answer::model()->findAllByAttributes(array('qid' => $iQuestionId, 'language' => $sBaseLang));
$aAnsResults = Question::model()->findAllByAttributes(array('parent_qid' => $iQuestionId));

$aAnswerList = array();

foreach ($aAnsResults as $aDbAnsList) {
for ($x = 1; $x < 11; $x++) {
$tmparrayans = array('Title' => $aQuestion['title'], 'Display' => substr($aDbAnsList['answer'], 0, 40).' ['.$x.']', 'code' => $aDbAnsList['code']);
$aAnswerList[$aDbAnsList['code']."-".$x] = $tmparrayans;
$tmparrayans = array('Title' => $aQuestion['title'], 'Display' => substr($aDbAnsList['question'], 0, 40).' ['.$x.']', 'code' => $aDbAnsList['title']);
$aAnswerList[$aDbAnsList['title']."-".$x] = $tmparrayans;
}
}
} elseif ($aQuestionType == 'Y') {
Expand Down

0 comments on commit 83683d3

Please sign in to comment.