Skip to content

Commit

Permalink
Fixed issue #14855: Allowed invalid completed survey with full index
Browse files Browse the repository at this point in the history
Dev: Maybe better in EM, but more potential issue inside EM
Dev: Reset to null before validate Survey again
  • Loading branch information
Shnoulle committed May 10, 2019
1 parent 134f596 commit 49237af
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions application/helpers/SurveyRuntimeHelper.php
Expand Up @@ -889,6 +889,12 @@ private function checkIfFinished()
// With complete index, we need to revalidate whole group bug #08806. It's actually the only mode where we JumpTo with force
// we already done if move == 'movesubmit', don't do it again
if ($this->aMoveResult['finished'] == true && $this->sMove != 'movesubmit' && $this->thissurvey['questionindex'] == 2) {
/* Issue #14855 : always reset submitdate of current response to null */
if(!empty($_SESSION[$this->LEMsessid]['srid'])) {
$oSurveyResponse = SurveyDynamic::model($this->iSurveyid)->findByAttributes(['id' => $_SESSION[$this->LEMsessid]['srid']]);
$oSurveyResponse->submitdate = null;
$oSurveyResponse->save();
}
/* Save current page */
LimeExpressionManager::JumpTo($_SESSION[$this->LEMsessid]['step'], false, true, true);
/* Move to start */
Expand Down

0 comments on commit 49237af

Please sign in to comment.