From 74eb721501c3a93c4bd5397b9b29847138d4a7f3 Mon Sep 17 00:00:00 2001 From: Carsten Schmitz Date: Fri, 12 Jun 2015 14:21:27 +0200 Subject: [PATCH] Fixed issue: Unable to add answer options/subquestions or to edit quotas --- application/controllers/admin/quotas.php | 16 ++++++++-------- .../admin/survey/Question/answerOptions_view.php | 2 +- .../admin/survey/Question/subQuestion_view.php | 2 +- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/application/controllers/admin/quotas.php b/application/controllers/admin/quotas.php index 74c7adea356..abb576fd2f0 100644 --- a/application/controllers/admin/quotas.php +++ b/application/controllers/admin/quotas.php @@ -63,7 +63,7 @@ private function _checkPermissions($iSurveyId, $sPermission) { $clang=$this->getController()->lang; if (!empty($sPermission) && !(Permission::model()->hasSurveyPermission($iSurveyId, 'quotas', $sPermission))) { - Yii::app()->session['flashmessage'] = $clang->gT('Access denied!'); + Yii::app()->session['flashmessage'] =gT('Access denied!'); $this->_redirectToIndex($iSurveyId); } } @@ -77,7 +77,7 @@ function _redirectToIndex($iSurveyId) } else { - Yii::app()->session['flashmessage'] = $clang->gT('Access denied!'); + Yii::app()->session['flashmessage'] =gT('Access denied!'); $this->getController()->redirect($this->getController()->createUrl("admin/survey/sa/view/surveyid/$iSurveyId")); } } @@ -164,7 +164,7 @@ function index($iSurveyId, $quickreport = false) header("Content-Disposition: attachment; filename=results-survey" . $iSurveyId . ".csv"); header("Content-type: text/comma-separated-values; charset=UTF-8"); header("Pragma: public"); - echo $clang->gT("Quota name") . "," . $clang->gT("Limit") . "," . $clang->gT("Completed") . "," . $clang->gT("Remaining") . "\r\n"; + echo gT("Quota name") . "," . gT("Limit") . "," . gT("Completed") . "," . gT("Remaining") . "\r\n"; foreach ($csvoutput as $line) { echo $line; @@ -354,7 +354,7 @@ function editquota($iSurveyId) $aTabTitles[$sLanguage] = getLanguageNameFromCode($sLanguage, false); if ($first) { - $aTabTitles[$sLanguage].= ' (' . $clang->gT("Base language") . ')'; + $aTabTitles[$sLanguage].= ' (' . gT("Base language") . ')'; $first = false; } $aData['langquotainfo'] = QuotaLanguageSetting::model()->findByAttributes(array('quotals_quota_id' => Yii::app()->request->getPost('quota_id'), 'quotals_language' => $sLanguage)); @@ -471,8 +471,8 @@ function getQuotaAnswers($iQuestionId, $iSurveyId, $iQuotaId) } elseif ($aQuestionType == 'G') { $aAnswerList = array( - 'M' => array('Title' => $aQuestion['title'], 'Display' => $clang->gT("Male"), 'code' => 'M'), - 'F' => array('Title' => $aQuestion['title'], 'Display' => $clang->gT("Female"), 'code' => 'F')); + 'M' => array('Title' => $aQuestion['title'], 'Display' => gT("Male"), 'code' => 'M'), + 'F' => array('Title' => $aQuestion['title'], 'Display' => gT("Female"), 'code' => 'F')); } elseif ($aQuestionType == 'L' || $aQuestionType == 'O' || $aQuestionType == '!') { @@ -516,8 +516,8 @@ function getQuotaAnswers($iQuestionId, $iSurveyId, $iQuotaId) } elseif ($aQuestionType == 'Y') { $aAnswerList = array( - 'Y' => array('Title' => $aQuestion['title'], 'Display' => $clang->gT("Yes"), 'code' => 'Y'), - 'N' => array('Title' => $aQuestion['title'], 'Display' => $clang->gT("No"), 'code' => 'N')); + 'Y' => array('Title' => $aQuestion['title'], 'Display' => gT("Yes"), 'code' => 'Y'), + 'N' => array('Title' => $aQuestion['title'], 'Display' => gT("No"), 'code' => 'N')); } elseif ($aQuestionType == 'I') { $slangs = Survey::model()->findByPk($iSurveyId)->additionalLanguages; diff --git a/application/views/admin/survey/Question/answerOptions_view.php b/application/views/admin/survey/Question/answerOptions_view.php index 0d072fac397..c8a71471460 100644 --- a/application/views/admin/survey/Question/answerOptions_view.php +++ b/application/views/admin/survey/Question/answerOptions_view.php @@ -200,7 +200,7 @@

- -