Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed issue #05877: Resume later doesn't work with a survey allowing …
…public registration
- Loading branch information
1 parent
8dbb8e5
commit 3816326
Showing
2 changed files
with
97 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3816326
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This has a bug in submitanswer(). createinsertquery() doesn't exist any more, and isn' t needed, so submitanswer() is obsolete.
Take a look at LimeExpressionManager::_UpdateValuesInDatabase($updatedValues, $finished=true). This is called by the JumpTo() to statement to save the data prior to showsavedform() or savedsilent()
So, JumpTo will save the data (so you don't need savedanswer()). The only thing you want it to do is to set the submit date.
So, I recommend doing the following instead of this:
(1) change JumpTo to this:
static function JumpTo($seq,$preview=false,$processPOST=true,$force=false,$changeLang=false,$setSubmitDate=false)
(2) change _UpdateValuesInDataBase to:
private function _UpdateValuesInDatabase($updatedValues, $finished=false,$setSubmitDate=false)
(3) Have JumpTo pass the $setSubmitDate to _UpdateValuesInDatabase()
(4) Have _UpdateValuesInDatabase() set the submit date if either $finished (which it already does), or if $setSubmitDate.
That way you can completely delete submitanswer() again.