Skip to content

Commit

Permalink
Fixed issue : survey with 'alloweditaftercompletion' allways start at…
Browse files Browse the repository at this point in the history
… first step

Dev: If survey is already submitted: put maxstep to totalsteps for index
  • Loading branch information
Shnoulle committed Oct 10, 2013
1 parent 259927e commit 77f8219
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion application/controllers/survey/index.php
Expand Up @@ -609,13 +609,17 @@ function sendreq(surveyid)
if(($aRow['submitdate']==''|| $thissurvey['alloweditaftercompletion'] == 'Y') && $thissurvey['tokenanswerspersistence'] == 'Y')
{
$_SESSION['survey_'.$surveyid]['srid'] = $aRow['id'];
if (!is_null($aRow['lastpage']) && $aRow['submitdate']=='')
if (!is_null($aRow['lastpage']))
{
$_SESSION['survey_'.$surveyid]['LEMtokenResume'] = true;
$_SESSION['survey_'.$surveyid]['step'] = $aRow['lastpage'];
}
}
buildsurveysession($surveyid);
if($aRow['submitdate']!='') // alloweditaftercompletion
{
$_SESSION['survey_'.$surveyid]['maxstep'] = $_SESSION['survey_'.$surveyid]['totalsteps'];
}
loadanswers();
}
}
Expand Down

0 comments on commit 77f8219

Please sign in to comment.