Skip to content

Commit

Permalink
Dev: comments on runPage()
Browse files Browse the repository at this point in the history
  • Loading branch information
LouisGac committed Nov 21, 2016
1 parent 5689972 commit 24ab212
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion application/helpers/SurveyRuntimeHelper.php
Expand Up @@ -608,6 +608,20 @@ public function run($surveyid,$args)
}


/**
* This method perform different tasks that should be distributed in different functions.
* The execution order could probably be improved.
*
* - It init the needed variables for navigation: initFirstStep, initTotalAndMaxSteps, setMoveResult
* - Then perform all the needed checks before moving:
* + did the participant used browser navigation?
* + did he pressed clear cancel, is he a confirmed quota?
* + Is the previous step set?
* + Is the survey finished?
* + Should the first page be displayed?
* + Are all the answer validated? (like: participant didn't answered to a mandatory question)
* - Then it will save the survey or submit it if needed. ?
*/
private function runPage()
{

Expand Down Expand Up @@ -669,7 +683,7 @@ private function runPage()
//SUBMIT ###############################################################################
$this->moveSubmitIfNeeded($redata);

}
}

private function getSurveyMode($thissurvey)
{
Expand Down

0 comments on commit 24ab212

Please sign in to comment.