Skip to content

Commit

Permalink
Fixed issue #05811: Group Index isn't in right language
Browse files Browse the repository at this point in the history
  • Loading branch information
TMSWhite committed Feb 17, 2012
1 parent 616222f commit 74e02c5
Showing 1 changed file with 17 additions and 5 deletions.
22 changes: 17 additions & 5 deletions group.php
Expand Up @@ -878,6 +878,7 @@ function checkconditions(value, name, type)

$stepIndex = LimeExpressionManager::GetStepIndexInfo();
$lastGseq=-1;
$gseq = -1;
for($v = 0, $n = 0; $n != $_SESSION['maxstep']; ++$n)
{
if (!isset($stepIndex[$n])) {
Expand All @@ -888,13 +889,24 @@ function checkconditions(value, name, type)
if (!$stepInfo['show'])
continue;

if ($surveyMode == 'question' && $lastGseq != $stepInfo['gseq']) {
// show the group label
echo '<h3>' . FlattenText($stepInfo['gname']) . "</h3>";
$lastGseq = $stepInfo['gseq'];
if ($surveyMode == 'question')
{
if ($lastGseq != $stepInfo['gseq']) {
// show the group label
++$gseq;
$g = $_SESSION['grouplist'][$gseq];
echo '<h3>' . FlattenText($g[1]) . "</h3>";
$lastGseq = $stepInfo['gseq'];
}
$q = $_SESSION['fieldarray'][$n];
}
else
{
++$gseq;
$g = $_SESSION['grouplist'][$gseq];
}

$sText = (($surveyMode == 'group') ? FlattenText($stepInfo['gname'] . ': ' . $stepInfo['gtext']) : FlattenText($stepInfo['qtext']));
$sText = (($surveyMode == 'group') ? FlattenText($g[1]) : FlattenText($q[3]));
$bGAnsw = !$stepInfo['anyUnanswered'];

++$v;
Expand Down

0 comments on commit 74e02c5

Please sign in to comment.