Skip to content

Commit

Permalink
Fixed issue #10907: Display columns error
Browse files Browse the repository at this point in the history
  • Loading branch information
LouisGac committed Apr 11, 2016
1 parent 59b2d11 commit e35449f
Showing 1 changed file with 9 additions and 10 deletions.
19 changes: 9 additions & 10 deletions application/helpers/qanda_helper.php
Expand Up @@ -1651,7 +1651,7 @@ function do_list_radio($ia)
// That can happen only when no 'other' option is set, and the maximum answer rows has not been reached in the last question
if($iNbCols > 1 && $isOpen )
{
$answer .= Yii::app()->getController()->renderPartial('/survey/questions/listradio/columns/column_footer', array('last'=>true), true);
$sRows .= Yii::app()->getController()->renderPartial('/survey/questions/listradio/columns/column_footer', array('last'=>true), true);
$iRowCount = 0;
}

Expand Down Expand Up @@ -5015,7 +5015,7 @@ function do_array_multitext($ia)

$trbc = '';
$sRows = '';
foreach ($aQuestions as $j => $ansrow)
foreach ($aQuestions as $ansrow)
{
if (isset($repeatheadings) && $repeatheadings > 0 && ($fn-1) > 0 && ($fn-1) % $repeatheadings == 0)
{
Expand Down Expand Up @@ -5114,7 +5114,6 @@ function do_array_multitext($ia)
'rightTdEmpty' => $rightTdEmpty,
'answerwidth' => $answerwidth,
'formatedRowTotal' => $formatedRowTotal,
'zebra' => 2 - ($j % 2)
), true);

$fn++;
Expand Down Expand Up @@ -5384,7 +5383,7 @@ function do_array_multiflexi($ia)
$fn=1;

$sAnswerRows = '';
foreach ($ansresult as $j => $ansrow)
foreach ($ansresult as $ansrow)
{
if (isset($repeatheadings) && $repeatheadings > 0 && ($fn-1) > 0 && ($fn-1) % $repeatheadings == 0)
{
Expand Down Expand Up @@ -5537,7 +5536,6 @@ function do_array_multiflexi($ia)
'answertextright' => $answertextright,
'answer_tds' => $answer_tds,
'rightTd' => $rightTd,
'zebra' => 2 - ($j % 2)
), true);
$fn++;
}
Expand Down Expand Up @@ -5612,7 +5610,8 @@ function do_arraycolumns($ia)
$fn=1;
$cellwidth=$anscount;
$cellwidth=round(( 50 / $cellwidth ) , 1);
$answer = "\n<table class=\"array-by-columns-table table-array-by-column table question subquestion-list questions-list\">\n"
//$answer = "\n<table class=\"table-in-qanda-8 question subquestions-list questions-list\" summary=\"{$caption}\">\n"
$answer = "\n<table class=\"array-by-columns-table table-in-qanda-8 table question subquestion-list questions-list\">\n"
. "\t<colgroup class=\"col-responses\">\n"
//. "\t<col class=\"col-answers\" width=\"50%\" />\n";
. "\t<col class=\"col-answers\" style='width: 50%' />\n";
Expand All @@ -5625,7 +5624,7 @@ function do_arraycolumns($ia)
$answer .= "<col class=\"$odd_even_well question-item answers-list radio-list\" style='width: $cellwidth%;' />\n";
}
$answer .= "\t</colgroup>\n\n"
. "\t<thead class='thead-array-by-column'>\n"
. "\t<thead>\n"
. "<tr>\n"
. "\t<td>&nbsp;</td>\n";

Expand Down Expand Up @@ -5675,7 +5674,7 @@ function do_arraycolumns($ia)
//if (!isset($trbc) || $trbc == 'array1') {$trbc = 'array2';} else {$trbc = 'array1';}
$myfname=$ia[1].$ld;

$answer .= "\t<td data-title='" . $ansrow['answer'] . "' class=\"answer-cell-7 answer_cell_$ld answer-item radio-item\">\n"
$answer .= "\t<td data-title='" . $ansrow['answer'] . "' class=\"answer-cell-7 answer_cell_00$ld answer-item radio-item\">\n"
. "\t<label for=\"answer".$myfname.'-'.$ansrow['code']."\"><input class=\"radio\" type=\"radio\" name=\"".$myfname.'" value="'.$ansrow['code'].'" '
. 'id="answer'.$myfname.'-'.$ansrow['code'].'" ';
if (isset($_SESSION['survey_'.Yii::app()->getConfig('surveyID')][$myfname]) && $_SESSION['survey_'.Yii::app()->getConfig('surveyID')][$myfname] == $ansrow['code'])
Expand Down Expand Up @@ -6009,7 +6008,7 @@ function do_array_dual($ia)
$first = false;
}

$answer .= "\t<td data-title='" . $labelans0[$thiskey] . "' class=\"answer_cell_1_$ld answer-item {$answertypeclass}-item\">\n"
$answer .= "\t<td data-title='" . $labelans0[$thiskey] . "' class=\"answer_cell_1_00$ld answer-item {$answertypeclass}-item\">\n"
. "\t<label for=\"answer{$myfid0}-{$ld}\"><input class=\"radio\" type=\"radio\" name=\"$myfname0\" value=\"$ld\" id=\"answer$myfid0-$ld\" ";
if (isset($_SESSION['survey_'.Yii::app()->getConfig('surveyID')][$myfname0]) && $_SESSION['survey_'.Yii::app()->getConfig('surveyID')][$myfname0] == $ld)
{
Expand Down Expand Up @@ -6045,7 +6044,7 @@ function do_array_dual($ia)
$first = false;
}

$answer .= "\t<td data-title='{$labelans1[$thiskey]}' class=\"answer_cell_2_$ld answer-item radio-item\">\n"
$answer .= "\t<td data-title='{$labelans1[$thiskey]}' class=\"answer_cell_2_00$ld answer-item radio-item\">\n"
. "\t<label for=\"answer{$myfid1}-{$ld}\"><input class=\"radio\" type=\"radio\" name=\"$myfname1\" value=\"$ld\" id=\"answer$myfid1-$ld\" ";
if (isset($_SESSION['survey_'.Yii::app()->getConfig('surveyID')][$myfname1]) && $_SESSION['survey_'.Yii::app()->getConfig('surveyID')][$myfname1] == $ld)
{
Expand Down

0 comments on commit e35449f

Please sign in to comment.