From 4a6c0cfa5fb30d6726bc1026f4142af82900c17f Mon Sep 17 00:00:00 2001 From: Carsten Schmitz Date: Tue, 23 Apr 2013 13:37:29 +0200 Subject: [PATCH] Fixed issue #7777: Printable Version showing blank page --- .../controllers/admin/printablesurvey.php | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/application/controllers/admin/printablesurvey.php b/application/controllers/admin/printablesurvey.php index a676225f32c..501b0fdba93 100644 --- a/application/controllers/admin/printablesurvey.php +++ b/application/controllers/admin/printablesurvey.php @@ -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) @@ -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 ":": @@ -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;