From d5fce75aef830dd86b197502549bd8768289714b Mon Sep 17 00:00:00 2001 From: LouisGac Date: Wed, 11 Jan 2017 11:28:25 +0100 Subject: [PATCH] Dev: fill $thissurvey with the needed datas for the twig progress bar. --- application/helpers/SurveyRuntimeHelper.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/application/helpers/SurveyRuntimeHelper.php b/application/helpers/SurveyRuntimeHelper.php index 4df720218f2..e726b8d1938 100644 --- a/application/helpers/SurveyRuntimeHelper.php +++ b/application/helpers/SurveyRuntimeHelper.php @@ -288,9 +288,14 @@ public function run($surveyid,$args) if ($surveyMode != 'survey' && isset($thissurvey['showprogress']) && $thissurvey['showprogress'] == 'Y'){ if ($show_empty_group){ - $percentcomplete = makegraph($_SESSION[$LEMsessid]['totalsteps'] + 1, $_SESSION[$LEMsessid]['totalsteps']); + // $percentcomplete = makegraph($_SESSION[$LEMsessid]['totalsteps'] + 1, $_SESSION[$LEMsessid]['totalsteps']); + $thissurvey['progress']['currentstep'] = $_SESSION[$LEMsessid]['totalsteps'] + 1; + $thissurvey['progress']['total'] = $_SESSION[$LEMsessid]['totalsteps']; }else{ - $percentcomplete = makegraph($_SESSION[$LEMsessid]['step'], $_SESSION[$LEMsessid]['totalsteps']); + // $percentcomplete = makegraph($_SESSION[$LEMsessid]['step'], $_SESSION[$LEMsessid]['totalsteps']); + $thissurvey['progress']['currentstep'] = $_SESSION[$LEMsessid]['step']; + $thissurvey['progress']['total'] = $_SESSION[$LEMsessid]['totalsteps']; + } }