Skip to content

Commit

Permalink
Fixed issue #13305: Display Token Field on Welcome Screen don't work
Browse files Browse the repository at this point in the history
  • Loading branch information
LouisGac committed Feb 7, 2018
1 parent 6fbb06a commit e4cafc8
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions application/helpers/SurveyRuntimeHelper.php
Expand Up @@ -932,10 +932,14 @@ private function setStep()
*/
private function displayFirstPageIfNeeded()
{
// We do not keep the participant session anymore when the same browser is used to answer a second time a survey (let's think of a library PC for instance).
// Previously we used to keep the session and redirect the user to the
// submit page.
if ($this->sSurveyMode != 'survey' && $_SESSION[$this->LEMsessid]['step'] == 0) {
$bDisplayFirstPage = ($this->sSurveyMode != 'survey' && $_SESSION[$this->LEMsessid]['step'] == 0);

if ($this->sSurveyMode == 'survey' || $bDisplayFirstPage ){
$this->aSurveyInfo['description'] = $this->processString($this->aSurveyInfo['description']);
$this->aSurveyInfo['welcome'] = $this->processString($this->aSurveyInfo['welcome']) ;
}

if ($bDisplayFirstPage) {
$_SESSION[$this->LEMsessid]['test'] = time();
display_first_page($this->thissurvey, $this->aSurveyInfo);
Yii::app()->end(); // So we can still see debug messages
Expand Down

0 comments on commit e4cafc8

Please sign in to comment.