Skip to content

Commit

Permalink
Fixed issue #11746: Notice when previewing a hidden question and debu…
Browse files Browse the repository at this point in the history
…g mode activated
  • Loading branch information
c-schmitz committed Oct 13, 2016
1 parent 6b9fc60 commit 31eba5b
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions application/helpers/SurveyRuntimeHelper.php
Expand Up @@ -1022,6 +1022,10 @@ function run($surveyid,$args)
// TMSW - could iterate through LEM::currentQset instead

//// To diplay one question, all the questions are processed ?
if (!isset($qanda))
{
$qanda=array();
}
foreach ($_SESSION[$LEMsessid]['fieldarray'] as $key => $ia)
{
++$qnumber;
Expand Down Expand Up @@ -1329,11 +1333,14 @@ function run($surveyid,$args)
echo templatereplace($question_template, $aQuestionReplacement, $redata, false, false, $qa[4]);

}
if ($surveyMode == 'group') {
echo "<input type='hidden' name='lastgroup' value='$lastgroup' id='lastgroup' />\n"; // for counting the time spent on each group
}
if ($surveyMode == 'question') {
echo "<input type='hidden' name='lastanswer' value='$lastanswer' id='lastanswer' />\n";
if (!empty($qanda))
{
if ($surveyMode == 'group') {
echo "<input type='hidden' name='lastgroup' value='$lastgroup' id='lastgroup' />\n"; // for counting the time spent on each group
}
if ($surveyMode == 'question') {
echo "<input type='hidden' name='lastanswer' value='$lastanswer' id='lastanswer' />\n";
}
}

echo "\n\n<!-- END THE GROUP -->\n";
Expand Down

0 comments on commit 31eba5b

Please sign in to comment.