Skip to content

Commit

Permalink
Fixed issue #13915: Cannot submit survey with mandatory question and …
Browse files Browse the repository at this point in the history
…cookie to prevent repeated participation
  • Loading branch information
LouisGac committed Jul 27, 2018
1 parent 8c06cd2 commit 635a786
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion application/helpers/SurveyRuntimeHelper.php
Expand Up @@ -581,7 +581,7 @@ private function setArgs()
//don't use cookies if tokens are being used
if (!empty($this->aSurveyInfo['active']) && $this->aSurveyInfo['active'] == "Y") {
global $tokensexist;
if ($this->aSurveyInfo['usecookie'] == "Y" && $tokensexist != 1) {
if ($this->aSurveyInfo['usecookie'] == "Y" && $tokensexist != 1 && $this->aMoveResult['finished'] == true ) {
setcookie("LS_".$this->iSurveyid."_STATUS", "COMPLETE", time() + 31536000); //Cookie will expire in 365 days
}
}
Expand Down

0 comments on commit 635a786

Please sign in to comment.