Skip to content

Commit

Permalink
Fixed issue: Unable to edit a survey without question
Browse files Browse the repository at this point in the history
Dev: else  Undefined variable: questions
  • Loading branch information
Shnoulle committed Dec 3, 2012
1 parent b92ffb7 commit 86e3b87
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions application/controllers/admin/surveyadmin.php
Expand Up @@ -173,6 +173,7 @@ function editsurveysettings($iSurveyID)
$aData = array_merge($aData, $this->_tabResourceManagement($iSurveyID));

$oResult = Questions::model()->with('groups')->with('question_types')->with('parents')->findAllByAttributes(array('sid' => $iSurveyID, 'language' => $esrow['language']), array('index' => 'qid', 'order' => 'group_order, t.question_order'));
$questions=array();
foreach ($oResult as $result)
{
$q = createQuestion(empty($result->question_types['class']) ? $oResult[$result['parent_qid']]->question_types['class'] : $result->question_types['class'] );
Expand Down

0 comments on commit 86e3b87

Please sign in to comment.