$question['ANSWER'] .= "\t</tbody>\n</table>\n";
     if (isset($_POST['printableexport'])) {
         $pdf->tableintopdf($pdfoutput);
     }
     break;
     // ==================================================================
 // ==================================================================
 case "1":
     //ARRAY (Flexible Labels) multi scale
     $leftheader = $qidattributes['dualscale_headerA'];
     $rightheader = $qidattributes['dualscale_headerB'];
     $headstyle = 'style="padding-left: 20px; padding-right: 7px"';
     $meaquery = "SELECT * FROM " . db_table_name("questions") . " WHERE parent_qid={$deqrow['qid']}  AND language='{$surveyprintlang}' ORDER BY question_order";
     $mearesult = db_execute_assoc($meaquery);
     $question['QUESTION_TYPE_HELP'] = $clang->gT("Please choose the appropriate response for each item:");
     $question['QUESTION_TYPE_HELP'] .= array_filter_help($qidattributes, $surveyprintlang, $surveyid);
     if (isset($_POST['printableexport'])) {
         $pdf->intopdf($clang->gT("Please choose the appropriate response for each item:"), "U");
     }
     $question['ANSWER'] .= "\n<table>\n\t<thead>\n";
     $fquery = "SELECT * FROM " . db_table_name("answers") . " WHERE qid='{$deqrow['qid']}'  AND language='{$surveyprintlang}' AND scale_id=0 ORDER BY sortorder, code";
     $fresult = db_execute_assoc($fquery);
     $fcount = $fresult->RecordCount();
     $fwidth = "120";
     $l1 = 0;
     $printablesurveyoutput2 = "\t\t\t<td>&nbsp;</td>\n";
     $myheader2 = '';
     $pdfoutput = array();
     $pdfoutput[0][0] = '';
     while ($frow = $fresult->FetchRow()) {
         $printablesurveyoutput2 .= "\t\t\t<th>{$frow['answer']}" . addsgqacode(" (" . $frow['code'] . ")") . "</th>\n";
Esempio n. 2
0
 //                        {
 //                            if(empty($conditions[0])) $conditions[0] = "'".$blang->gT("No Answer")."'";
 //                            $explanation .= " -" . str_replace("{ANSWER}", $conditions[0], $blang->gT("to question {QUESTION}, answer {ANSWER}"));
 //                        }
 //                        unset($conditions);
 //                        $explanation = str_replace("{QUESTION}", "'{$distinctrow['title']}$answer_section'", $explanation);
 //                        $x++;
 //                    }
 //                    $s++;
 //                }
 $qinfo = LimeExpressionManager::GetQuestionStatus($deqrow['qid']);
 $relevance = trim($qinfo['info']['relevance']);
 $explanation = trim($qinfo['relEqn']);
 $validation = trim($qinfo['prettyValidTip']);
 $qidattributes = getQuestionAttributes($deqrow['qid']);
 $array_filter_help = FlattenText(array_filter_help($qidattributes, $sDataEntryLanguage, $surveyid));
 if ($relevance != '' && $relevance != '1' || $validation != '' || $array_filter_help != '') {
     $showme = '';
     if ($bgc == "even") {
         $bgc = "odd";
     } else {
         $bgc = "even";
     }
     //Do no alternate on explanation row
     if ($relevance != '' && $relevance != '1') {
         $showme = "[" . $blang->gT("Only answer this if the following conditions are met:") . "]<br />{$explanation}\n";
     }
     if ($showme != '' && $validation != '') {
         $showme .= '<br/>';
     }
     if ($validation != '') {