Skip to content

Commit

Permalink
Fixed issue: Notice if survey is activated and question is edited
Browse files Browse the repository at this point in the history
  • Loading branch information
c-schmitz committed Jan 22, 2018
1 parent 1ab319c commit 2c690f5
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions application/controllers/admin/questions.php
Expand Up @@ -1298,18 +1298,16 @@ public function index($sa, $surveyid, $gid, $qid = null)
// $surveyinfo = array_map('flattenText', $surveyinfo);
$aData['activated'] = $activated = $sumresult1->active;

if ($activated != "Y") {
// Prepare selector Class for javascript function
if (Yii::app()->session['questionselectormode'] !== 'default') {
$selectormodeclass = Yii::app()->session['questionselectormode'];
} else {
$selectormodeclass = getGlobalSetting('defaultquestionselectormode');
}

$aData['selectormodeclass'] = $selectormodeclass;
$aData['ajaxDatas']['selectormodeclass'] = $selectormodeclass;
// Prepare selector Class for javascript function
if (Yii::app()->session['questionselectormode'] !== 'default') {
$selectormodeclass = Yii::app()->session['questionselectormode'];
} else {
$selectormodeclass = getGlobalSetting('defaultquestionselectormode');
}

$aData['selectormodeclass'] = $selectormodeclass;
$aData['ajaxDatas']['selectormodeclass'] = $selectormodeclass;

/**
* Since is moved via ajax call only : it's not needed, when we have time : readd it for no-js solution
*/
Expand Down

0 comments on commit 2c690f5

Please sign in to comment.