Skip to content

Commit

Permalink
[fix] Issue with relevance on X scale with multilingual
Browse files Browse the repository at this point in the history
  • Loading branch information
Shnoulle committed Mar 20, 2016
1 parent 9a4b143 commit f02cd40
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions application/controllers/admin/database.php
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ function index($sa = null)
{
Yii::app()->setFlashMessage(gT("Failed to update answers"),'error');
}
}
}
// Updating code (oldcode!==null) => update condition with the new code
$sOldCode=Yii::app()->request->getPost('oldcode_'.$iSortOrderID.'_'.$iScaleID);
if(isset($sOldCode) && $sCode !== $sOldCode) {
Expand Down Expand Up @@ -286,11 +286,11 @@ function index($sa = null)
$oSubQuestion->parent_qid=$iQuestionID;
$oSubQuestion->language=$sLanguage;
$oSubQuestion->scale_id=$iScaleID;
if(isset($aRelevance[0][$iPosition]))
if(isset($aRelevance[$iScaleID][$iPosition]))
{
$oSubQuestion->relevance=$aRelevance[0][$iPosition];
$oSubQuestion->relevance=$aRelevance[$iScaleID][$iPosition];
}
else
else
{
$oSubQuestion->relevance='';
}
Expand All @@ -309,7 +309,14 @@ function index($sa = null)
$oSubQuestion->parent_qid=$iQuestionID;
$oSubQuestion->language=$sLanguage;
$oSubQuestion->scale_id=$iScaleID;
$oSubQuestion->relevance=$aRelevance[$iScaleID][$iPosition];
if(isset($aRelevance[$iScaleID][$iPosition]))
{
$oSubQuestion->relevance=$aRelevance[$iScaleID][$iPosition];
}
else
{
$oSubQuestion->relevance='';
}
}
}
if ($oSubQuestion->qid) {
Expand Down

0 comments on commit f02cd40

Please sign in to comment.