Skip to content

Commit

Permalink
Fixed issue #05844: Validation message should not be shown when using…
Browse files Browse the repository at this point in the history
… resume later function

Dev also prevents display of red messages when resume a survey
  • Loading branch information
TMSWhite committed Feb 22, 2012
1 parent adb2441 commit af1ac5a
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions application/helpers/SurveyRuntimeHelper.php
Expand Up @@ -107,7 +107,15 @@ function run($surveyid,$args) {
{
$_SESSION['survey_'.$surveyid]['maxstep'] = 0;
}
$_SESSION['survey_'.$surveyid]['prevstep'] = $_SESSION['survey_'.$surveyid]['step'];

if (!(isset($_POST['saveall']) || isset($_POST['saveprompt']) || isset($_POST['loadall']) || isset($_GET['sid'])))
{
$_SESSION['survey_'.$surveyid]['prevstep'] = $_SESSION['survey_'.$surveyid]['step'];
}
if (!isset($_SESSION['prevstep']))
{
$_SESSION['survey_'.$surveyid]['prevstep']=-1; // this only happens on re-load
}

if (isset($_SESSION['LEMpostKey']) && isset($_POST['LEMpostKey']) && $_POST['LEMpostKey'] != $_SESSION['LEMpostKey'])
{
Expand All @@ -127,7 +135,8 @@ function run($surveyid,$args) {
{
LimeExpressionManager::StartSurvey($thissurvey['sid'], $surveyMode, $surveyOptions, false,$LEMdebugLevel);
$moveResult = LimeExpressionManager::JumpTo($_SESSION['survey_'.$surveyid]['step']+1,false,false); // if late in the survey, will re-validate contents, which may be overkill
unset($_SESSION['LEMtokenResume']);
unset($_SESSION['LEMtokenResume']);
unset($_SESSION['LEMreload']);
}
else
{
Expand Down

0 comments on commit af1ac5a

Please sign in to comment.