Skip to content

Commit

Permalink
Fixed issue: randomization group + "all in one" mode ==> all question…
Browse files Browse the repository at this point in the history
…s of the survey are shown in all groups
  • Loading branch information
LouisGac committed Jul 23, 2018
1 parent 263a50a commit f99c977
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions application/helpers/SurveyRuntimeHelper.php
Expand Up @@ -290,7 +290,7 @@ public function run($surveyid, $args)
$this->aSurveyInfo['jPopup'] = json_encode($aPopup);

$aErrorHtmlMessage = $this->getErrorHtmlMessage();
$this->aSurveyInfo['errorHtml']['show'] = !empty($aErrorHtmlMessage) && $this->oTemplate->showpopups==0;
$this->aSurveyInfo['errorHtml']['show'] = !empty($aErrorHtmlMessage) && $this->oTemplate->showpopups==0;
$this->aSurveyInfo['errorHtml']['hiddenClass'] = $this->oTemplate->showpopups==1 ? "ls-js-hidden " : "";
$this->aSurveyInfo['errorHtml']['messages'] = $aErrorHtmlMessage;

Expand Down Expand Up @@ -339,7 +339,7 @@ public function run($surveyid, $args)
// one entry per QID
foreach ($qanda as $qa) {

if ($gid == $qa[6] || isset($_SESSION[$this->LEMsessid]['fieldmap-'.$this->iSurveyid.'-randMaster'])) {
if ($gid == $qa[6] || ( isset($_SESSION[$this->LEMsessid]['fieldmap-'.$this->iSurveyid.'-randMaster']) && $this->sSurveyMode != 'survey' ) ) {
$qid = $qa[4];
$qinfo = LimeExpressionManager::GetQuestionStatus($qid);
$lemQuestionInfo = LimeExpressionManager::GetQuestionStatus($qid);
Expand Down Expand Up @@ -935,7 +935,7 @@ private function displayFirstPageIfNeeded()
$bDisplayFirstPage = ($this->sSurveyMode != 'survey' && $_SESSION[$this->LEMsessid]['step'] == 0);

if ($this->sSurveyMode == 'survey' || $bDisplayFirstPage) {

//Failsave to have a general standard value
if (empty($this->aSurveyInfo['datasecurity_notice_label'])) {
$this->aSurveyInfo['datasecurity_notice_label'] = gT("To continue please first accept our survey data policy.");
Expand All @@ -944,7 +944,7 @@ private function displayFirstPageIfNeeded()
if (empty($this->aSurveyInfo['datasecurity_error'])) {
$this->aSurveyInfo['datasecurity_error'] = gT("We are sorry but you can't proceed without first agreeing to our survey data policy.");
}


$this->aSurveyInfo['datasecurity_notice_label'] = Survey::replacePolicyLink($this->aSurveyInfo['datasecurity_notice_label'],$this->aSurveyInfo['sid']);
}
Expand All @@ -968,7 +968,7 @@ private function checkForDataSecurityAccepted(){
$this->displayFirstPageIfNeeded(true);
Yii::app()->end(); // So we can still see debug messages
}
}
}
}

/**
Expand Down

0 comments on commit f99c977

Please sign in to comment.