Skip to content

Commit

Permalink
Dev: moved doAssessment to the right place
Browse files Browse the repository at this point in the history
  • Loading branch information
LouisGac committed Feb 23, 2017
1 parent 018a5fa commit 68574f9
Showing 1 changed file with 7 additions and 11 deletions.
18 changes: 7 additions & 11 deletions application/helpers/SurveyRuntimeHelper.php
Expand Up @@ -150,19 +150,9 @@ public function run($surveyid,$args)
$_SESSION[$this->LEMsessid]['maxstep'] = 0;
}

// TODO: remove those line, why a special condition when survey is not active VS when it's active and why HERE????
if ($this->thissurvey['active'] != "Y"){
// TODO: TWIG ASSESSMENTS !!!!!
if ($thissurvey['assessments'] == "Y"){
$assessments = $this->assessments = doAssessment($thissurvey['sid']);
}
}


$this->moveSubmitIfNeeded();



extract($aPrivateVariables); // For redata

// We really need to replace redata get_defined_vars by something else.
Expand Down Expand Up @@ -1260,7 +1250,13 @@ private function moveSubmitIfNeeded()

//Check for assessments

if ($thissurvey['assessments'] == "Y" && $this->assessments ){
// TODO: TWIG ASSESSMENTS !!!!!
if ($thissurvey['assessments'] == "Y"){
$assessments = $this->assessments = doAssessment($thissurvey['sid']);
}


if ($thissurvey['assessments'] == "Y" && $assessments ){
echo templatereplace(file_get_contents($sTemplateViewPath."assessment.pstpl"), array(), $redata, 'SubmitAssessmentI', false, NULL, array(), true );
}

Expand Down

0 comments on commit 68574f9

Please sign in to comment.