Skip to content

Commit

Permalink
Dev: added param for Current language code
Browse files Browse the repository at this point in the history
  • Loading branch information
LouisGac committed Feb 21, 2017
1 parent f130d3c commit 5678601
Showing 1 changed file with 4 additions and 11 deletions.
15 changes: 4 additions & 11 deletions application/helpers/SurveyRuntimeHelper.php
Expand Up @@ -46,6 +46,7 @@ class SurveyRuntimeHelper {
private $totalquestions; // Number of question in the survey. Same, should be moved to survey model.
private $bTokenAnswerPersitance; // Are token used? Same...
private $assessments; // Is assement used? Same...
private $sLangCode; // Current language code

// moves
private $moveResult = null; // Contains the result of LimeExpressionManager::JumpTo() OR LimeExpressionManager::NavigateBackwards() OR NavigateForwards::LimeExpressionManager(). TODO: create a function LimeExpressionManager::MoveTo that call the right method
Expand Down Expand Up @@ -108,24 +109,17 @@ public function run($surveyid,$args)
$previewgrp = $this->previewgrp = ($surveyMode == 'group' && isset($param['action']) && ($param['action'] == 'previewgroup')) ? true : false;
$previewquestion = $this->previewquestion = ($surveyMode == 'question' && isset($param['action']) && ($param['action'] == 'previewquestion')) ? true : false;
$preview = $this->preview = ($previewquestion || $previewgrp);
$sLangCode = $this->sLangCode = App()->language;
$show_empty_group = $this->show_empty_group;


$this->setJavascriptVar($surveyid);
$this->setArgs();

$aPrivateVariables = array();



// SOME RENDERING THAT WAS IN THE WRONG PLACE INSIDE RUN PAGE
// WE'RE MOVING THEM HERE AS A FIRST CYCLE OF DEV



$LEMsessid = $this->LEMsessid;

// language changer
$sLangCode = App()->language;

$thissurvey['alanguageChanger']['show'] = false;
$alanguageChangerDatas = getLanguageChangerDatas($sLangCode);
if ($alanguageChangerDatas){
Expand All @@ -136,7 +130,6 @@ public function run($surveyid,$args)

// First time the survey is loaded
if (!isset($_SESSION[$LEMsessid]['step'])){
// WAS INSIDE buildsurveysession($surveyid);
$this->showTokenOrCaptchaFormsIfNeeded();
}

Expand Down

0 comments on commit 5678601

Please sign in to comment.