From 5936e01a9828d7b922167d4012a8e20899f35c75 Mon Sep 17 00:00:00 2001 From: LouisGac Date: Thu, 30 Mar 2017 14:35:47 +0200 Subject: [PATCH] Dev: unattached active survey context from preview testing --- application/helpers/SurveyRuntimeHelper.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/application/helpers/SurveyRuntimeHelper.php b/application/helpers/SurveyRuntimeHelper.php index b4f7c5c890c..1754be4c941 100644 --- a/application/helpers/SurveyRuntimeHelper.php +++ b/application/helpers/SurveyRuntimeHelper.php @@ -161,7 +161,10 @@ public function run($surveyid,$args) $qSec = LimeExpressionManager::GetQuestionSeq($_qid); $moveResult = LimeExpressionManager::JumpTo($qSec+1,true,false,true); $stepInfo = $this->stepInfo = LimeExpressionManager::GetStepIndexInfo($moveResult['seq']); - }else{ + } + + if ( !$previewgrp && !$surveyMode) + { if (($show_empty_group) || !isset($_SESSION[$LEMsessid]['grouplist'])){ $gid = -1; // Make sure the gid is unused. This will assure that the foreach (fieldarray as ia) has no effect. $groupname = gT("Submit your answers"); @@ -181,7 +184,7 @@ public function run($surveyid,$args) - + // NOTE: must stay after GET GROUP DETAIL because of ()$surveyMode == 'group' && $previewgrp) condition touching step if ($_SESSION[$LEMsessid]['step'] > $_SESSION[$LEMsessid]['maxstep']) { $_SESSION[$LEMsessid]['maxstep'] = $_SESSION[$LEMsessid]['step'];