Skip to content

Commit

Permalink
Fixed issue: Unable to add answer options/subquestions or to edit quotas
Browse files Browse the repository at this point in the history
  • Loading branch information
c-schmitz committed Jun 12, 2015
1 parent 69bac0c commit 74eb721
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
16 changes: 8 additions & 8 deletions application/controllers/admin/quotas.php
Expand Up @@ -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);
}
}
Expand All @@ -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"));
}
}
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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));
Expand Down Expand Up @@ -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 == '!')
{

Expand Down Expand Up @@ -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;
Expand Down
Expand Up @@ -200,7 +200,7 @@
</p>
</div>

<div id="dialog-confirm-replace" title="<?php $clang->eT('Replace label set?'); ?>" style='display:none;'>
<div id="dialog-confirm-replace" title="<?php eT('Replace label set?'); ?>" style='display:none;'>
<p><span class="ui-icon ui-icon-alert" style="float:left; margin:0 7px 20px 0;"></span><span id='strReplaceMessage'></span></p>
</div>

Expand Down
Expand Up @@ -221,7 +221,7 @@ class="highlight"
<button id='btnlacancel' type='button'><?php eT('Cancel'); ?></button>
</p>
</div>
<div id="dialog-confirm-replace" title="<?php $clang->eT('Replace label set?'); ?>" style='display:none;'>
<div id="dialog-confirm-replace" title="<?php eT('Replace label set?'); ?>" style='display:none;'>
<p><span class="ui-icon ui-icon-alert" style="float:left; margin:0 7px 20px 0;"></span><span id='strReplaceMessage'></span></p>
</div>

Expand Down

0 comments on commit 74eb721

Please sign in to comment.