Skip to content

Commit

Permalink
Fixed issue #7777: Printable Version showing blank page
Browse files Browse the repository at this point in the history
  • Loading branch information
c-schmitz committed Apr 23, 2013
1 parent da15123 commit 4a6c0cf
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions application/controllers/admin/printablesurvey.php
Expand Up @@ -206,6 +206,8 @@ function index($surveyid, $lang = null)
$mapquestionsNumbers=Array();
$answertext = ''; // otherwise can throw an error on line 1617

$fieldmap = createFieldMap($surveyid,'full',false,false,$surveyprintlang);

// =========================================================
// START doin the business:
foreach ($degresult->readAll() as $degrow)
Expand Down Expand Up @@ -526,23 +528,23 @@ function index($surveyid, $lang = null)
$cqidattributes = getQuestionAttributeValues($conrow['cqid'], $conrow['type']);
if ($labelIndex == 0)
{
if (trim($cqidattributes['dualscale_headerA']) != '') {
$header = $clang->gT($cqidattributes['dualscale_headerA']);
if (trim($cqidattributes['dualscale_headerA'][$surveyprintlang]) != '') {
$header = $clang->gT($cqidattributes['dualscale_headerA'][$surveyprintlang]);
} else {
$header = '1';
}
}
elseif ($labelIndex == 1)
{
if (trim($cqidattributes['dualscale_headerB']) != '') {
$header = $clang->gT($cqidattributes['dualscale_headerB']);
if (trim($cqidattributes['dualscale_headerB'][$surveyprintlang]) != '') {
$header = $clang->gT($cqidattributes['dualscale_headerB'][$surveyprintlang]);
} else {
$header = '2';
}
}
foreach ($ansresult->readAll() as $ansrow)
foreach ($ansresult as $ansrow)
{
$answer_section=" (".$ansrow['question']." ".sprintf($clang->gT("Label %s"),$header).")";
$answer_section=" (".$ansrow->question." ".sprintf($clang->gT("Label %s"),$header).")";
}
break;
case ":":
Expand All @@ -558,7 +560,7 @@ function index($surveyid, $lang = null)
foreach ($fresult as $frow)
{
//$conditions[]=$frow['title'];
$answer_section=" (".$ansrow['question']."[".$frow['answer']."])";
$answer_section=" (".$ansrow->question."[".$frow['answer']."])";
} // while
}
break;
Expand Down

0 comments on commit 4a6c0cf

Please sign in to comment.