Skip to content

Commit

Permalink
Dev: Fix bug with array-by-column mandatory reload
Browse files Browse the repository at this point in the history
  • Loading branch information
olleharstedt committed Apr 14, 2016
1 parent 624bd49 commit 17cefda
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions application/helpers/qanda_helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -5663,18 +5663,18 @@ function do_arraycolumns($ia)
$aData['aQuestions'][$j]['myfname'] = $myfname;
if (isset($_SESSION['survey_'.Yii::app()->getConfig('surveyID')][$myfname]) && $_SESSION['survey_'.Yii::app()->getConfig('surveyID')][$myfname] == $ansrow['code'])
{
$aData['aQuestions'][$j]['checked'] = CHECKED;
$aData['checked'][$ansrow['code']][$ld] = CHECKED;
}
elseif (!isset($_SESSION['survey_'.Yii::app()->getConfig('surveyID')][$myfname]) && $ansrow['code'] == '')
{
$aData['aQuestions'][$j]['checked'] = CHECKED;
$aData['checked'][$ansrow['code']][$ld] = CHECKED;
// Humm.. (by lemeur), not sure this section can be reached
// because I think $_SESSION['survey_'.Yii::app()->getConfig('surveyID')][$myfname] is always set (by save.php ??) !
// should remove the !isset part I think !!
}
else
{
$aData['aQuestions'][$j]['checked'] = "";
$aData['checked'][$ansrow['code']][$ld] = "";
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ class="radio"
name="<?php echo $aQuestions[$i]['myfname']; ?>"
value="<?php echo $ansrow['code']; ?>"
id="answer<?php echo $aQuestions[$i]['myfname']; ?>-<?php echo $ansrow['code']; ?>"
<?php echo $aQuestions[$i]['checked']; ?>
<?php echo $checked[$ansrow['code']][$ld]; ?>
onclick="<?php echo $checkconditionFunction; ?>(this.value, this.name, this.type)"
/>
<label for="answer<?php echo $aQuestions[$i]['myfname']; ?>-<?php echo $ansrow['code']; ?>">
Expand Down

0 comments on commit 17cefda

Please sign in to comment.