summaryrefslogtreecommitdiffstats
path: root/admin/survey/export/latexclasses/Analize
diff options
context:
space:
mode:
Diffstat (limited to 'admin/survey/export/latexclasses/Analize')
-rw-r--r--admin/survey/export/latexclasses/Analize/AnalizaBreak.php219
-rw-r--r--admin/survey/export/latexclasses/Analize/AnalizaCReport.php62
-rw-r--r--admin/survey/export/latexclasses/Analize/AnalizaCharts.php22
-rw-r--r--admin/survey/export/latexclasses/Analize/AnalizaCrosstab.php293
-rw-r--r--admin/survey/export/latexclasses/Analize/AnalizaDesc.php46
-rw-r--r--admin/survey/export/latexclasses/Analize/AnalizaFreq.php85
-rw-r--r--admin/survey/export/latexclasses/Analize/AnalizaMean.php76
-rw-r--r--admin/survey/export/latexclasses/Analize/AnalizaMultiCrosstab.php362
-rw-r--r--admin/survey/export/latexclasses/Analize/AnalizaSums.php748
-rw-r--r--admin/survey/export/latexclasses/Analize/AnalizaTTest.php141
10 files changed, 881 insertions, 1173 deletions
diff --git a/admin/survey/export/latexclasses/Analize/AnalizaBreak.php b/admin/survey/export/latexclasses/Analize/AnalizaBreak.php
index 3317de4..86064ab 100644
--- a/admin/survey/export/latexclasses/Analize/AnalizaBreak.php
+++ b/admin/survey/export/latexclasses/Analize/AnalizaBreak.php
@@ -2,41 +2,41 @@
global $site_path;
- include_once('../../function.php');
- include_once('../survey/definition.php');
+/* include_once('../../function.php');
+ include_once('../survey/definition.php'); */
- define("ALLOW_HIDE_ZERRO_REGULAR", false); // omogočimo delovanje prikazovanja/skrivanja ničelnih vnosti za navadne odgovore
- define("ALLOW_HIDE_ZERRO_MISSING", true); // omogočimo delovanje prikazovanja/skrivanja ničelnih vnosti za missinge
+ if(!defined("ALLOW_HIDE_ZERRO_REGULAR"))define("ALLOW_HIDE_ZERRO_REGULAR", false); // omogočimo delovanje prikazovanja/skrivanja ničelnih vnosti za navadne odgovore
+ if(!defined("ALLOW_HIDE_ZERRO_MISSING"))define("ALLOW_HIDE_ZERRO_MISSING", true); // omogočimo delovanje prikazovanja/skrivanja ničelnih vnosti za missinge
- define("NUM_DIGIT_AVERAGE", 2); // stevilo digitalnih mest za povprecje
- define("NUM_DIGIT_DEVIATION", 2); // stevilo digitalnih mest za povprecje
+ if(!defined("NUM_DIGIT_AVERAGE"))define("NUM_DIGIT_AVERAGE", 2); // stevilo digitalnih mest za povprecje
+ if(!defined("NUM_DIGIT_DEVIATION"))define("NUM_DIGIT_DEVIATION", 2); // stevilo digitalnih mest za povprecje
- define("M_ANALIZA_DESCRIPTOR", "descriptor");
- define("M_ANALIZA_FREQUENCY", "frequency");
+ if(!defined("M_ANALIZA_DESCRIPTOR"))define("M_ANALIZA_DESCRIPTOR", "descriptor");
+ if(!defined("M_ANALIZA_FREQUENCY"))define("M_ANALIZA_FREQUENCY", "frequency");
- define("FNT_FREESERIF", "freeserif");
- define("FNT_FREESANS", "freesans");
- define("FNT_HELVETICA", "helvetica");
+ if(!defined("FNT_FREESERIF"))define("FNT_FREESERIF", "freeserif");
+ if(!defined("FNT_FREESANS"))define("FNT_FREESANS", "freesans");
+ if(!defined("FNT_HELVETICA"))define("FNT_HELVETICA", "helvetica");
- define("FNT_MAIN_TEXT", FNT_FREESANS);
- define("FNT_QUESTION_TEXT", FNT_FREESANS);
- define("FNT_HEADER_TEXT", FNT_FREESANS);
+ if(!defined("FNT_MAIN_TEXT"))define("FNT_MAIN_TEXT", FNT_FREESANS);
+ if(!defined("FNT_QUESTION_TEXT"))define("FNT_QUESTION_TEXT", FNT_FREESANS);
+ if(!defined("FNT_HEADER_TEXT"))define("FNT_HEADER_TEXT", FNT_FREESANS);
- define("FNT_MAIN_SIZE", 10);
- define("FNT_QUESTION_SIZE", 9);
- define("FNT_HEADER_SIZE", 10);
+ if(!defined("FNT_MAIN_SIZE"))define("FNT_MAIN_SIZE", 10);
+ if(!defined("FNT_QUESTION_SIZE"))define("FNT_QUESTION_SIZE", 9);
+ if(!defined("FNT_HEADER_SIZE"))define("FNT_HEADER_SIZE", 10);
- define("RADIO_BTN_SIZE", 3);
- define("CHCK_BTN_SIZE", 3);
- define("LINE_BREAK", 6);
+ if(!defined("RADIO_BTN_SIZE"))define("RADIO_BTN_SIZE", 3);
+ if(!defined("CHCK_BTN_SIZE"))define("CHCK_BTN_SIZE", 3);
+ if(!defined("LINE_BREAK"))define("LINE_BREAK", 6);
- define ('PDF_MARGIN_HEADER', 8);
- define ('PDF_MARGIN_FOOTER', 12);
- define ('PDF_MARGIN_TOP', 18);
- define ('PDF_MARGIN_BOTTOM', 18);
- define ('PDF_MARGIN_LEFT', 15);
- define ('PDF_MARGIN_RIGHT', 15);
+ if(!defined("PDF_MARGIN_HEADER"))define ('PDF_MARGIN_HEADER', 8);
+ if(!defined("PDF_MARGIN_FOOTER"))define ('PDF_MARGIN_FOOTER', 12);
+ if(!defined("PDF_MARGIN_TOP"))define ('PDF_MARGIN_TOP', 18);
+ if(!defined("PDF_MARGIN_BOTTOM"))define ('PDF_MARGIN_BOTTOM', 18);
+ if(!defined("PDF_MARGIN_LEFT"))define ('PDF_MARGIN_LEFT', 15);
+ if(!defined("PDF_MARGIN_RIGHT"))define ('PDF_MARGIN_RIGHT', 15);
/** Class za generacijo latex
@@ -346,7 +346,7 @@ class AnalizaBreak extends LatexAnalysisElement {
//Priprava parametrov za tabelo - konec
//zacetek latex tabele z obrobo za prvo tabelo
- $pdfTable = 'tabularx';
+ $pdfTable = 'xltabular';
$rtfTable = 'tabular';
$pdfTableWidth = 1;
$rtfTableWidth = 1;
@@ -359,14 +359,14 @@ class AnalizaBreak extends LatexAnalysisElement {
// PRVA VRSTICA
$prvaVrstica = array();
- $prvaVrstica[] = $this->encodeText($forSpremenljivka['naslov'].' ('.$forSpremenljivka['variable'].')');
- //$prvaVrstica[] = $this->encodeText($spremenljivka['naslov'].' ('.$spremenljivka['variable'].')');
- //$prvaVrstica[] = '\multicolumn{'.$steviloPodstolpcev.'}{c|}{'.$this->encodeText($spremenljivka['naslov'].' ('.$spremenljivka['variable'].')').'}';
- //$prvaVrstica[] = '\multicolumn{'.$steviloPodstolpcev.'}{>{\hsize=\dimexpr '.($steviloPodstolpcev).'\hsize + '.($steviloPodstolpcev).'\tabcolsep + \arrayrulewidth}X|}{'.$this->encodeText($this->snippet($spremenljivka['naslov']).' ('.$this->snippet($spremenljivka['variable']).')').'}';
+ $prvaVrstica[] = LatexDocument::encodeText($forSpremenljivka['naslov'].' ('.$forSpremenljivka['variable'].')');
+ //$prvaVrstica[] = LatexDocument::encodeText($spremenljivka['naslov'].' ('.$spremenljivka['variable'].')');
+ //$prvaVrstica[] = '\multicolumn{'.$steviloPodstolpcev.'}{c|}{'.LatexDocument::encodeText($spremenljivka['naslov'].' ('.$spremenljivka['variable'].')').'}';
+ //$prvaVrstica[] = '\multicolumn{'.$steviloPodstolpcev.'}{>{\hsize=\dimexpr '.($steviloPodstolpcev).'\hsize + '.($steviloPodstolpcev).'\tabcolsep + \arrayrulewidth}X|}{'.LatexDocument::encodeText($this->snippet($spremenljivka['naslov']).' ('.$this->snippet($spremenljivka['variable']).')').'}';
if($this->export_format == 'pdf'){
- $prvaVrstica[] = '\multicolumn{'.$steviloPodstolpcev.'}{>{\hsize=\dimexpr '.($steviloPodstolpcev).'\hsize + '.($steviloPodstolpcev).'\tabcolsep + \arrayrulewidth}X|}{'.$this->encodeText($this->snippet($spremenljivka['naslov']).' ('.$this->snippet($spremenljivka['variable']).')').'}';
+ $prvaVrstica[] = '\multicolumn{'.$steviloPodstolpcev.'}{>{\hsize=\dimexpr '.($steviloPodstolpcev).'\hsize + '.($steviloPodstolpcev).'\tabcolsep + \arrayrulewidth}X|}{'.LatexDocument::encodeText($this->snippet($spremenljivka['naslov']).' ('.$this->snippet($spremenljivka['variable']).')').'}';
}elseif($this->export_format == 'rtf'){
- $prvaVrstica[] = '\multicolumn{'.$steviloPodstolpcev.'}{c|}{'.$this->encodeText($spremenljivka['naslov'].' ('.$spremenljivka['variable'].')').'}';
+ $prvaVrstica[] = '\multicolumn{'.$steviloPodstolpcev.'}{c|}{'.LatexDocument::encodeText($spremenljivka['naslov'].' ('.$spremenljivka['variable'].')').'}';
}
@@ -380,19 +380,19 @@ class AnalizaBreak extends LatexAnalysisElement {
if ($tip != 1 && $tip != 3) {
foreach ($spremenljivka['grids'] AS $gkey => $grid) {
foreach ($grid['variables'] AS $vkey => $variable) {
- $text = $this->encodeText($variable['naslov'].' ('.$variable['variable'].')');
+ $text = LatexDocument::encodeText($variable['naslov'].' ('.$variable['variable'].')');
$drugaVrstica[]=$text;
- $tretjaVrstica[] = $this->encodeText($lang['srv_analiza_crosstab_average']);
+ $tretjaVrstica[] = LatexDocument::encodeText($lang['srv_analiza_crosstab_average']);
}
}
}
else if (count($spremenljivka['options']) < 15) {
//echo "options :".count($spremenljivka['options'])."</br>";
foreach ($spremenljivka['options'] AS $okey => $option) {
- //$this->pdf->MultiCell($singleWidth, $height, $this->encodeText($option.' ('.$okey.')'), 1, 'C', 0, 0, 0 ,0, true);
- $text = $this->encodeText($option.' ('.$okey.')');
+ //$this->pdf->MultiCell($singleWidth, $height, LatexDocument::encodeText($option.' ('.$okey.')'), 1, 'C', 0, 0, 0 ,0, true);
+ $text = LatexDocument::encodeText($option.' ('.$okey.')');
$drugaVrstica[]=$text;
- $tretjaVrstica[] = $this->encodeText($lang['srv_analiza_crosstab_average']);
+ $tretjaVrstica[] = LatexDocument::encodeText($lang['srv_analiza_crosstab_average']);
}
//$this->pdf->MultiCell($singleWidth, $height, 'povprečje', 1, 'C', 0, 1, 0 ,0, true);
}
@@ -413,16 +413,16 @@ class AnalizaBreak extends LatexAnalysisElement {
// VRSTICE S PODATKI
foreach ($frequencys AS $fkey => $fkeyFrequency) {
$podatkiVrstica = array();
- $podatkiVrstica[]=$this->encodeText($forSpremenljivka['options'][$fkey]); //naslov horizontalne vrstice
+ $podatkiVrstica[]=LatexDocument::encodeText($forSpremenljivka['options'][$fkey]); //naslov horizontalne vrstice
foreach ($spremenljivka['grids'] AS $gkey => $grid) {
foreach ($grid['variables'] AS $vkey => $variable) {
if ($variable['other'] != 1) {
$sequence = $variable['sequence'];
if (($tip == 1 || $tip == 3) && count($spremenljivka['options']) < 15) {
foreach ($spremenljivka['options'] AS $okey => $option) {
- //$this->pdf->MultiCell($singleWidth, $height, $this->encodeText($frequencys[$fkey][$sequence]['valid'][$okey]['cnt']), 1, 'C', 0, 0, 0 ,0, true);
- $podatkiVrstica[]=$this->encodeText($frequencys[$fkey][$sequence]['valid'][$okey]['cnt']);
- //echo "podatkiVrstica 1 :".$this->encodeText($frequencys[$fkey][$sequence]['valid'][$okey]['cnt'])."</br>";
+ //$this->pdf->MultiCell($singleWidth, $height, LatexDocument::encodeText($frequencys[$fkey][$sequence]['valid'][$okey]['cnt']), 1, 'C', 0, 0, 0 ,0, true);
+ $podatkiVrstica[]=LatexDocument::encodeText($frequencys[$fkey][$sequence]['valid'][$okey]['cnt']);
+ //echo "podatkiVrstica 1 :".LatexDocument::encodeText($frequencys[$fkey][$sequence]['valid'][$okey]['cnt'])."</br>";
}
}
$podatkiVrstica[]=$this->formatNumber($means[$fkey][$sequence],SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_AVERAGE'),'');
@@ -435,7 +435,7 @@ class AnalizaBreak extends LatexAnalysisElement {
//Izpis vrstic tabele - konec ##################
/*zakljucek latex tabele*/
- $tabela .= ($this->export_format == 'pdf' ? "\\end{tabularx}" : "\\end{tabular}");
+ $tabela .= ($this->export_format == 'pdf' ? "\\end{xltabular}" : "\\end{tabular}");
/*zaljucek latex tabele - konec */
//echo "tabela :".$tabela."</br>";
}elseif($presirokaTabela == 1){ //ce tabela je presiroka
@@ -477,7 +477,7 @@ class AnalizaBreak extends LatexAnalysisElement {
//Priprava parametrov za tabelo - konec
//zacetek latex tabele z obrobo za prvo tabelo
- $pdfTable = 'tabularx';
+ $pdfTable = 'xltabular';
$rtfTable = 'tabular';
$pdfTableWidth = 1;
$rtfTableWidth = 1;
@@ -490,11 +490,11 @@ class AnalizaBreak extends LatexAnalysisElement {
// PRVA VRSTICA
$prvaVrstica = array();
- $prvaVrstica[] = $this->encodeText($forSpremenljivka['naslov'].' ('.$forSpremenljivka['variable'].')');
+ $prvaVrstica[] = LatexDocument::encodeText($forSpremenljivka['naslov'].' ('.$forSpremenljivka['variable'].')');
if($this->export_format == 'pdf'){
- $prvaVrstica[] = '\multicolumn{'.($steviloPodstolpcev-1).'}{>{\hsize=\dimexpr '.($steviloPodstolpcev).'\hsize + '.($steviloPodstolpcev).'\tabcolsep + \arrayrulewidth}X|}{'.$this->encodeText($this->snippet($spremenljivka['naslov']).' ('.$this->snippet($spremenljivka['variable']).')').'}';
+ $prvaVrstica[] = '\multicolumn{'.($steviloPodstolpcev-1).'}{>{\hsize=\dimexpr '.($steviloPodstolpcev).'\hsize + '.($steviloPodstolpcev).'\tabcolsep + \arrayrulewidth}X|}{'.LatexDocument::encodeText($this->snippet($spremenljivka['naslov']).' ('.$this->snippet($spremenljivka['variable']).')').'}';
}elseif($this->export_format == 'rtf'){
- $prvaVrstica[] = '\multicolumn{'.($steviloPodstolpcev-1).'}{c|}{'.$this->encodeText($spremenljivka['naslov'].' ('.$spremenljivka['variable'].')').'}';
+ $prvaVrstica[] = '\multicolumn{'.($steviloPodstolpcev-1).'}{c|}{'.LatexDocument::encodeText($spremenljivka['naslov'].' ('.$spremenljivka['variable'].')').'}';
}
// DRUGA IN TRETJA VRSTICA
@@ -508,10 +508,10 @@ class AnalizaBreak extends LatexAnalysisElement {
if ($tip != 1 && $tip != 3) {
for($s=$indeksPodatkov; $s<($steviloPodstolpcev-1+$indeksPodatkovOld); $s++){
$grid = $spremenljivka['grids'][$s];
- $text = $this->encodeText($grid['variables'][0]['naslov'].' ('.$grid['variables'][0]['variable'].')');
+ $text = LatexDocument::encodeText($grid['variables'][0]['naslov'].' ('.$grid['variables'][0]['variable'].')');
//echo "grid podatek: ".$text."</br>";
$drugaVrstica[] = $text;
- $tretjaVrstica[] = $this->encodeText($lang['srv_analiza_crosstab_average']);
+ $tretjaVrstica[] = LatexDocument::encodeText($lang['srv_analiza_crosstab_average']);
$indeksPodatkov = $s;
}
$indeksPodatkov = $indeksPodatkov + 1;
@@ -521,10 +521,10 @@ class AnalizaBreak extends LatexAnalysisElement {
//echo "options :".count($spremenljivka['options'])."</br>";
//echo "znotraj </br>";
foreach ($spremenljivka['options'] AS $okey => $option) {
- //$this->pdf->MultiCell($singleWidth, $height, $this->encodeText($option.' ('.$okey.')'), 1, 'C', 0, 0, 0 ,0, true);
- $text = $this->encodeText($option.' ('.$okey.')');
+ //$this->pdf->MultiCell($singleWidth, $height, LatexDocument::encodeText($option.' ('.$okey.')'), 1, 'C', 0, 0, 0 ,0, true);
+ $text = LatexDocument::encodeText($option.' ('.$okey.')');
$drugaVrstica[]=$text;
- $tretjaVrstica[] = $this->encodeText($lang['srv_analiza_crosstab_average']);
+ $tretjaVrstica[] = LatexDocument::encodeText($lang['srv_analiza_crosstab_average']);
}
//$this->pdf->MultiCell($singleWidth, $height, 'povprečje', 1, 'C', 0, 1, 0 ,0, true);
}
@@ -552,8 +552,8 @@ class AnalizaBreak extends LatexAnalysisElement {
for($fkey=1; $fkey<=($steviloVrsticSPodatki); $fkey++){ //izpis vsake vrstice posebej
//echo "indeks freq: ".$fkey."</br>";
$podatkiVrstica = array();
- $podatkiVrstica[] = $this->encodeText($forSpremenljivka['options'][$fkey]); //naslov horizontalne vrstice
- //echo "debug text: ".$this->encodeText($forSpremenljivka['options'][$fkey])."</br>";
+ $podatkiVrstica[] = LatexDocument::encodeText($forSpremenljivka['options'][$fkey]); //naslov horizontalne vrstice
+ //echo "debug text: ".LatexDocument::encodeText($forSpremenljivka['options'][$fkey])."</br>";
//foreach ($spremenljivka['grids'] AS $gkey => $grid) {
for($s1=$indeksPodatkov1; $s1<($steviloPodstolpcev-1+$indeksPodatkovOld1); $s1++){
@@ -564,8 +564,8 @@ class AnalizaBreak extends LatexAnalysisElement {
//echo "sdvsdv </br>";
/* if (($tip == 1 || $tip == 3) && count($spremenljivka['options']) < 15) {
foreach ($spremenljivka['options'] AS $okey => $option) {
- $podatkiVrstica[] = $this->encodeText($frequencys[$fkey][$sequence]['valid'][$okey]['cnt']);
- //echo "podatki Vrstica 1 :".$this->encodeText($frequencys[$fkey][$sequence]['valid'][$okey]['cnt'])."</br>";
+ $podatkiVrstica[] = LatexDocument::encodeText($frequencys[$fkey][$sequence]['valid'][$okey]['cnt']);
+ //echo "podatki Vrstica 1 :".LatexDocument::encodeText($frequencys[$fkey][$sequence]['valid'][$okey]['cnt'])."</br>";
}
} */
$podatkiVrstica[] = $this->formatNumber($means[$fkey][$sequence],SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_AVERAGE'),'');
@@ -582,7 +582,7 @@ class AnalizaBreak extends LatexAnalysisElement {
//Izpis vrstic tabele - konec ##################
/*zakljucek latex tabele*/
- $tabela .= ($this->export_format == 'pdf' ? "\\end{tabularx}" : "\\end{tabular}");
+ $tabela .= ($this->export_format == 'pdf' ? "\\end{xltabular}" : "\\end{tabular}");
/*zaljucek latex tabele - konec */
//echo "tabela :".$tabela."</br>";
@@ -601,12 +601,12 @@ class AnalizaBreak extends LatexAnalysisElement {
foreach ($frequencys AS $fkey => $frequency) {
/* $this->pdf->setFont('','B','6');
- $this->pdf->MultiCell(200, 5, $this->encodeText('Tabela za: ('.$forSpremenljivka['variable'].') = '.$forSpremenljivka['options'][$fkey]), 0, 'L', 0, 1, 0 ,0, true); */
+ $this->pdf->MultiCell(200, 5, LatexDocument::encodeText('Tabela za: ('.$forSpremenljivka['variable'].') = '.$forSpremenljivka['options'][$fkey]), 0, 'L', 0, 1, 0 ,0, true); */
$text = $spremenljivka['naslov'].' ('.$spremenljivka['variable'].')';
$height = $this->getCellHeight($text, 260);
- //$this->pdf->MultiCell(260, $height, $this->encodeText($text), 1, 'C', 0, 1, 0 ,0, true);
+ //$this->pdf->MultiCell(260, $height, LatexDocument::encodeText($text), 1, 'C', 0, 1, 0 ,0, true);
//$this->pdf->setFont('','','6');
@@ -617,7 +617,7 @@ class AnalizaBreak extends LatexAnalysisElement {
//$this->pdf->MultiCell(60, $height, '', 1, 'C', 0, 0, 0 ,0, true);
foreach ($spremenljivka['grids'][0]['variables'] AS $vkey => $variable) {
- //$this->pdf->MultiCell($singleWidth, $height, $this->encodeText($variable['naslov']), 1, 'C', 0, 0, 0 ,0, true);
+ //$this->pdf->MultiCell($singleWidth, $height, LatexDocument::encodeText($variable['naslov']), 1, 'C', 0, 0, 0 ,0, true);
}
//$this->pdf->MultiCell(1, $height,'', 0, 'C', 0, 1, 0 ,0, true);
@@ -626,7 +626,7 @@ class AnalizaBreak extends LatexAnalysisElement {
$text = '('.$grid['variable'].') '.$grid['naslov'];
/* $height = $this->getCellHeight($text, 60);
- $this->pdf->MultiCell(60, $height, $this->encodeText($text), 1, 'C', 0, 0, 0 ,0, true); */
+ $this->pdf->MultiCell(60, $height, LatexDocument::encodeText($text), 1, 'C', 0, 0, 0 ,0, true); */
foreach ($grid['variables'] AS $vkey => $variable) {
$sequence = $variable['sequence'];
@@ -680,7 +680,8 @@ class AnalizaBreak extends LatexAnalysisElement {
foreach ($spremenljivka['grids'] AS $gkey => $grid) {
// Izrisujemo samo 1 graf v creportu
- if($_GET['m'] == 'analysis_creport'){
+ $tmp_m = isset($_GET['m'])?$_GET['m'] : '';
+ if($tmp_m == 'analysis_creport'){
if($spremenljivka['break_sub_table']['key'] == $gkey){
//$this->displayChart($forSpr,$frequencys,$spremenljivka,$type = 'number');
@@ -713,25 +714,25 @@ class AnalizaBreak extends LatexAnalysisElement {
$drugaVrstica[] = '';
foreach ($spremenljivka['grids'] AS $gkey => $grid) {
foreach ($grid['variables'] AS $vkey => $variable) {
- $drugaVrstica[] = $this->encodeText($variable['naslov'].' ('.$variable['variable'].')');
+ $drugaVrstica[] = LatexDocument::encodeText($variable['naslov'].' ('.$variable['variable'].')');
}
}
// PRVA VRSTICA
$prvaVrstica = array();
- $prvaVrstica[] = $this->encodeText($forSpremenljivka['naslov'].' ('.$forSpremenljivka['variable'].')');
- //$prvaVrstica[] = $this->encodeText($spremenljivka['naslov'].' ('.$spremenljivka['variable'].')'); //\multicolumn{".$steviloVmesnihStolpcevPodvrstic."}{X|}
+ $prvaVrstica[] = LatexDocument::encodeText($forSpremenljivka['naslov'].' ('.$forSpremenljivka['variable'].')');
+ //$prvaVrstica[] = LatexDocument::encodeText($spremenljivka['naslov'].' ('.$spremenljivka['variable'].')'); //\multicolumn{".$steviloVmesnihStolpcevPodvrstic."}{X|}
$steviloPodstolpcev = count($drugaVrstica) - 1;
- //$prvaVrstica[] = '\multicolumn{'.$steviloPodstolpcev.'}{c|}{'.$this->encodeText($spremenljivka['naslov'].' ('.$spremenljivka['variable'].')').'}';
+ //$prvaVrstica[] = '\multicolumn{'.$steviloPodstolpcev.'}{c|}{'.LatexDocument::encodeText($spremenljivka['naslov'].' ('.$spremenljivka['variable'].')').'}';
//$prvaVrstica[] = '\multicolumn{'.$steviloPodstolpcev.'}
//{>{\hsize=\dimexpr '.($steviloPodstolpcev).'\hsize + '.($steviloPodstolpcev).'\tabcolsep + \arrayrulewidth}X|}
- //{'.$this->encodeText($this->snippet($spremenljivka['naslov']).'('.$this->snippet($spremenljivka['variable']).')').'}';
+ //{'.LatexDocument::encodeText($this->snippet($spremenljivka['naslov']).'('.$this->snippet($spremenljivka['variable']).')').'}';
if($this->export_format == 'pdf'){
$prvaVrstica[] = '\multicolumn{'.$steviloPodstolpcev.'}
{>{\hsize=\dimexpr '.($steviloPodstolpcev).'\hsize + '.($steviloPodstolpcev).'\tabcolsep + \arrayrulewidth}X|}
- {'.$this->encodeText($this->snippet($spremenljivka['naslov']).'('.$this->snippet($spremenljivka['variable']).')').'}';
+ {'.LatexDocument::encodeText($this->snippet($spremenljivka['naslov']).'('.$this->snippet($spremenljivka['variable']).')').'}';
}elseif($this->export_format == 'rtf'){
- $prvaVrstica[] = '\multicolumn{'.$steviloPodstolpcev.'}{c|}{'.$this->encodeText($spremenljivka['naslov'].' ('.$spremenljivka['variable'].')').'}';
+ $prvaVrstica[] = '\multicolumn{'.$steviloPodstolpcev.'}{c|}{'.LatexDocument::encodeText($spremenljivka['naslov'].' ('.$spremenljivka['variable'].')').'}';
}
// TRETJA VRSTICA
@@ -739,7 +740,7 @@ class AnalizaBreak extends LatexAnalysisElement {
$tretjaVrstica[] = '';
foreach ($spremenljivka['grids'] AS $gkey => $grid) {
foreach ($grid['variables'] AS $vkey => $variable) {
- $tretjaVrstica[] = $this->encodeText($lang['srv_analiza_crosstab_average']);
+ $tretjaVrstica[] = LatexDocument::encodeText($lang['srv_analiza_crosstab_average']);
}
}
@@ -766,7 +767,7 @@ class AnalizaBreak extends LatexAnalysisElement {
//Priprava parametrov za tabelo - konec
//zacetek latex tabele z obrobo za prvo tabelo
- $pdfTable = 'tabularx';
+ $pdfTable = 'xltabular';
$rtfTable = 'tabular';
$pdfTableWidth = 1;
$rtfTableWidth = 1;
@@ -794,7 +795,7 @@ class AnalizaBreak extends LatexAnalysisElement {
//VRSTICE S PODATKI - priprava in izpis podatkov
foreach ($frequencys AS $fkey => $fkeyFrequency) {
$podatkiVrstica = array();
- $podatkiVrstica[]=$this->encodeText($forSpremenljivka['options'][$fkey]);
+ $podatkiVrstica[]=LatexDocument::encodeText($forSpremenljivka['options'][$fkey]);
foreach ($spremenljivka['grids'] AS $gkey => $grid) {
foreach ($grid['variables'] AS $vkey => $variable) {
@@ -813,7 +814,7 @@ class AnalizaBreak extends LatexAnalysisElement {
// dodamo še skupno sumo in povprečje
$sumaVrstica = array();
- $sumaVrstica[]=$this->encodeText($lang['srv_analiza_crosstab_skupaj']);
+ $sumaVrstica[]=LatexDocument::encodeText($lang['srv_analiza_crosstab_skupaj']);
foreach ($spremenljivka['grids'] AS $gkey => $grid) {
foreach ($grid['variables'] AS $vkey => $variable) {
@@ -832,7 +833,7 @@ class AnalizaBreak extends LatexAnalysisElement {
//Izpis vrstic tabele - konec
/*zakljucek latex tabele*/
- $tabela .= ($this->export_format == 'pdf' ? "\\end{tabularx}" : "\\end{tabular}");
+ $tabela .= ($this->export_format == 'pdf' ? "\\end{xltabular}" : "\\end{tabular}");
/*zaljucek latex tabele - konec */
}
@@ -845,7 +846,7 @@ class AnalizaBreak extends LatexAnalysisElement {
foreach ($spremenljivka['grids'] AS $gkey => $grid) {
//izpis opisnega besedila pred tabelo
- $tabela .= $this->encodeText('Tabela za: '.$spremenljivka['naslov'].' ('.$spremenljivka['variable'].') = '.$grid['naslov'].' ('.$grid['variable'].')');
+ $tabela .= LatexDocument::encodeText('Tabela za: '.$spremenljivka['naslov'].' ('.$spremenljivka['variable'].') = '.$grid['naslov'].' ('.$grid['variable'].')');
//$tabela .= $this->texNewLine;
//Priprava parametrov za tabelo
@@ -867,7 +868,7 @@ class AnalizaBreak extends LatexAnalysisElement {
//Priprava parametrov za tabelo - konec
//zacetek latex tabele z obrobo za prvo tabelo
- $pdfTable = 'tabularx';
+ $pdfTable = 'xltabular';
$rtfTable = 'tabular';
$pdfTableWidth = 1;
$rtfTableWidth = 1;
@@ -880,20 +881,20 @@ class AnalizaBreak extends LatexAnalysisElement {
// PRVA VRSTICA
$prvaVrstica = array();
- $prvaVrstica[] = $this->encodeText($forSpremenljivka['naslov'].' ('.$forSpremenljivka['variable'].')');
- //$prvaVrstica[] = '\multicolumn{'.$steviloPodstolpcev.'}{c|}{'.$this->encodeText($spremenljivka['naslov'].' ('.$spremenljivka['variable'].') - '.$grid['naslov'].' ('.$grid['variable'].')').'}';
- //$prvaVrstica[] = '\multicolumn{'.$steviloPodstolpcev.'}{>{\hsize=\dimexpr '.($steviloPodstolpcev).'\hsize + '.($steviloPodstolpcev).'\tabcolsep + \arrayrulewidth}X|}{'.$this->encodeText($this->snippet($spremenljivka['naslov']).' ('.$this->snippet($spremenljivka['variable']).') - '.$grid['naslov'].' ('.$grid['variable'].')').'}';
+ $prvaVrstica[] = LatexDocument::encodeText($forSpremenljivka['naslov'].' ('.$forSpremenljivka['variable'].')');
+ //$prvaVrstica[] = '\multicolumn{'.$steviloPodstolpcev.'}{c|}{'.LatexDocument::encodeText($spremenljivka['naslov'].' ('.$spremenljivka['variable'].') - '.$grid['naslov'].' ('.$grid['variable'].')').'}';
+ //$prvaVrstica[] = '\multicolumn{'.$steviloPodstolpcev.'}{>{\hsize=\dimexpr '.($steviloPodstolpcev).'\hsize + '.($steviloPodstolpcev).'\tabcolsep + \arrayrulewidth}X|}{'.LatexDocument::encodeText($this->snippet($spremenljivka['naslov']).' ('.$this->snippet($spremenljivka['variable']).') - '.$grid['naslov'].' ('.$grid['variable'].')').'}';
if($this->export_format == 'pdf'){
- $prvaVrstica[] = '\multicolumn{'.$steviloPodstolpcev.'}{>{\hsize=\dimexpr '.($steviloPodstolpcev).'\hsize + '.($steviloPodstolpcev).'\tabcolsep + \arrayrulewidth}X|}{'.$this->encodeText($this->snippet($spremenljivka['naslov']).' ('.$this->snippet($spremenljivka['variable']).') - '.$grid['naslov'].' ('.$grid['variable'].')').'}';
+ $prvaVrstica[] = '\multicolumn{'.$steviloPodstolpcev.'}{>{\hsize=\dimexpr '.($steviloPodstolpcev).'\hsize + '.($steviloPodstolpcev).'\tabcolsep + \arrayrulewidth}X|}{'.LatexDocument::encodeText($this->snippet($spremenljivka['naslov']).' ('.$this->snippet($spremenljivka['variable']).') - '.$grid['naslov'].' ('.$grid['variable'].')').'}';
}elseif($this->export_format == 'rtf'){
- $prvaVrstica[] = '\multicolumn{'.$steviloPodstolpcev.'}{c|}{'.$this->encodeText($spremenljivka['naslov'].' ('.$spremenljivka['variable'].') - '.$grid['naslov'].' ('.$grid['variable'].')').'}';
+ $prvaVrstica[] = '\multicolumn{'.$steviloPodstolpcev.'}{c|}{'.LatexDocument::encodeText($spremenljivka['naslov'].' ('.$spremenljivka['variable'].') - '.$grid['naslov'].' ('.$grid['variable'].')').'}';
}
// DRUGA VRSTICA
$drugaVrstica = array();
$drugaVrstica[]='';
foreach ($grid['variables'] AS $vkey => $variable) {
- $text = $this->encodeText($variable['naslov'].' ('.$variable['variable'].')');
+ $text = LatexDocument::encodeText($variable['naslov'].' ('.$variable['variable'].')');
$drugaVrstica[]=$text;
}
@@ -901,7 +902,7 @@ class AnalizaBreak extends LatexAnalysisElement {
$tretjaVrstica = array();
$tretjaVrstica[] = '';
foreach ($grid['variables'] AS $vkey => $variable) {
- $tretjaVrstica[] = $this->encodeText($lang['srv_analiza_crosstab_average']);
+ $tretjaVrstica[] = LatexDocument::encodeText($lang['srv_analiza_crosstab_average']);
}
//Izpis vrstic tabele
@@ -920,9 +921,9 @@ class AnalizaBreak extends LatexAnalysisElement {
// VRSTICE Z VSEBINO
foreach ($forSpremenljivka['options'] AS $okey => $option) {
$podatkiVrstica = array();
- $podatkiVrstica[]=$this->encodeText($option);
+ $podatkiVrstica[]=LatexDocument::encodeText($option);
//$height = $this->getCellHeight($option, 60);
- //$this->pdf->MultiCell(60, $height, $this->encodeText($option), 1, 'C', 0, 0, 0 ,0, true);
+ //$this->pdf->MultiCell(60, $height, LatexDocument::encodeText($option), 1, 'C', 0, 0, 0 ,0, true);
foreach ($grid['variables'] AS $vkey => $variable) {
$sequence = $variable['sequence'];
@@ -939,7 +940,7 @@ class AnalizaBreak extends LatexAnalysisElement {
// dodamo še skupno sumo in povprečje
$sumaVrstica = array();
- $sumaVrstica[]=$this->encodeText($lang['srv_analiza_crosstab_skupaj']);
+ $sumaVrstica[]=LatexDocument::encodeText($lang['srv_analiza_crosstab_skupaj']);
foreach ($grid['variables'] AS $vkey => $variable) {
$sequence = $variable['sequence'];
@@ -955,7 +956,7 @@ class AnalizaBreak extends LatexAnalysisElement {
//Izpis vrstic tabele - konec
/*zakljucek latex tabele*/
- $tabela .= ($this->export_format == 'pdf' ? "\\end{tabularx}" : "\\end{tabular}");
+ $tabela .= ($this->export_format == 'pdf' ? "\\end{xltabular}" : "\\end{tabular}");
/*zaljucek latex tabele - konec */
}
}
@@ -996,7 +997,7 @@ class AnalizaBreak extends LatexAnalysisElement {
foreach ($spremenljivka['grids'] AS $gkey => $grid) {
//izpis opisnega besedila pred tabelo
- $tabela .= $this->encodeText('Tabela za: '.$spremenljivka['naslov'].' ('.$spremenljivka['variable'].') = '.$grid['naslov'].' ('.$grid['variable'].')');
+ $tabela .= LatexDocument::encodeText('Tabela za: '.$spremenljivka['naslov'].' ('.$spremenljivka['variable'].') = '.$grid['naslov'].' ('.$grid['variable'].')');
//Priprava parametrov za tabelo
$steviloStolpcevParameterTabular = $steviloPodstolpcev+1;
@@ -1019,7 +1020,7 @@ class AnalizaBreak extends LatexAnalysisElement {
//Priprava parametrov za tabelo - konec
//zacetek latex tabele z obrobo za prvo tabelo
- $pdfTable = 'tabularx';
+ $pdfTable = 'xltabular';
$rtfTable = 'tabular';
$pdfTableWidth = 1;
$rtfTableWidth = 1;
@@ -1033,20 +1034,20 @@ class AnalizaBreak extends LatexAnalysisElement {
// PRVA VRSTICA
$prvaVrstica = array();
- $prvaVrstica[] = $this->encodeText($forSpremenljivka['naslov'].' ('.$forSpremenljivka['variable'].')');
- //$prvaVrstica[] = '\multicolumn{'.$steviloPodstolpcev.'}{c|}{'.$this->encodeText($spremenljivka['naslov'].' ('.$spremenljivka['variable'].') - '.$grid['naslov'].' ('.$grid['variable'].')').'}';
- //$prvaVrstica[] = '\multicolumn{'.$steviloPodstolpcev.'}{>{\hsize=\dimexpr '.($steviloPodstolpcev).'\hsize + '.($steviloPodstolpcev).'\tabcolsep + \arrayrulewidth}X|}{'.$this->encodeText($this->snippet($spremenljivka['naslov']).' ('.$this->snippet($spremenljivka['variable']).') - '.$this->snippet($grid['naslov']).' ('.$this->snippet($grid['variable']).')').'}';
+ $prvaVrstica[] = LatexDocument::encodeText($forSpremenljivka['naslov'].' ('.$forSpremenljivka['variable'].')');
+ //$prvaVrstica[] = '\multicolumn{'.$steviloPodstolpcev.'}{c|}{'.LatexDocument::encodeText($spremenljivka['naslov'].' ('.$spremenljivka['variable'].') - '.$grid['naslov'].' ('.$grid['variable'].')').'}';
+ //$prvaVrstica[] = '\multicolumn{'.$steviloPodstolpcev.'}{>{\hsize=\dimexpr '.($steviloPodstolpcev).'\hsize + '.($steviloPodstolpcev).'\tabcolsep + \arrayrulewidth}X|}{'.LatexDocument::encodeText($this->snippet($spremenljivka['naslov']).' ('.$this->snippet($spremenljivka['variable']).') - '.$this->snippet($grid['naslov']).' ('.$this->snippet($grid['variable']).')').'}';
if($this->export_format == 'pdf'){
- $prvaVrstica[] = '\multicolumn{'.$steviloPodstolpcev.'}{>{\hsize=\dimexpr '.($steviloPodstolpcev).'\hsize + '.($steviloPodstolpcev).'\tabcolsep + \arrayrulewidth}X|}{'.$this->encodeText($this->snippet($spremenljivka['naslov']).' ('.$this->snippet($spremenljivka['variable']).') - '.$this->snippet($grid['naslov']).' ('.$this->snippet($grid['variable']).')').'}';
+ $prvaVrstica[] = '\multicolumn{'.$steviloPodstolpcev.'}{>{\hsize=\dimexpr '.($steviloPodstolpcev).'\hsize + '.($steviloPodstolpcev).'\tabcolsep + \arrayrulewidth}X|}{'.LatexDocument::encodeText($this->snippet($spremenljivka['naslov']).' ('.$this->snippet($spremenljivka['variable']).') - '.$this->snippet($grid['naslov']).' ('.$this->snippet($grid['variable']).')').'}';
}elseif($this->export_format == 'rtf'){
- $prvaVrstica[] = '\multicolumn{'.$steviloPodstolpcev.'}{c|}{'.$this->encodeText($spremenljivka['naslov'].' ('.$spremenljivka['variable'].') - '.$grid['naslov'].' ('.$grid['variable'].')').'}';
+ $prvaVrstica[] = '\multicolumn{'.$steviloPodstolpcev.'}{c|}{'.LatexDocument::encodeText($spremenljivka['naslov'].' ('.$spremenljivka['variable'].') - '.$grid['naslov'].' ('.$grid['variable'].')').'}';
}
// DRUGA VRSTICA
$drugaVrstica = array();
$drugaVrstica[]='';
foreach ($grid['variables'] AS $vkey => $variable) {
- $text = $this->encodeText($variable['naslov'].' ('.$variable['variable'].')');
+ $text = LatexDocument::encodeText($variable['naslov'].' ('.$variable['variable'].')');
$drugaVrstica[]=$text;
}
@@ -1062,10 +1063,10 @@ class AnalizaBreak extends LatexAnalysisElement {
// VRSTICE Z VSEBINO
foreach ($forSpremenljivka['options'] AS $okey => $option) {
$podatkiVrstica = array();
- $podatkiVrstica[]=$this->encodeText($option);
+ $podatkiVrstica[]=LatexDocument::encodeText($option);
// Izrisemo vrstico
- //$this->pdf->MultiCell(60, $height, $this->encodeText($option), 1, 'C', 0, 0, 0 ,0, true);
+ //$this->pdf->MultiCell(60, $height, LatexDocument::encodeText($option), 1, 'C', 0, 0, 0 ,0, true);
foreach ($grid['variables'] AS $vkey => $variable) {
$sequence = $variable['sequence'];
if (count($texts[$okey][$sequence]) > 0) {
@@ -1075,8 +1076,8 @@ class AnalizaBreak extends LatexAnalysisElement {
$text .= $units['text']."; ";
}
$text = substr($text,0,-2);
- $podatkiVrstica[]=$this->encodeText($text);
- //$this->pdf->MultiCell($singleWidth, $height, $this->encodeText($text), 1, 'C', 0, 0, 0 ,0, true);
+ $podatkiVrstica[]=LatexDocument::encodeText($text);
+ //$this->pdf->MultiCell($singleWidth, $height, LatexDocument::encodeText($text), 1, 'C', 0, 0, 0 ,0, true);
}
else{
//$this->pdf->MultiCell($singleWidth, $height, '', 1, 'C', 0, 0, 0 ,0, true);
@@ -1088,7 +1089,7 @@ class AnalizaBreak extends LatexAnalysisElement {
//Izpis vrstic tabele - konec
/*zakljucek latex tabele*/
- $tabela .= ($this->export_format == 'pdf' ? "\\end{tabularx}" : "\\end{tabular}");
+ $tabela .= ($this->export_format == 'pdf' ? "\\end{xltabular}" : "\\end{tabular}");
/*zaljucek latex tabele - konec */
}
return $tabela;
@@ -1125,7 +1126,7 @@ class AnalizaBreak extends LatexAnalysisElement {
if ($spremenljivka['tip'] != 6) {
$text .= ' ('.$grid['variable'].')';
}
- $tabela .= $this->encodeText($text);
+ $tabela .= LatexDocument::encodeText($text);
}
$seq2 = $grid['variables'][0]['sequence'];
@@ -1205,10 +1206,10 @@ class AnalizaBreak extends LatexAnalysisElement {
}
}
- $boldedTitle = $this->returnBold($this->encodeText($title)).$this->texNewLine; //vrni boldan naslov in skoci v novo vrstico
+ $boldedTitle = $this->returnBold(LatexDocument::encodeText($title)).$this->texNewLine; //vrni boldan naslov in skoci v novo vrstico
$boldedSubTitle = '';
if($spremenljivka['tip'] == 20 || $spremenljivka['tip'] == 16 || $spremenljivka['tip'] == 6){
- $boldedSubTitle = $this->returnBold($this->encodeText($subtitle)).$this->texNewLine; //vrni boldan naslov in skoci v novo vrstico
+ $boldedSubTitle = $this->returnBold(LatexDocument::encodeText($subtitle)).$this->texNewLine; //vrni boldan naslov in skoci v novo vrstico
}
if($imgName){
@@ -1217,7 +1218,7 @@ class AnalizaBreak extends LatexAnalysisElement {
$texImageOnly = $lang['srv_export_no_chart'];
}
- $texImage .= $this->returnCentered($boldedTitle.$boldedSubTitle.$texImageOnly); //vrni sredinsko poravnana naslov in slika
+ $texImage = $this->returnCentered($boldedTitle.$boldedSubTitle.$texImageOnly); //vrni sredinsko poravnana naslov in slika
return $texImage;
}
@@ -1246,7 +1247,7 @@ class AnalizaBreak extends LatexAnalysisElement {
//izrisemo frekvence
if($frekvence == 1){
- $this->pdf->MultiCell($width, $height, $this->encodeText($data[$i]), 1, 'C', 0, 1, 0 ,0, true);
+ $this->pdf->MultiCell($width, $height, LatexDocument::encodeText($data[$i]), 1, 'C', 0, 1, 0 ,0, true);
$i++;
}
@@ -1256,10 +1257,10 @@ class AnalizaBreak extends LatexAnalysisElement {
$singleWidth = round($width/$numColumnPercent);
for($j=1; $j<$numColumnPercent; $j++){
- $this->pdf->MultiCell($singleWidth, $height, $this->encodeText($data[$i]), 1, 'C', 0, 0, 0 ,0, true);
+ $this->pdf->MultiCell($singleWidth, $height, LatexDocument::encodeText($data[$i]), 1, 'C', 0, 0, 0 ,0, true);
$i++;
}
- $this->pdf->MultiCell($width - (($numColumnPercent-1)*$singleWidth), $height, $this->encodeText($data[$i]), 1, 'C', 0, 1, 0 ,0, true);
+ $this->pdf->MultiCell($width - (($numColumnPercent-1)*$singleWidth), $height, LatexDocument::encodeText($data[$i]), 1, 'C', 0, 1, 0 ,0, true);
$i++;
}
@@ -1269,10 +1270,10 @@ class AnalizaBreak extends LatexAnalysisElement {
$singleWidth = round($width/$numColumnResidual);
for($j=1; $j<$numColumnResidual; $j++){
- $this->pdf->MultiCell($singleWidth, $height, $this->encodeText($data[$i]), 1, 'C', 0, 0, 0 ,0, true);
+ $this->pdf->MultiCell($singleWidth, $height, LatexDocument::encodeText($data[$i]), 1, 'C', 0, 0, 0 ,0, true);
$i++;
}
- $this->pdf->MultiCell($width - (($numColumnResidual-1)*$singleWidth), $height, $this->encodeText($data[$i]), 1, 'C', 0, 1, 0 ,0, true);
+ $this->pdf->MultiCell($width - (($numColumnResidual-1)*$singleWidth), $height, LatexDocument::encodeText($data[$i]), 1, 'C', 0, 1, 0 ,0, true);
$i++;
}
diff --git a/admin/survey/export/latexclasses/Analize/AnalizaCReport.php b/admin/survey/export/latexclasses/Analize/AnalizaCReport.php
index 03291c7..df423ec 100644
--- a/admin/survey/export/latexclasses/Analize/AnalizaCReport.php
+++ b/admin/survey/export/latexclasses/Analize/AnalizaCReport.php
@@ -7,14 +7,14 @@
/* include_once('../exportclases/class.pdfIzvozAnalizaFunctions.php');
require_once('../exportclases/class.enka.pdf.php'); */
- define("ALLOW_HIDE_ZERRO_REGULAR", false); // omogočimo delovanje prikazovanja/skrivanja ničelnih vnosti za navadne odgovore
- define("ALLOW_HIDE_ZERRO_MISSING", true); // omogočimo delovanje prikazovanja/skrivanja ničelnih vnosti za missinge
+ if(!defined("ALLOW_HIDE_ZERRO_REGULAR"))define("ALLOW_HIDE_ZERRO_REGULAR", false); // omogočimo delovanje prikazovanja/skrivanja ničelnih vnosti za navadne odgovore
+ if(!defined("ALLOW_HIDE_ZERRO_MISSING"))define("ALLOW_HIDE_ZERRO_MISSING", true); // omogočimo delovanje prikazovanja/skrivanja ničelnih vnosti za missinge
- define("NUM_DIGIT_AVERAGE", 2); // stevilo digitalnih mest za povprecje
- define("NUM_DIGIT_DEVIATION", 2); // stevilo digitalnih mest za povprecje
+ if(!defined("NUM_DIGIT_AVERAGE"))define("NUM_DIGIT_AVERAGE", 2); // stevilo digitalnih mest za povprecje
+ if(!defined("NUM_DIGIT_DEVIATION"))define("NUM_DIGIT_DEVIATION", 2); // stevilo digitalnih mest za povprecje
- define("M_ANALIZA_DESCRIPTOR", "descriptor");
- define("M_ANALIZA_FREQUENCY", "frequency");
+ if(!defined("M_ANALIZA_DESCRIPTOR"))define("M_ANALIZA_DESCRIPTOR", "descriptor");
+ if(!defined("M_ANALIZA_FREQUENCY"))define("M_ANALIZA_FREQUENCY", "frequency");
define("FNT_FREESERIF", "freeserif");
define("FNT_FREESANS", "freesans");
@@ -150,6 +150,7 @@ class AnalizaCReport extends LatexAnalysisElement{
// Izpisemo sumarnik element
function displaySum($element=null){
+ global $global_user_id;
$sumLatex = '';
$spid = $element['spr1'];
$spremenljivka = SurveyAnalysis::$_HEADERS[$spid];
@@ -256,6 +257,7 @@ class AnalizaCReport extends LatexAnalysisElement{
// Izpisemo frekvence element
function displayFreq($element=null){
+ global $global_user_id;
$freqLatex = '';
$spid = $element['spr1'];
$spremenljivka = SurveyAnalysis::$_HEADERS[$spid];
@@ -329,7 +331,7 @@ class AnalizaCReport extends LatexAnalysisElement{
//Priprava parametrov za tabelo - konec
//zacetek latex tabele z obrobo za prvo tabelo
- $pdfTable = 'tabularx';
+ $pdfTable = 'xltabular';
$rtfTable = 'tabular';
$pdfTableWidth = 1;
$rtfTableWidth = 1;
@@ -346,15 +348,15 @@ class AnalizaCReport extends LatexAnalysisElement{
/*priprava polja z naslovi stolpcev*/
$text = array();
- $text[] = $this->encodeText($lang['srv_analiza_opisne_variable']);
- $text[] = $this->encodeText($lang['srv_analiza_opisne_variable_text1']);
+ $text[] = LatexDocument::encodeText($lang['srv_analiza_opisne_variable']);
+ $text[] = LatexDocument::encodeText($lang['srv_analiza_opisne_variable_text1']);
- $text[] = $this->encodeText($lang['srv_analiza_opisne_m']);
- $text[] = $this->encodeText($lang['srv_analiza_num_units']);
- $text[] = $this->encodeText($lang['srv_analiza_opisne_povprecje1']);
- $text[] = $this->encodeText($lang['srv_analiza_opisne_odklon']);
- $text[] = $this->encodeText($lang['srv_analiza_opisne_min']);
- $text[] = $this->encodeText($lang['srv_analiza_opisne_max']);
+ $text[] = LatexDocument::encodeText($lang['srv_analiza_opisne_m']);
+ $text[] = LatexDocument::encodeText($lang['srv_analiza_num_units']);
+ $text[] = LatexDocument::encodeText($lang['srv_analiza_opisne_povprecje1']);
+ $text[] = LatexDocument::encodeText($lang['srv_analiza_opisne_odklon']);
+ $text[] = LatexDocument::encodeText($lang['srv_analiza_opisne_min']);
+ $text[] = LatexDocument::encodeText($lang['srv_analiza_opisne_max']);
/*priprava polja z naslovi stolpcev - konec*/
$descLatex .= $this->tableRow($text);
@@ -369,7 +371,7 @@ class AnalizaCReport extends LatexAnalysisElement{
$show_enota = false;
/* preverimo ali imamo samo eno variablo in če iammo enoto*/
- if ((int)$spremenljivka['enota'] != 0 || $spremenljivka['cnt_all'] > 1 ) {
+ if (isset($spremenljivka['enota'])&&(int)$spremenljivka['enota'] != 0 || $spremenljivka['cnt_all'] > 1 ) {
$show_enota = true;
}
@@ -405,7 +407,7 @@ class AnalizaCReport extends LatexAnalysisElement{
? false
: true;
if ($do_show) {
- $descLatex .= $this->displayDescriptivesVariablaRow($spremenljivka,$grid,$variable,$_css);
+ $descLatex .= $this->displayDescriptivesVariablaRow($spremenljivka,$grid,$variable);
}
$grid['new_grid'] = false;
@@ -415,7 +417,7 @@ class AnalizaCReport extends LatexAnalysisElement{
} // end if $spremenljivka['tip'] != 'm'
/*zakljucek latex tabele*/
- $descLatex .= ($this->export_format == 'pdf' ? "\\end{tabularx}" : "\\end{tabular}");
+ $descLatex .= ($this->export_format == 'pdf' ? "\\end{xltabular}" : "\\end{tabular}");
/*zaljucek latex tabele - konec */
//echo "</br> Tex celotne tabele: ".$descLatex."</br>";
return $descLatex;
@@ -880,7 +882,7 @@ class AnalizaCReport extends LatexAnalysisElement{
function displayText($text=''){
global $lang;
$texTitle = '';
- $texTitle .= $this->encodeText($text).$this->texNewLine;
+ $texTitle .= LatexDocument::encodeText($text).$this->texNewLine;
return $texTitle;
}
@@ -961,7 +963,7 @@ class AnalizaCReport extends LatexAnalysisElement{
# za multicheckboxe popravimo naslov, na podtip
$sub_q1 = null;
$sub_q2 = null;
- if ($spr1['tip'] == '6' || $spr1['tip'] == '7' || $spr1['tip'] == '16' || $spr1['tip'] == '17' || $spr1['tip'] == '18' || $spr1['tip'] == '19' || $spr1['tip'] == '20' || $spr1['tip'] == '21' ) {
+ /* if ($spr1['tip'] == '6' || $spr1['tip'] == '7' || $spr1['tip'] == '16' || $spr1['tip'] == '17' || $spr1['tip'] == '18' || $spr1['tip'] == '19' || $spr1['tip'] == '20' || $spr1['tip'] == '21' ) {
foreach ($spr1['grids'] AS $grid) {
foreach ($grid['variables'] AS $variable) {
if ($variable['sequence'] == $v_first['seq']) {
@@ -977,12 +979,12 @@ class AnalizaCReport extends LatexAnalysisElement{
}
}
}
- }
+ } */
if ($sub_q1 == null) {
$sub_q1 .= strip_tags($spr1['naslov']);
$sub_q1 .= ($show_variables_values == true ? '&nbsp;('.strip_tags($spr1['variable']).')' : '');
}
- if ($spr2['tip'] == '6' || $spr2['tip'] == '7' || $spr2['tip'] == '16' || $spr2['tip'] == '17' || $spr2['tip'] == '18' || $spr2['tip'] == '19' || $spr2['tip'] == '20' || $spr2['tip'] == '21') {
+ /* if ($spr2['tip'] == '6' || $spr2['tip'] == '7' || $spr2['tip'] == '16' || $spr2['tip'] == '17' || $spr2['tip'] == '18' || $spr2['tip'] == '19' || $spr2['tip'] == '20' || $spr2['tip'] == '21') {
foreach ($spr2['grids'] AS $grid) {
foreach ($grid['variables'] AS $variable) {
if ($variable['sequence'] == $v_second['seq']) {
@@ -998,7 +1000,7 @@ class AnalizaCReport extends LatexAnalysisElement{
}
}
}
- }
+ } */
if ($sub_q2 == null) {
$sub_q2 .= strip_tags($spr2['naslov']);
$sub_q2 .= ($show_variables_values == true ? ' ('.strip_tags($spr2['variable']).')' : '');
@@ -1077,7 +1079,7 @@ class AnalizaCReport extends LatexAnalysisElement{
$variables = $breakClass->getVariableList(2);
foreach ($variables as $variable) {
- if($breakData1[0] == $variable['sequence']){
+ if(isset($variable['sequence'])&&$breakData1[0] == $variable['sequence']){
$label1 = ( (int)$variable['sub'] == 0 ? '' : ( (int)$variable['sub'] == 1 ? '&nbsp;&nbsp;' : '&nbsp;&nbsp;&nbsp;&nbsp;' )) . $variable['variableNaslov'];
$label1 = (strlen($label1) > 60) ? substr($label1, 0, 57).'...' : $label1;
@@ -1089,7 +1091,7 @@ class AnalizaCReport extends LatexAnalysisElement{
$variables = $this->getBreakDependentVariableList($breakClass);
foreach ($variables as $variable) {
- if($breakData2[0] == $variable['sequence']){
+ if(isset($variable['sequence'])&&$breakData2[0] == $variable['sequence']){
//$label2 = $variable['variableNaslov'];
$label2 = (strlen($variable['variableNaslov']) > 60) ? substr($variable['variableNaslov'], 0, 57).'...' : $variable['variableNaslov'];
@@ -1105,7 +1107,7 @@ class AnalizaCReport extends LatexAnalysisElement{
//TODO: Potrebno je v LATEX določiti ali je stran obrnjena landscape
$width = $this->landscapeTest() ? 270 : 165;
- $boldedTitle = $this->returnBold($this->encodeText($this->encodeText($title . $subtitle)));
+ $boldedTitle = $this->returnBold(LatexDocument::encodeText(LatexDocument::encodeText($title . $subtitle)));
$texTitle .= $this->returnCentered($boldedTitle);
return $texTitle;
@@ -1150,13 +1152,13 @@ class AnalizaCReport extends LatexAnalysisElement{
# zloopamo skozi header in dodamo variable (potrebujemo posamezne sekvence)
foreach ($breakClass->_HEADERS AS $skey => $spremenljivka) {
- $tip = $spremenljivka['tip'];
+ $tip = isset($spremenljivka['tip'])?$spremenljivka['tip']:null;
$_dropdown_condition = (is_numeric($tip) && $tip != 5 && $tip != 8 && $tip != 9) ? true : false;
if ($_dropdown_condition) {
$cnt_all = (int)$spremenljivka['cnt_all'];
- if ( $cnt_all == '1' || in_array($tip, array(1,2,3,4,7,17,18,21,22)) || ($tip == 6 && $spremenljivka['enota'] == 2) ) {
+ if ( $cnt_all == '1' || in_array($tip, array(1,2,3,4,7,17,18,21,22)) || ($tip == 6 && isset($spremenljivka['enota']) && $spremenljivka['enota'] == 2) ) {
# pri tipu radio ali select dodamo tisto variablo ki ni polje "drugo"
if ($tip == 1 || $tip == 3 ) {
@@ -1223,7 +1225,7 @@ class AnalizaCReport extends LatexAnalysisElement{
# imamo več gridov - tabele
foreach($spremenljivka['grids'] AS $gid => $grid) {
$sub = 0;
- if ($grid['variable'] != '') {
+ if (isset($grid['variable']) && $grid['variable'] != '') {
$sub++;
$variablesList[] = array(
'tip'=>$tip,
@@ -1277,7 +1279,7 @@ class AnalizaCReport extends LatexAnalysisElement{
$texTitle = '';
if($text != ''){
- $texTitle .= $this->encodeText($text).$this->texNewLine;
+ $texTitle .= LatexDocument::encodeText($text).$this->texNewLine;
}
return $texTitle;
}
diff --git a/admin/survey/export/latexclasses/Analize/AnalizaCharts.php b/admin/survey/export/latexclasses/Analize/AnalizaCharts.php
index bd632fa..a7a03ee 100644
--- a/admin/survey/export/latexclasses/Analize/AnalizaCharts.php
+++ b/admin/survey/export/latexclasses/Analize/AnalizaCharts.php
@@ -9,14 +9,14 @@
include_once('../exportclases/class.pdfIzvozAnalizaFunctions.php');
require_once('../exportclases/class.enka.pdf.php'); */
- define("ALLOW_HIDE_ZERRO_REGULAR", false); // omogočimo delovanje prikazovanja/skrivanja ničelnih vnosti za navadne odgovore
- define("ALLOW_HIDE_ZERRO_MISSING", true); // omogočimo delovanje prikazovanja/skrivanja ničelnih vnosti za missinge
+ if(!defined("ALLOW_HIDE_ZERRO_REGULAR"))define("ALLOW_HIDE_ZERRO_REGULAR", false); // omogočimo delovanje prikazovanja/skrivanja ničelnih vnosti za navadne odgovore
+ if(!defined("ALLOW_HIDE_ZERRO_MISSING"))define("ALLOW_HIDE_ZERRO_MISSING", true); // omogočimo delovanje prikazovanja/skrivanja ničelnih vnosti za missinge
- define("NUM_DIGIT_AVERAGE", 2); // stevilo digitalnih mest za povprecje
- define("NUM_DIGIT_DEVIATION", 2); // stevilo digitalnih mest za povprecje
+ if(!defined("NUM_DIGIT_AVERAGE"))define("NUM_DIGIT_AVERAGE", 2); // stevilo digitalnih mest za povprecje
+ if(!defined("NUM_DIGIT_DEVIATION"))define("NUM_DIGIT_DEVIATION", 2); // stevilo digitalnih mest za povprecje
- define("M_ANALIZA_DESCRIPTOR", "descriptor");
- define("M_ANALIZA_FREQUENCY", "frequency");
+ if(!defined("M_ANALIZA_DESCRIPTOR"))define("M_ANALIZA_DESCRIPTOR", "descriptor");
+ if(!defined("M_ANALIZA_FREQUENCY"))define("M_ANALIZA_FREQUENCY", "frequency");
define("FNT_FREESERIF", "freeserif");
define("FNT_FREESANS", "freesans");
@@ -129,7 +129,7 @@ class AnalizaCharts extends LatexAnalysisElement {
$this->pdf->Output($fileName, 'I');
}
- function displayCharts(){
+ function displayCharts($exportClass){
global $site_path;
global $lang;
@@ -147,7 +147,7 @@ class AnalizaCharts extends LatexAnalysisElement {
foreach (SurveyAnalysis::$_HEADERS AS $spid => $spremenljivka) {
// preverjamo ali je meta
- if (($spremenljivka['tip'] != 'm'
+ if ((isset($spremenljivka['tip'])&&$spremenljivka['tip'] != 'm'
&& in_array($spremenljivka['tip'], SurveyAnalysis::$_FILTRED_TYPES ))
&& (!isset($_spid) || (isset($_spid) && $_spid == $spid))
&& ($this->spremenljivka == $spid || $this->spremenljivka == null) ) {
@@ -156,7 +156,7 @@ class AnalizaCharts extends LatexAnalysisElement {
if ($vars_count == 0 || ($vars_count > 0 && isset(SurveyAnalysis::$_FILTRED_VARIABLES[$spid]) ) ) {
// Ce imamo radio tip in manj kot 5 variabel po defaultu prikazemo piechart
- $vars = count($spremenljivka['options']);
+ $vars = (isset($spremenljivka['options']) && is_countable($spremenljivka['options'])) ? count($spremenljivka['options']) : 0;
$type = 0;
if( ($spremenljivka['tip'] == 1 || $spremenljivka['tip'] == 3) && $vars < 5 )
$type = 2;
@@ -180,7 +180,7 @@ class AnalizaCharts extends LatexAnalysisElement {
//izpis naslova/podnaslova tabele
$stevilcenje = ($exportClass->numbering == 1 ? $spremenljivka['variable'].' - ' : '');
$title = $stevilcenje . $spremenljivka['naslov'];
- $boldedTitle = $this->returnBold($this->encodeText($title)).$this->texNewLine; //vrni boldan naslov in skoci v novo vrstico
+ $boldedTitle = $this->returnBold(LatexDocument::encodeText($title)).$this->texNewLine; //vrni boldan naslov in skoci v novo vrstico
if($spremenljivka['tip'] == 2){
$boldedSubTitle = $lang['srv_info_checkbox'];
}
@@ -219,7 +219,7 @@ class AnalizaCharts extends LatexAnalysisElement {
//izpis naslova/podnaslova tabele
$stevilcenje = ($exportClass->numbering == 1 ? $spremenljivka['variable'].' - ' : '');
$title = $stevilcenje . $spremenljivka['naslov'];
- $boldedTitle = $this->returnBold($this->encodeText($title)).$this->texNewLine; //vrni boldan naslov in skoci v novo vrstico
+ $boldedTitle = $this->returnBold(LatexDocument::encodeText($title)).$this->texNewLine; //vrni boldan naslov in skoci v novo vrstico
if($spremenljivka['tip'] == 2){
$boldedSubTitle = $lang['srv_info_checkbox'];
}
diff --git a/admin/survey/export/latexclasses/Analize/AnalizaCrosstab.php b/admin/survey/export/latexclasses/Analize/AnalizaCrosstab.php
index 7defd7f..fda4492 100644
--- a/admin/survey/export/latexclasses/Analize/AnalizaCrosstab.php
+++ b/admin/survey/export/latexclasses/Analize/AnalizaCrosstab.php
@@ -2,43 +2,43 @@
global $site_path;
- include_once('../../function.php');
+ /*include_once('../../function.php');
include_once('../survey/definition.php');
-/* include_once('../exportclases/class.pdfIzvozAnalizaFrekvenca.php');
+ include_once('../exportclases/class.pdfIzvozAnalizaFrekvenca.php');
include_once('../exportclases/class.pdfIzvozAnalizaFunctions.php');
require_once('../exportclases/class.enka.pdf.php'); */
- define("ALLOW_HIDE_ZERRO_REGULAR", false); // omogočimo delovanje prikazovanja/skrivanja ničelnih vnosti za navadne odgovore
- define("ALLOW_HIDE_ZERRO_MISSING", true); // omogočimo delovanje prikazovanja/skrivanja ničelnih vnosti za missinge
+ if(!defined("ALLOW_HIDE_ZERRO_REGULAR"))define("ALLOW_HIDE_ZERRO_REGULAR", false); // omogočimo delovanje prikazovanja/skrivanja ničelnih vnosti za navadne odgovore
+ if(!defined("ALLOW_HIDE_ZERRO_MISSING"))define("ALLOW_HIDE_ZERRO_MISSING", true); // omogočimo delovanje prikazovanja/skrivanja ničelnih vnosti za missinge
- define("NUM_DIGIT_AVERAGE", 2); // stevilo digitalnih mest za povprecje
- define("NUM_DIGIT_DEVIATION", 2); // stevilo digitalnih mest za povprecje
+ if(!defined("NUM_DIGIT_AVERAGE"))define("NUM_DIGIT_AVERAGE", 2); // stevilo digitalnih mest za povprecje
+ if(!defined("NUM_DIGIT_DEVIATION"))define("NUM_DIGIT_DEVIATION", 2); // stevilo digitalnih mest za povprecje
- define("M_ANALIZA_DESCRIPTOR", "descriptor");
- define("M_ANALIZA_FREQUENCY", "frequency");
+ if(!defined("M_ANALIZA_DESCRIPTOR"))define("M_ANALIZA_DESCRIPTOR", "descriptor");
+ if(!defined("M_ANALIZA_FREQUENCY"))define("M_ANALIZA_FREQUENCY", "frequency");
- define("FNT_FREESERIF", "freeserif");
- define("FNT_FREESANS", "freesans");
- define("FNT_HELVETICA", "helvetica");
+ if(!defined("FNT_FREESERIF"))define("FNT_FREESERIF", "freeserif");
+ if(!defined("FNT_FREESANS"))define("FNT_FREESANS", "freesans");
+ if(!defined("FNT_HELVETICA"))define("FNT_HELVETICA", "helvetica");
- define("FNT_MAIN_TEXT", FNT_FREESANS);
- define("FNT_QUESTION_TEXT", FNT_FREESANS);
- define("FNT_HEADER_TEXT", FNT_FREESANS);
+ if(!defined("FNT_MAIN_TEXT"))define("FNT_MAIN_TEXT", FNT_FREESANS);
+ if(!defined("FNT_QUESTION_TEXT"))define("FNT_QUESTION_TEXT", FNT_FREESANS);
+ if(!defined("FNT_HEADER_TEXT"))define("FNT_HEADER_TEXT", FNT_FREESANS);
- define("FNT_MAIN_SIZE", 10);
- define("FNT_QUESTION_SIZE", 9);
- define("FNT_HEADER_SIZE", 10);
+ if(!defined("FNT_MAIN_SIZE"))define("FNT_MAIN_SIZE", 10);
+ if(!defined("FNT_QUESTION_SIZE"))define("FNT_QUESTION_SIZE", 9);
+ if(!defined("FNT_HEADER_SIZE"))define("FNT_HEADER_SIZE", 10);
- define("RADIO_BTN_SIZE", 3);
- define("CHCK_BTN_SIZE", 3);
- define("LINE_BREAK", 6);
+ if(!defined("RADIO_BTN_SIZE"))define("RADIO_BTN_SIZE", 3);
+ if(!defined("CHCK_BTN_SIZE"))define("CHCK_BTN_SIZE", 3);
+ if(!defined("LINE_BREAK"))define("LINE_BREAK", 6);
- define ('PDF_MARGIN_HEADER', 8);
- define ('PDF_MARGIN_FOOTER', 12);
- define ('PDF_MARGIN_TOP', 18);
- define ('PDF_MARGIN_BOTTOM', 18);
- define ('PDF_MARGIN_LEFT', 15);
- define ('PDF_MARGIN_RIGHT', 15);
+ if(!defined("PDF_MARGIN_HEADER"))define ('PDF_MARGIN_HEADER', 8);
+ if(!defined("PDF_MARGIN_FOOTER"))define ('PDF_MARGIN_FOOTER', 12);
+ if(!defined("PDF_MARGIN_TOP"))define ('PDF_MARGIN_TOP', 18);
+ if(!defined("PDF_MARGIN_BOTTOM"))define ('PDF_MARGIN_BOTTOM', 18);
+ if(!defined("PDF_MARGIN_LEFT"))define ('PDF_MARGIN_LEFT', 15);
+ if(!defined("PDF_MARGIN_RIGHT"))define ('PDF_MARGIN_RIGHT', 15);
/**
* @desc Class za generacijo izvoza v Latex
@@ -71,6 +71,7 @@ class AnalizaCrosstab extends LatexAnalysisElement{
protected $spaceBetweenTables = ' \newline \vspace*{1 cm} \newline';
public $crosstabClass = null; //crosstab class
+ protected $crosstabVars = null;
protected $sessionData;
protected $counter;
@@ -170,7 +171,7 @@ class AnalizaCrosstab extends LatexAnalysisElement{
$this->pdf->SetSubject('An Order');
// set default header data
- $this->pdf->SetHeaderData(null, null, "www.1ka.si", $this->encodeText(SurveyInfo::getInstance()->getSurveyAkronim()));
+ $this->pdf->SetHeaderData(null, null, "www.1ka.si", LatexDocument::encodeText(SurveyInfo::getInstance()->getSurveyAkronim()));
//set auto page breaks
$this->pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
@@ -213,8 +214,8 @@ class AnalizaCrosstab extends LatexAnalysisElement{
/* print_r($crosstabClass);
echo "</br>"; */
- $grid1 = $spr1['grids'][$v_first['grd']];
- $grid2 = $spr2['grids'][$v_second['grd']];
+ $grid1 = isset($spr1['grids'][$v_first['grd']])?$spr1['grids'][$v_first['grd']]:array();
+ $grid2 = isset($spr2['grids'][$v_second['grd']])?$spr2['grids'][$v_second['grd']]:array();
#število vrstic in število kolon
$cols = count($crosstabs['options1']);
@@ -317,13 +318,9 @@ class AnalizaCrosstab extends LatexAnalysisElement{
$this->crosstabClass->crossChkSR +
$this->crosstabClass->crossChkAR;
- //echo "steviloVmesnihVrstic: ".$steviloVmesnihVrstic."</br>";
- //echo "steviloVmesnihStolpcevPodvrstica2: ".$steviloVmesnihStolpcevPodvrstica2."</br>";
- //echo "steviloVmesnihStolpcevPodvrstica3: ".$steviloVmesnihStolpcevPodvrstica3."</br>";
$podVrstice = 0;
- //if($steviloVmesnihStolpcevPodvrstica2||$steviloVmesnihStolpcevPodvrstica3){
if($steviloVmesnihStolpcevPodvrstica2&&$steviloVmesnihStolpcevPodvrstica3){
//echo "1 </br>";
if($steviloVmesnihStolpcevPodvrstica2 >= $steviloVmesnihStolpcevPodvrstica3){
@@ -462,18 +459,15 @@ class AnalizaCrosstab extends LatexAnalysisElement{
for($i = 0; $i < $steviloStolpcevParameterTabular; $i++){
//ce je prvi stolpec
if($i == 0){
- //$parameterTabular .= ($export_format == 'pdf' ? 'P|' : 'l|');
$parameterTabular .= ($export_format == 'pdf' ? 'X|' : 'l|');
}else{
- //$parameterTabular .= ($export_format == 'pdf' ? ' >{\hsize='.$sirinaOstalihStolpcev.'\hsize \centering\arraybackslash}X|' : 'c|'); /*sirina ostalih je odvisna od njihovega stevila, da se sirine razporedijo po celotni sirini tabele*/
$parameterTabular .= ($export_format == 'pdf' ? 'X|' : 'c|'); /*sirina ostalih je odvisna od njihovega stevila, da se sirine razporedijo po celotni sirini tabele*/
- //$parameterTabular .= ($export_format == 'pdf' ? 'c|' : 'c|'); /*sirina ostalih je odvisna od njihovega stevila, da se sirine razporedijo po celotni sirini tabele*/ //pred spremembo je bilo to
}
}
//Priprava parametrov za tabelo - konec
//zacetek latex tabele z obrobo za prvo tabelo
- $pdfTable = 'tabularx';
+ $pdfTable = 'xltabular';
$rtfTable = 'tabular';
$pdfTableWidth = 1;
$rtfTableWidth = 1;
@@ -494,10 +488,9 @@ class AnalizaCrosstab extends LatexAnalysisElement{
$steviloArrayrulewidth = ($steviloMultiCol1-1);
if($export_format=='pdf'){
- //$tabela .= " & \multicolumn{".$steviloMultiCol1."}{>{\hsize=\dimexpr".$steviloMultiCol1."\hsize+".$steviloTabColSep."\\tabcolsep+".$steviloArrayrulewidth."\arrayrulewidth\\relax}C|}{".$this->encodeText($sub_q1)."} "; //prvi (prazen) in stolpec z besedilom
- $tabela .= " & \multicolumn{".$steviloMultiCol1."}{>{\hsize=\dimexpr".$steviloMultiCol1."\hsize+".$steviloTabColSep."\\tabcolsep+".$steviloArrayrulewidth."\arrayrulewidth\\relax}c|}{".$this->encodeText($sub_q1)."} "; //prvi (prazen) in stolpec z besedilom
+ $tabela .= " & \multicolumn{".$steviloMultiCol1."}{>{\hsize=\dimexpr".$steviloMultiCol1."\hsize+".$steviloTabColSep."\\tabcolsep+".$steviloArrayrulewidth."\arrayrulewidth\\relax}c|}{".LatexDocument::encodeText($sub_q1)."} "; //prvi (prazen) in stolpec z besedilom
}elseif($export_format=='rtf'){
- $tabela .= " & \multicolumn{".$steviloMultiCol1."}{c|}{".$this->encodeText($sub_q1)."} "; //prvi (prazen) in stolpec z besedilom
+ $tabela .= " & \multicolumn{".$steviloMultiCol1."}{c|}{".LatexDocument::encodeText($sub_q1)."} "; //prvi (prazen) in stolpec z besedilom
}
###########
@@ -524,9 +517,7 @@ class AnalizaCrosstab extends LatexAnalysisElement{
//prva vrstica - konec ##############################################################################
// druga vrstica ####################################################################################
- $tabela .= $this->encodeText($sub_q2); //prvi stolpec 2. vrstice
- //echo "testiram, kjer ssem: ".$this->encodeText($sub_q2)."</br>";
- //echo "testiram, kjer ssem: ".$steviloTabColSep."</br>";
+ $tabela .= LatexDocument::encodeText($sub_q2); //prvi stolpec 2. vrstice
$drugaVrstica = array();
if (count($crosstabs['options1']) > 0 ) { //stolpci (izkljucno) med prvim in zadnjim
foreach ($crosstabs['options1'] as $ckey1 =>$crossVariabla) {
@@ -536,21 +527,25 @@ class AnalizaCrosstab extends LatexAnalysisElement{
if ($crossVariabla['type'] != 't') {
$text .= ' ( '.$ckey1.' )';
}
- $tabela .= $this->MultiColCellLatex($steviloVmesnihStolpcevPodvrstic, $this->encodeText($text));
+ $tabela .= $this->MultiColCellLatex($steviloVmesnihStolpcevPodvrstic, LatexDocument::encodeText($text));
}
}
- //echo "test: ".$podVrstice."</br>";
if($podVrstice){ //ce je potrebno multicol prikazovanje
//spremenljivke za pravilno sirino
$colNum = $steviloVmesnihStolpcevPodvrstic;
- $colNum2 = $steviloVmesnihStolpcevPodvrstic/$steviloVmesnihStolpcevPodvrstica2; //stevilo podstolpcev za 2. podvrstico
- $colNum3 = $steviloVmesnihStolpcevPodvrstic/$steviloVmesnihStolpcevPodvrstica3; //stevilo podstolpcev za 3. podvrstico
+ if($steviloVmesnihStolpcevPodvrstica2){
+ $colNum2 = $steviloVmesnihStolpcevPodvrstic/$steviloVmesnihStolpcevPodvrstica2; //stevilo podstolpcev za 2. podvrstico
+ }
+ if($steviloVmesnihStolpcevPodvrstica3){
+ $colNum3 = $steviloVmesnihStolpcevPodvrstic/$steviloVmesnihStolpcevPodvrstica3; //stevilo podstolpcev za 3. podvrstico
+ }
+
//spremenljivke za pravilno sirino - konec
- $tabela .= $this->MultiColCellLatex($colNum, $this->encodeText($lang['srv_analiza_crosstab_skupaj'])); //izpis naslova zadnjega stolpca 2. vestice
+ $tabela .= $this->MultiColCellLatex($colNum, LatexDocument::encodeText($lang['srv_analiza_crosstab_skupaj'])); //izpis naslova zadnjega stolpca 2. vestice
}else{
$tabela .= " & ";
- $tabela .= $this->encodeText($lang['srv_analiza_crosstab_skupaj']); //izpis naslova zadnjega stolpca 2. vestice
+ $tabela .= LatexDocument::encodeText($lang['srv_analiza_crosstab_skupaj']); //izpis naslova zadnjega stolpca 2. vestice
}
$tabela .= $this->texNewLine; /*nova vrstica*/
@@ -560,15 +555,20 @@ class AnalizaCrosstab extends LatexAnalysisElement{
// druga vrstica - konec #########################################################################
+ $tabela1 = ''; //za belezenje 1. vrstice s frekvencami
+ $tabela2 = ''; //za belezenje 2. vrstice z odstotki
+ $tabela3 = ''; //za belezenje 3. vrstice z residuali
+ $colNum = isset($colNum)?$colNum:0;
//izpis vmesnih vrstic tabele ####################################################################
if (count($crosstabs['options2']) > 0) {
+
//POSAMEZNA VMESNA VRSTICA
foreach ($crosstabs['options2'] as $ckey2 =>$crossVariabla2) {
//priprava besedila za prvo celico 1. stolpca
$text = $crossVariabla2['naslov'];
if($export_format != 'xls'){
- $text = $this->snippet($this->encodeText($text), 25);
+ $text = $this->snippet(LatexDocument::encodeText($text), 25);
}
if ($crossVariabla2['type'] !== 't') {
$text .= ' ('.$ckey2.')';
@@ -577,7 +577,7 @@ class AnalizaCrosstab extends LatexAnalysisElement{
//izpis prve celice 1. stolpca
if($export_format != 'xls'){
- $tabela .= $this->MultiRowCellLatex($steviloVmesnihVrstic, $this->encodeText($text));
+ $tabela .= $this->MultiRowCellLatex($steviloVmesnihVrstic, LatexDocument::encodeText($text));
}else{
$tabela .= $text;
}
@@ -585,45 +585,54 @@ class AnalizaCrosstab extends LatexAnalysisElement{
$tabela1 = ''; //za belezenje 1. vrstice s frekvencami
$tabela2 = ''; //za belezenje 2. vrstice z odstotki
$tabela3 = ''; //za belezenje 3. vrstice z residuali
-
+ $colNum = isset($colNum)?$colNum:0;
foreach ($crosstabs['options1'] as $ckey1 => $crossVariabla1) {
-
if ($this->crosstabClass->crossChk0) {
# frekvence crostabov
- $crossChk0 = ((int)$crosstabs_value[$ckey1][$ckey2] > 0) ? $crosstabs_value[$ckey1][$ckey2] : 0;
+ //$crossChk0 = ((int)$crosstabs_value[$ckey1][$ckey2] > 0) ? $crosstabs_value[$ckey1][$ckey2] : 0;
+ if(array_key_exists($ckey1, $crosstabs_value)&&array_key_exists($ckey2, $crosstabs_value)){
+ $crossChk0 = ((int)$crosstabs_value[$ckey1][$ckey2] > 0) ? $crosstabs_value[$ckey1][$ckey2] : 0;
+ }else{
+ $crossChk0 = 0;
+ }
$tabela1 .= $this->DisplayLatexCells($crossChk0, $podVrstice, $colNum);
}
if ($this->crosstabClass->crossChk1) {
#procent vrstica
- $crossChk1 = $this->encodeText($this->formatNumber($this->crosstabClass->getCrossTabPercentage($crosstabs['sumaVrstica'][$ckey2], $crosstabs_value[$ckey1][$ckey2]), 2, '%'));
- $tabela2 .= $this->DisplayLatexCells($crossChk1, $podVrstice, $colNum2);
+ if(array_key_exists($ckey1, $crosstabs_value)){
+ $crossChk1 = LatexDocument::encodeText($this->formatNumber($this->crosstabClass->getCrossTabPercentage($crosstabs['sumaVrstica'][$ckey2], $crosstabs_value[$ckey1][$ckey2]), 2, '%'));
+ $tabela2 .= $this->DisplayLatexCells($crossChk1, $podVrstice, $colNum2);
+ }
+
}
if ($this->crosstabClass->crossChk2) {
#procent stolpec
- $crossChk2 = $this->encodeText($this->formatNumber($this->crosstabClass->getCrossTabPercentage($crosstabs['sumaStolpec'][$ckey1], $crosstabs_value[$ckey1][$ckey2]), 2, '%'));
+ $crossChk2 = LatexDocument::encodeText($this->formatNumber($this->crosstabClass->getCrossTabPercentage($crosstabs['sumaStolpec'][$ckey1], $crosstabs_value[$ckey1][$ckey2]), 2, '%'));
$tabela2 .= $this->DisplayLatexCells($crossChk2, $podVrstice, $colNum2);
}
if ($this->crosstabClass->crossChk3) {
#procent skupni
- $crossChk3 = $this->encodeText($this->formatNumber($this->crosstabClass->getCrossTabPercentage($crosstabs['sumaSkupna'], $crosstabs_value[$ckey1][$ckey2]), 2, '%'));
+ if(array_key_exists($ckey1, $crosstabs_value)){
+ $crossChk3 = LatexDocument::encodeText($this->formatNumber($this->crosstabClass->getCrossTabPercentage($crosstabs['sumaSkupna'], $crosstabs_value[$ckey1][$ckey2]), 2, '%'));
+ }
$tabela2 .= $this->DisplayLatexCells($crossChk3, $podVrstice, $colNum2);
}
# residuali
if ($this->crosstabClass->crossChkEC) {
- $crossChkEC = $this->encodeText($this->formatNumber($crosstabs['exC'][$ckey1][$ckey2], 3, ''));
+ $crossChkEC = LatexDocument::encodeText($this->formatNumber($crosstabs['exC'][$ckey1][$ckey2], 3, ''));
$tabela3 .= $this->DisplayLatexCells($crossChkEC, $podVrstice, $colNum3);
}
if ($this->crosstabClass->crossChkRE) {
- $crossChkRE = $this->encodeText($this->formatNumber($crosstabs['res'][$ckey1][$ckey2], 3, ''));
+ $crossChkRE = LatexDocument::encodeText($this->formatNumber($crosstabs['res'][$ckey1][$ckey2], 3, ''));
$tabela3 .= $this->DisplayLatexCells($crossChkRE, $podVrstice, $colNum3);
}
if ($this->crosstabClass->crossChkSR) {
- $crossChkSR = $this->encodeText($this->formatNumber($crosstabs['stR'][$ckey1][$ckey2], 3, ''));
+ $crossChkSR = LatexDocument::encodeText($this->formatNumber($crosstabs['stR'][$ckey1][$ckey2], 3, ''));
$tabela3 .= $this->DisplayLatexCells($crossChkSR, $podVrstice, $colNum3);
}
if ($this->crosstabClass->crossChkAR) {
- $crossChkAR = $this->encodeText($this->formatNumber($crosstabs['adR'][$ckey1][$ckey2], 3, ''));
+ $crossChkAR = LatexDocument::encodeText($this->formatNumber($crosstabs['adR'][$ckey1][$ckey2], 3, ''));
$tabela3 .= $this->DisplayLatexCells($crossChkAR, $podVrstice, $colNum3);
}
}
@@ -631,21 +640,25 @@ class AnalizaCrosstab extends LatexAnalysisElement{
//se zadnji stolpec - vedno risemo
if ($this->crosstabClass->crossChk0) {
# suma po vrsticah
- $crossChk0 = (int)$crosstabs['sumaVrstica'][$ckey2];
+ if(array_key_exists($ckey2, $crosstabs['sumaVrstica'])){
+ $crossChk0 = (int)$crosstabs['sumaVrstica'][$ckey2];
+ }else{
+ $crossChk0 = null;
+ }
$tabela1 .= $this->DisplayLatexCells($crossChk0, $podVrstice, $colNum, $steviloVmesnihStolpcevPodvrstic);
}
if ($this->crosstabClass->crossChk1 || $this->crosstabClass->crossChk2 || $this->crosstabClass->crossChk3) {
# suma po vrsticah v procentih
if ($this->crosstabClass->crossChk1) {
- $crossChk1 = $this->encodeText($this->formatNumber(100, 2, '%'));
+ $crossChk1 = LatexDocument::encodeText($this->formatNumber(100, 2, '%'));
$tabela2 .= $this->DisplayLatexCells($crossChk1, $podVrstice, $colNum2, $steviloVmesnihStolpcevPodvrstic);
}
if ($this->crosstabClass->crossChk2) {
- $crossChk2 = $this->encodeText($this->formatNumber( ($crosstabs['sumaSkupna'] > 0 ? (100 * $crosstabs['sumaVrstica'][$ckey2] / $crosstabs['sumaSkupna']) : 0), 2, '%'));
+ $crossChk2 = LatexDocument::encodeText($this->formatNumber( ($crosstabs['sumaSkupna'] > 0 ? (100 * $crosstabs['sumaVrstica'][$ckey2] / $crosstabs['sumaSkupna']) : 0), 2, '%'));
$tabela2 .= $this->DisplayLatexCells($crossChk2, $podVrstice, $colNum2, $steviloVmesnihStolpcevPodvrstic);
}
if ($this->crosstabClass->crossChk3) {
- $crossChk3 = $this->encodeText($this->formatNumber( ($crosstabs['sumaSkupna'] > 0 ? (100 * $crosstabs['sumaVrstica'][$ckey2] / $crosstabs['sumaSkupna']) : 0), 2, '%'));
+ $crossChk3 = LatexDocument::encodeText($this->formatNumber( ($crosstabs['sumaSkupna'] > 0 ? (100 * $crosstabs['sumaVrstica'][$ckey2] / $crosstabs['sumaSkupna']) : 0), 2, '%'));
$tabela2 .= $this->DisplayLatexCells($crossChk3, $podVrstice, $colNum2, $steviloVmesnihStolpcevPodvrstic);
}
}
@@ -691,35 +704,40 @@ class AnalizaCrosstab extends LatexAnalysisElement{
//izpis celice v prvem stolpcu
if($export_format != 'xls'){
- $tabela .= $this->MultiRowCellLatex($steviloVmesnihVrstic, $this->encodeText($lang['srv_analiza_crosstab_skupaj']), $tabela2, $tabela3, $cols);
+ $tabela .= $this->MultiRowCellLatex($steviloVmesnihVrstic, LatexDocument::encodeText($lang['srv_analiza_crosstab_skupaj']), $tabela2, $tabela3, $cols);
}else{
- $tabela .= $this->encodeText($lang['srv_analiza_crosstab_skupaj']);
+ $tabela .= LatexDocument::encodeText($lang['srv_analiza_crosstab_skupaj']);
}
//izpis celice v prvem stolpcu - konec
+ $tabelaZadnja1 = ''; //belezi kodo za 1. podvrstico zadnje vrstice
+ $tabelaZadnja2 = ''; //belezi kodo za 2. podvrstico zadnje vrstice
if (count($crosstabs['options1']) > 0){
- $tabelaZadnja1 = ''; //belezi kodo za 1. podvrstico zadnje vrstice
- $tabelaZadnja2 = ''; //belezi kodo za 2. podvrstico zadnje vrstice
+
foreach ($crosstabs['options1'] as $ckey1 => $crossVariabla1) {
# prikazujemo eno od treh možnosti
if ($this->crosstabClass->crossChk0) {
# suma po stolpcih
- $crossChk0 = (int)$crosstabs['sumaStolpec'][$ckey1];
+ if(array_key_exists($ckey1, $crosstabs['sumaStolpec'])){
+ $crossChk0 = (int)$crosstabs['sumaStolpec'][$ckey1];
+ }else{
+ $crossChk0 = null;
+ }
$tabelaZadnja1 .= $this->DisplayLatexCells($crossChk0, $podVrstice, $colNum, $steviloVmesnihStolpcevPodvrstic);
}
if ($this->crosstabClass->crossChk1 || $this->crosstabClass->crossChk2 || $this->crosstabClass->crossChk3) {
# suma po stolpcih v procentih
if ($this->crosstabClass->crossChk1) {
- $crossChk1 = $this->encodeText($this->formatNumber( ($crosstabs['sumaSkupna'] > 0 ? (100 * $crosstabs['sumaStolpec'][$ckey1] / $crosstabs['sumaSkupna']) : 0), 2, '%'));
+ $crossChk1 = LatexDocument::encodeText($this->formatNumber( ($crosstabs['sumaSkupna'] > 0 ? (100 * $crosstabs['sumaStolpec'][$ckey1] / $crosstabs['sumaSkupna']) : 0), 2, '%'));
$tabelaZadnja2 .= $this->DisplayLatexCells($crossChk1, $podVrstice, $colNum2, $steviloVmesnihStolpcevPodvrstic);
}
if ($this->crosstabClass->crossChk2) {
- $crossChk2 = $this->encodeText($this->formatNumber(100, 2, '%'));
+ $crossChk2 = LatexDocument::encodeText($this->formatNumber(100, 2, '%'));
$tabelaZadnja2 .= $this->DisplayLatexCells($crossChk2, $podVrstice, $colNum2, $steviloVmesnihStolpcevPodvrstic);
}
if ($this->crosstabClass->crossChk3){
- $crossChk3 = $this->encodeText($this->formatNumber( ($crosstabs['sumaSkupna'] > 0 ? (100 * $crosstabs['sumaStolpec'][$ckey1] / $crosstabs['sumaSkupna']) : 0), 2, '%'));
+ $crossChk3 = LatexDocument::encodeText($this->formatNumber( ($crosstabs['sumaSkupna'] > 0 ? (100 * $crosstabs['sumaStolpec'][$ckey1] / $crosstabs['sumaSkupna']) : 0), 2, '%'));
$tabelaZadnja2 .= $this->DisplayLatexCells($crossChk3, $podVrstice, $colNum2, $steviloVmesnihStolpcevPodvrstic);
}
}
@@ -734,15 +752,15 @@ class AnalizaCrosstab extends LatexAnalysisElement{
if ($this->crosstabClass->crossChk1 || $this->crosstabClass->crossChk2 || $this->crosstabClass->crossChk3) {
# suma po stolpcih v procentih
if ($this->crosstabClass->crossChk1) {
- $crossChk1 = $this->encodeText($this->formatNumber(100, 2, '%'));
+ $crossChk1 = LatexDocument::encodeText($this->formatNumber(100, 2, '%'));
$tabelaZadnja2 .= $this->DisplayLatexCells($crossChk1, $podVrstice, $colNum2, $steviloVmesnihStolpcevPodvrstic);
}
if ($this->crosstabClass->crossChk2) {
- $crossChk2 = $this->encodeText($this->formatNumber(100, 2, '%'));
+ $crossChk2 = LatexDocument::encodeText($this->formatNumber(100, 2, '%'));
$tabelaZadnja2 .= $this->DisplayLatexCells($crossChk2, $podVrstice, $colNum2, $steviloVmesnihStolpcevPodvrstic);
}
if ($this->crosstabClass->crossChk3) {
- $crossChk3 = $this->encodeText($this->formatNumber(100, 2, '%'));
+ $crossChk3 = LatexDocument::encodeText($this->formatNumber(100, 2, '%'));
$tabelaZadnja2 .= $this->DisplayLatexCells($crossChk3, $podVrstice, $colNum2, $steviloVmesnihStolpcevPodvrstic);
}
}
@@ -851,7 +869,7 @@ class AnalizaCrosstab extends LatexAnalysisElement{
//Priprava parametrov za tabelo - konec
//zacetek latex tabele z obrobo za prvo tabelo
- $pdfTable = 'tabularx';
+ $pdfTable = 'xltabular';
$rtfTable = 'tabular';
$pdfTableWidth = 1;
$rtfTableWidth = 1;
@@ -887,16 +905,16 @@ class AnalizaCrosstab extends LatexAnalysisElement{
$steviloTabColSep = ($steviloMultiCol1-1)*2;
$steviloArrayrulewidth = ($steviloMultiCol1-1);
if($export_format=='pdf'){
- //$tabela .= " & \multicolumn{".$steviloMultiCol1."}{>{\hsize=\dimexpr".$steviloMultiCol1."\hsize+".$steviloTabColSep."\\tabcolsep+".$steviloArrayrulewidth."\arrayrulewidth\\relax}C|}{".$this->encodeText($sub_q1)."} "; //prvi (prazen) in stolpec z besedilom
- $tabela .= " & \multicolumn{".$steviloMultiCol1."}{>{\hsize=\dimexpr".$steviloMultiCol1."\hsize+".$steviloTabColSep."\\tabcolsep+".$steviloArrayrulewidth."\arrayrulewidth\\relax}c|}{".$this->encodeText($sub_q1)."} "; //prvi (prazen) in stolpec z besedilom
+ //$tabela .= " & \multicolumn{".$steviloMultiCol1."}{>{\hsize=\dimexpr".$steviloMultiCol1."\hsize+".$steviloTabColSep."\\tabcolsep+".$steviloArrayrulewidth."\arrayrulewidth\\relax}C|}{".LatexDocument::encodeText($sub_q1)."} "; //prvi (prazen) in stolpec z besedilom
+ $tabela .= " & \multicolumn{".$steviloMultiCol1."}{>{\hsize=\dimexpr".$steviloMultiCol1."\hsize+".$steviloTabColSep."\\tabcolsep+".$steviloArrayrulewidth."\arrayrulewidth\\relax}c|}{".LatexDocument::encodeText($sub_q1)."} "; //prvi (prazen) in stolpec z besedilom
}elseif($export_format=='rtf'){
- $tabela .= " & \multicolumn{".$steviloMultiCol1."}{c|}{".$this->encodeText($sub_q1)."} "; //prvi (prazen) in stolpec z besedilom
+ $tabela .= " & \multicolumn{".$steviloMultiCol1."}{c|}{".LatexDocument::encodeText($sub_q1)."} "; //prvi (prazen) in stolpec z besedilom
}
}else{
- $tabela .= " & ".$this->encodeText($sub_q1)." ";
+ $tabela .= " & ".LatexDocument::encodeText($sub_q1)." ";
}
###########
- //echo "testiram, kjer ssem: ".$this->encodeText($sub_q1)."</br>";
+ //echo "testiram, kjer ssem: ".LatexDocument::encodeText($sub_q1)."</br>";
if($cols[$t]!=0 &&($t == ($steviloTabel-1))){
if($steviloVmesnihStolpcevPodvrstic==1){
@@ -923,14 +941,11 @@ class AnalizaCrosstab extends LatexAnalysisElement{
//echo "$tabela</br>";
// druga vrstica ####################################################################################
- $tabela .= $this->encodeText($sub_q2); //prvi stolpec 2. vrstice
- //echo "testiram, kjer ssem: ".$this->encodeText($sub_q2)."</br>";
- //echo "testiram, kjer ssem: ".$steviloTabColSep."</br>";
+ $tabela .= LatexDocument::encodeText($sub_q2); //prvi stolpec 2. vrstice
$drugaVrstica = array();
//echo count($crosstabsOptions1All[$t])."</br>";
- //if (count($crosstabs['options1']) > 0 ) { //stolpci (izkljucno) med prvim in zadnjim
- if (count($crosstabsOptions1All[$t]) > 0 ) { //stolpci (izkljucno) med prvim in zadnjim
+ if (isset($crosstabsOptions1All[$t])&&count($crosstabsOptions1All[$t]) > 0 ) { //stolpci (izkljucno) med prvim in zadnjim
foreach ($crosstabsOptions1All[$t] as $ckey1 =>$crossVariabla) {
#ime variable
$text = $crossVariabla['naslov'];
@@ -938,9 +953,9 @@ class AnalizaCrosstab extends LatexAnalysisElement{
if ($crossVariabla['type'] != 't') {
$text .= ' ( '.$ckey1.' )';
}
- $tabela .= $this->MultiColCellLatex($steviloVmesnihStolpcevPodvrstic, $this->encodeText($text));
+ $tabela .= $this->MultiColCellLatex($steviloVmesnihStolpcevPodvrstic, LatexDocument::encodeText($text));
//echo "steviloVmesnihStolpcevPodvrstic $t: $steviloVmesnihStolpcevPodvrstic</br>";
- //echo $this->encodeText($text)."</br>";
+ //echo LatexDocument::encodeText($text)."</br>";
}
if($niSodo && $t == ($steviloTabel-2) && $reziduali){ //ce ni sodo in je predzadnja podtabela in so reziduali, dodaj se vse potrebno za prazen stolpec
//if($niSodo && $t == ($steviloTabel-2)){ //ce ni sodo in je predzadnja podtabela, dodaj se vse potrebno za prazen stolpec
@@ -953,18 +968,22 @@ class AnalizaCrosstab extends LatexAnalysisElement{
if($podVrstice){ //ce je potrebno multicol prikazovanje
//spremenljivke za pravilno sirino
$colNum = $steviloVmesnihStolpcevPodvrstic;
- $colNum2 = $steviloVmesnihStolpcevPodvrstic/$steviloVmesnihStolpcevPodvrstica2; //stevilo podstolpcev za 2. podvrstico
- $colNum3 = $steviloVmesnihStolpcevPodvrstic/$steviloVmesnihStolpcevPodvrstica3; //stevilo podstolpcev za 3. podvrstico
+ if($steviloVmesnihStolpcevPodvrstica2){
+ $colNum2 = $steviloVmesnihStolpcevPodvrstic/$steviloVmesnihStolpcevPodvrstica2; //stevilo podstolpcev za 2. podvrstico
+ }
+ if($steviloVmesnihStolpcevPodvrstica3){
+ $colNum3 = $steviloVmesnihStolpcevPodvrstic/$steviloVmesnihStolpcevPodvrstica3; //stevilo podstolpcev za 3. podvrstico
+ }
//spremenljivke za pravilno sirino - konec
if($t == ($steviloTabel-1)){ //ce je zadnji stolpec v podtabeli
- $tabela .= $this->MultiColCellLatex($colNum, $this->encodeText($lang['srv_analiza_crosstab_skupaj'])); //izpis naslova zadnjega stolpca 2. vrstice
+ $tabela .= $this->MultiColCellLatex($colNum, LatexDocument::encodeText($lang['srv_analiza_crosstab_skupaj'])); //izpis naslova zadnjega stolpca 2. vrstice
}
//}else{
}elseif(($t == ($steviloTabel-1))){ //ce je zadnja podtabela
//}elseif(($t == ($steviloTabel-1)) && $niSodo == 1){
$tabela .= " & ";
- $tabela .= $this->encodeText($lang['srv_analiza_crosstab_skupaj']); //izpis naslova zadnjega stolpca 2. vrstice
+ $tabela .= LatexDocument::encodeText($lang['srv_analiza_crosstab_skupaj']); //izpis naslova zadnjega stolpca 2. vrstice
}
$tabela .= $this->texNewLine; /*nova vrstica*/
@@ -985,7 +1004,7 @@ class AnalizaCrosstab extends LatexAnalysisElement{
//priprava besedila za prvo celico 1. stolpca
$text = $crossVariabla2['naslov'];
if($export_format != 'xls'){
- $text = $this->snippet($this->encodeText($text), 25);
+ $text = $this->snippet(LatexDocument::encodeText($text), 25);
}
if ($crossVariabla2['type'] !== 't') {
$text .= ' ('.$ckey2.')';
@@ -994,7 +1013,7 @@ class AnalizaCrosstab extends LatexAnalysisElement{
//izpis prve celice 1. stolpca
if($export_format != 'xls'){
- $tabela .= $this->MultiRowCellLatex($steviloVmesnihVrstic, $this->encodeText($text));
+ $tabela .= $this->MultiRowCellLatex($steviloVmesnihVrstic, LatexDocument::encodeText($text));
}else{
$tabela .= $text;
}
@@ -1004,11 +1023,12 @@ class AnalizaCrosstab extends LatexAnalysisElement{
$tabela3 = ''; //za belezenje 3. vrstice z residuali
//foreach ($crosstabs['options1'] as $ckey1 => $crossVariabla1) {
+ if(isset($crosstabsOptions1All[$t]))
foreach ($crosstabsOptions1All[$t] as $ckey1 => $crossVariabla1) {
if ($this->crosstabClass->crossChk0) {
# frekvence crostabov
- $crossChk0 = ((int)$crosstabs_value[$ckey1][$ckey2] > 0) ? $crosstabs_value[$ckey1][$ckey2] : 0;
+ $crossChk0 = (isset($crosstabs_value[$ckey1][$ckey2])&&(int)$crosstabs_value[$ckey1][$ckey2] > 0) ? $crosstabs_value[$ckey1][$ckey2] : 0;
$tabela1 .= $this->DisplayLatexCells($crossChk0, $podVrstice, $colNum);
/* if($niSodo && $t == ($steviloTabel-2)){ //ce ni sodo in je predzadnja podtabela, dodaj se vse potrebno za prazen stolpec
$tabela1 .= $this->MultiColCellLatex($steviloVmesnihStolpcevPodvrstic, '');
@@ -1017,35 +1037,35 @@ class AnalizaCrosstab extends LatexAnalysisElement{
}
if ($this->crosstabClass->crossChk1) {
#procent vrstica
- $crossChk1 = $this->encodeText($this->formatNumber($this->crosstabClass->getCrossTabPercentage($crosstabs['sumaVrstica'][$ckey2], $crosstabs_value[$ckey1][$ckey2]), 2, '%'));
+ $crossChk1 = LatexDocument::encodeText($this->formatNumber($this->crosstabClass->getCrossTabPercentage((isset($crosstabs['sumaVrstica'][$ckey2])?$crosstabs['sumaVrstica'][$ckey2]:null), (isset($crosstabs_value[$ckey1][$ckey2])?$crosstabs_value[$ckey1][$ckey2]:null)), 2, '%'));
$tabela2 .= $this->DisplayLatexCells($crossChk1, $podVrstice, $colNum2);
}
if ($this->crosstabClass->crossChk2) {
#procent stolpec
- $crossChk2 = $this->encodeText($this->formatNumber($this->crosstabClass->getCrossTabPercentage($crosstabs['sumaStolpec'][$ckey1], $crosstabs_value[$ckey1][$ckey2]), 2, '%'));
+ $crossChk2 = LatexDocument::encodeText($this->formatNumber($this->crosstabClass->getCrossTabPercentage((isset($crosstabs['sumaStolpec'][$ckey1])?$crosstabs['sumaStolpec'][$ckey1]:null), (isset($crosstabs_value[$ckey1][$ckey2])?$crosstabs_value[$ckey1][$ckey2]:null)), 2, '%'));
$tabela2 .= $this->DisplayLatexCells($crossChk2, $podVrstice, $colNum2);
}
if ($this->crosstabClass->crossChk3) {
#procent skupni
- $crossChk3 = $this->encodeText($this->formatNumber($this->crosstabClass->getCrossTabPercentage($crosstabs['sumaSkupna'], $crosstabs_value[$ckey1][$ckey2]), 2, '%'));
+ $crossChk3 = LatexDocument::encodeText($this->formatNumber($this->crosstabClass->getCrossTabPercentage((isset($crosstabs['sumaSkupna'])?$crosstabs['sumaSkupna']:null), (isset($crosstabs_value[$ckey1][$ckey2])?$crosstabs_value[$ckey1][$ckey2]:null)), 2, '%'));
$tabela2 .= $this->DisplayLatexCells($crossChk3, $podVrstice, $colNum2);
}
# residuali
if ($this->crosstabClass->crossChkEC) {
- $crossChkEC = $this->encodeText($this->formatNumber($crosstabs['exC'][$ckey1][$ckey2], 3, ''));
+ $crossChkEC = LatexDocument::encodeText($this->formatNumber((isset($crosstabs['exC'][$ckey1][$ckey2])?$crosstabs['exC'][$ckey1][$ckey2]:null), 3, ''));
$tabela3 .= $this->DisplayLatexCells($crossChkEC, $podVrstice, $colNum3);
}
if ($this->crosstabClass->crossChkRE) {
- $crossChkRE = $this->encodeText($this->formatNumber($crosstabs['res'][$ckey1][$ckey2], 3, ''));
+ $crossChkRE = LatexDocument::encodeText($this->formatNumber((isset($crosstabs['res'][$ckey1][$ckey2])?$crosstabs['res'][$ckey1][$ckey2]:null), 3, ''));
$tabela3 .= $this->DisplayLatexCells($crossChkRE, $podVrstice, $colNum3);
}
if ($this->crosstabClass->crossChkSR) {
- $crossChkSR = $this->encodeText($this->formatNumber($crosstabs['stR'][$ckey1][$ckey2], 3, ''));
+ $crossChkSR = LatexDocument::encodeText($this->formatNumber((isset($crosstabs['stR'][$ckey1][$ckey2])?$crosstabs['stR'][$ckey1][$ckey2]:null), 3, ''));
$tabela3 .= $this->DisplayLatexCells($crossChkSR, $podVrstice, $colNum3);
}
if ($this->crosstabClass->crossChkAR) {
- $crossChkAR = $this->encodeText($this->formatNumber($crosstabs['adR'][$ckey1][$ckey2], 3, ''));
+ $crossChkAR = LatexDocument::encodeText($this->formatNumber((isset($crosstabs['adR'][$ckey1][$ckey2])?$crosstabs['adR'][$ckey1][$ckey2]:null), 3, ''));
$tabela3 .= $this->DisplayLatexCells($crossChkAR, $podVrstice, $colNum3);
}
//echo "tabela 3: $tabela3 </br>";
@@ -1056,7 +1076,7 @@ class AnalizaCrosstab extends LatexAnalysisElement{
$tabela1 .= $this->MultiColCellLatex($steviloVmesnihStolpcevPodvrstic, '');
}
- if(!$crosstabsOptions1All[$t]){
+ /* if(!$crosstabsOptions1All[$t]){
if($tabela1){
//$tabela1 .= ' & ';
}
@@ -1066,34 +1086,40 @@ class AnalizaCrosstab extends LatexAnalysisElement{
if($tabela3!=''){
//$tabela3 .= ' & ';
}
- }
+ } */
//se zadnji stolpec - risemo, ko je zadnja tabela
if($t == ($steviloTabel-1)){
if ($this->crosstabClass->crossChk0) {
# suma po vrsticah
- $crossChk0 = (int)$crosstabs['sumaVrstica'][$ckey2];
- if(!$crosstabsOptions1All[$t]){
+ //$crossChk0 = isset($crosstabs['sumaVrstica'][$ckey2])?(int)$crosstabs['sumaVrstica'][$ckey2]:0;
+ if(isset($crosstabs['sumaVrstica'][$ckey2])&&array_key_exists($ckey2, $crosstabs['sumaVrstica'])){
+ $crossChk0 = (int)$crosstabs['sumaVrstica'][$ckey2];
+ }else{
+ $crossChk0 = 0;
+ }
+
+ if(!isset($crosstabsOptions1All[$t])){
$tabela1 .= ' & ';
}
$tabela1 .= $this->DisplayLatexCells($crossChk0, $podVrstice, $colNum, $steviloVmesnihStolpcevPodvrstic, $niSodo);
}
if ($this->crosstabClass->crossChk1 || $this->crosstabClass->crossChk2 || $this->crosstabClass->crossChk3) {
- if(!$crosstabsOptions1All[$t]){
+ if(!isset($crosstabsOptions1All[$t])){
$tabela2 .= ' & ';
}
# suma po vrsticah v procentih
if ($this->crosstabClass->crossChk1) {
- $crossChk1 = $this->encodeText($this->formatNumber(100, 2, '%'));
+ $crossChk1 = LatexDocument::encodeText($this->formatNumber(100, 2, '%'));
$tabela2 .= $this->DisplayLatexCells($crossChk1, $podVrstice, $colNum2, $steviloVmesnihStolpcevPodvrstic, $niSodo);
}
if ($this->crosstabClass->crossChk2) {
- $crossChk2 = $this->encodeText($this->formatNumber( ($crosstabs['sumaSkupna'] > 0 ? (100 * $crosstabs['sumaVrstica'][$ckey2] / $crosstabs['sumaSkupna']) : 0), 2, '%'));
+ $crossChk2 = LatexDocument::encodeText($this->formatNumber( ($crosstabs['sumaSkupna'] > 0 ? (100 * $crossChk0 / $crosstabs['sumaSkupna']) : 0), 2, '%'));
$tabela2 .= $this->DisplayLatexCells($crossChk2, $podVrstice, $colNum2, $steviloVmesnihStolpcevPodvrstic, $niSodo);
}
if ($this->crosstabClass->crossChk3) {
- $crossChk3 = $this->encodeText($this->formatNumber( ($crosstabs['sumaSkupna'] > 0 ? (100 * $crosstabs['sumaVrstica'][$ckey2] / $crosstabs['sumaSkupna']) : 0), 2, '%'));
+ $crossChk3 = LatexDocument::encodeText($this->formatNumber( ($crosstabs['sumaSkupna'] > 0 ? (100 * $crossChk0 / $crosstabs['sumaSkupna']) : 0), 2, '%'));
$tabela2 .= $this->DisplayLatexCells($crossChk3, $podVrstice, $colNum2, $steviloVmesnihStolpcevPodvrstic, $niSodo);
}
}
@@ -1160,9 +1186,9 @@ class AnalizaCrosstab extends LatexAnalysisElement{
//izpis celice v prvem stolpcu
if($export_format != 'xls'){
- $tabela .= $this->MultiRowCellLatex($steviloVmesnihVrstic, $this->encodeText($lang['srv_analiza_crosstab_skupaj']), $tabela2, $tabela3, $cols[$t]);
+ $tabela .= $this->MultiRowCellLatex($steviloVmesnihVrstic, LatexDocument::encodeText($lang['srv_analiza_crosstab_skupaj']), $tabela2, $tabela3, $cols[$t]);
}else{
- $tabela .= $this->encodeText($lang['srv_analiza_crosstab_skupaj']);
+ $tabela .= LatexDocument::encodeText($lang['srv_analiza_crosstab_skupaj']);
}
//izpis celice v prvem stolpcu - konec
@@ -1172,26 +1198,32 @@ class AnalizaCrosstab extends LatexAnalysisElement{
$tabelaZadnja1 = ''; //belezi kodo za 1. podvrstico zadnje vrstice
$tabelaZadnja2 = ''; //belezi kodo za 2. podvrstico zadnje vrstice
//foreach ($crosstabs['options1'] as $ckey1 => $crossVariabla1) {
+ if(isset($crosstabsOptions1All[$t]))
foreach ($crosstabsOptions1All[$t] as $ckey1 => $crossVariabla1) {
# prikazujemo eno od treh možnosti
if ($this->crosstabClass->crossChk0) {
# suma po stolpcih
- $crossChk0 = (int)$crosstabs['sumaStolpec'][$ckey1];
+ //$crossChk0 = (int)$crosstabs['sumaStolpec'][$ckey1];
+ if(isset($crosstabs['sumaStolpec'][$ckey1])&&array_key_exists($ckey1, $crosstabs['sumaStolpec'])){
+ $crossChk0 = (int)$crosstabs['sumaStolpec'][$ckey1];
+ }else{
+ $crossChk0 = 0;
+ }
$tabelaZadnja1 .= $this->DisplayLatexCells($crossChk0, $podVrstice, $colNum, $steviloVmesnihStolpcevPodvrstic);
}
if ($this->crosstabClass->crossChk1 || $this->crosstabClass->crossChk2 || $this->crosstabClass->crossChk3) {
# suma po stolpcih v procentih
if ($this->crosstabClass->crossChk1) {
- $crossChk1 = $this->encodeText($this->formatNumber( ($crosstabs['sumaSkupna'] > 0 ? (100 * $crosstabs['sumaStolpec'][$ckey1] / $crosstabs['sumaSkupna']) : 0), 2, '%'));
+ $crossChk1 = LatexDocument::encodeText($this->formatNumber( ($crosstabs['sumaSkupna'] > 0 ? (100 * $crosstabs['sumaStolpec'][$ckey1] / $crosstabs['sumaSkupna']) : 0), 2, '%'));
$tabelaZadnja2 .= $this->DisplayLatexCells($crossChk1, $podVrstice, $colNum2, $steviloVmesnihStolpcevPodvrstic);
}
if ($this->crosstabClass->crossChk2) {
- $crossChk2 = $this->encodeText($this->formatNumber(100, 2, '%'));
+ $crossChk2 = LatexDocument::encodeText($this->formatNumber(100, 2, '%'));
$tabelaZadnja2 .= $this->DisplayLatexCells($crossChk2, $podVrstice, $colNum2, $steviloVmesnihStolpcevPodvrstic);
}
if ($this->crosstabClass->crossChk3){
- $crossChk3 = $this->encodeText($this->formatNumber( ($crosstabs['sumaSkupna'] > 0 ? (100 * $crosstabs['sumaStolpec'][$ckey1] / $crosstabs['sumaSkupna']) : 0), 2, '%'));
+ $crossChk3 = LatexDocument::encodeText($this->formatNumber( ($crosstabs['sumaSkupna'] > 0 ? (100 * $crosstabs['sumaStolpec'][$ckey1] / $crosstabs['sumaSkupna']) : 0), 2, '%'));
$tabelaZadnja2 .= $this->DisplayLatexCells($crossChk3, $podVrstice, $colNum2, $steviloVmesnihStolpcevPodvrstic);
}
}
@@ -1212,19 +1244,19 @@ class AnalizaCrosstab extends LatexAnalysisElement{
}
if ($this->crosstabClass->crossChk1 || $this->crosstabClass->crossChk2 || $this->crosstabClass->crossChk3) {
# suma po stolpcih v procentih
- if (!$crosstabsOptions1All[$t]){
+ if (!isset($crosstabsOptions1All[$t])){
$tabelaZadnja2 .= " & ";
}
if ($this->crosstabClass->crossChk1) {
- $crossChk1 = $this->encodeText($this->formatNumber(100, 2, '%'));
+ $crossChk1 = LatexDocument::encodeText($this->formatNumber(100, 2, '%'));
$tabelaZadnja2 .= $this->DisplayLatexCells($crossChk1, $podVrstice, $colNum2, $steviloVmesnihStolpcevPodvrstic);
}
if ($this->crosstabClass->crossChk2) {
- $crossChk2 = $this->encodeText($this->formatNumber(100, 2, '%'));
+ $crossChk2 = LatexDocument::encodeText($this->formatNumber(100, 2, '%'));
$tabelaZadnja2 .= $this->DisplayLatexCells($crossChk2, $podVrstice, $colNum2, $steviloVmesnihStolpcevPodvrstic);
}
if ($this->crosstabClass->crossChk3) {
- $crossChk3 = $this->encodeText($this->formatNumber(100, 2, '%'));
+ $crossChk3 = LatexDocument::encodeText($this->formatNumber(100, 2, '%'));
$tabelaZadnja2 .= $this->DisplayLatexCells($crossChk3, $podVrstice, $colNum2, $steviloVmesnihStolpcevPodvrstic);
}
}
@@ -1264,7 +1296,7 @@ class AnalizaCrosstab extends LatexAnalysisElement{
// skupni sestevki po stolpcih - ZADNJA VRSTICA - konec #############################################################################
$stevec++;
- $tabela .= ($export_format == 'pdf' ? "\\end{tabularx}" : "\\end{tabular}");
+ $tabela .= ($export_format == 'pdf' ? "\\end{xltabular}" : "\\end{tabular}");
}
}
}
@@ -1272,13 +1304,12 @@ class AnalizaCrosstab extends LatexAnalysisElement{
/*zakljucek latex tabele*/
if($presirokaTabela == 0){ //ce ni presiroka tabela
- $tabela .= ($export_format == 'pdf' ? "\\end{tabularx}" : "\\end{tabular}");
+ $tabela .= ($export_format == 'pdf' ? "\\end{xltabular}" : "\\end{tabular}");
}
/*zaljucek latex tabele - konec */
- //echo "showChart: ".$this->sessionData['showChart']."</br>";
// Izris grafa (ce je vklopljena nastavitev)
- if($this->sessionData['showChart'] == '1' && $creport == false){
+ if((isset($this->sessionData['showChart'])?$this->sessionData['showChart']:0) == '1' && $creport == false){
$tabela .= $this->displayCrosstabChart();
}
}
@@ -1294,18 +1325,18 @@ class AnalizaCrosstab extends LatexAnalysisElement{
$chartID = implode('_', $this->crosstabClass->variabla1[0]).'_'.implode('_', $this->crosstabClass->variabla2[0]);
$chartID .= '_counter_'.$this->counter;
- $settings = $this->sessionData[$chartID];
- $imgName = $settings['name'];
+ $settings = isset($this->sessionData[$chartID])?$this->sessionData[$chartID]:array();
+ $imgName = isset($settings['name']) ? $settings['name'] : $chartID;
// Naslov posameznega grafa
- if($settings['type'] == 1 || $settings['type'] == 4){
+ /* if($settings['type'] == 1 || $settings['type'] == 4){
$title = $this->crosstabVars[0].'/'.$this->crosstabVars[1];
}
else{
$title = $this->crosstabVars[0];
- }
+ } */
- $boldedTitle = $this->returnBold($this->encodeText($title)).$this->texNewLine; //vrni boldan naslov in skoci v novo vrstico
+ $boldedTitle = $this->returnBold(LatexDocument::encodeText(/* $title */)).$this->texNewLine; //vrni boldan naslov in skoci v novo vrstico
copy('pChart/Cache/'.$imgName,'pChart/Cache/'.$imgName.'.png');
$texImageOnly = " \\includegraphics[scale=0.75]{".$imgName."} "; //latex za sliko
diff --git a/admin/survey/export/latexclasses/Analize/AnalizaDesc.php b/admin/survey/export/latexclasses/Analize/AnalizaDesc.php
index 8433e9b..b7c427b 100644
--- a/admin/survey/export/latexclasses/Analize/AnalizaDesc.php
+++ b/admin/survey/export/latexclasses/Analize/AnalizaDesc.php
@@ -8,14 +8,14 @@
include_once('../exportclases/class.pdfIzvozAnalizaFunctions.php');
require_once('../exportclases/class.enka.pdf.php'); */
- define("ALLOW_HIDE_ZERRO_REGULAR", false); // omogočimo delovanje prikazovanja/skrivanja ničelnih vnosti za navadne odgovore
- define("ALLOW_HIDE_ZERRO_MISSING", true); // omogočimo delovanje prikazovanja/skrivanja ničelnih vnosti za missinge
+ if (!defined('ALLOW_HIDE_ZERRO_REGULAR')) define("ALLOW_HIDE_ZERRO_REGULAR", false); // omogočimo delovanje prikazovanja/skrivanja ničelnih vnosti za navadne odgovore
+ if (!defined('ALLOW_HIDE_ZERRO_MISSING')) define("ALLOW_HIDE_ZERRO_MISSING", true); // omogočimo delovanje prikazovanja/skrivanja ničelnih vnosti za missinge
- define("NUM_DIGIT_AVERAGE", 2); // stevilo digitalnih mest za povprecje
- define("NUM_DIGIT_DEVIATION", 2); // stevilo digitalnih mest za povprecje
+ if (!defined('NUM_DIGIT_AVERAGE')) define("NUM_DIGIT_AVERAGE", 2); // stevilo digitalnih mest za povprecje
+ if (!defined('NUM_DIGIT_DEVIATION')) define("NUM_DIGIT_DEVIATION", 2); // stevilo digitalnih mest za povprecje
- define("M_ANALIZA_DESCRIPTOR", "descriptor");
- define("M_ANALIZA_FREQUENCY", "frequency");
+ if (!defined('M_ANALIZA_DESCRIPTOR')) define("M_ANALIZA_DESCRIPTOR", "descriptor");
+ if (!defined('M_ANALIZA_FREQUENCY')) define("M_ANALIZA_FREQUENCY", "frequency");
define("FNT_FREESERIF", "freeserif");
define("FNT_FREESANS", "freesans");
@@ -163,7 +163,7 @@ class AnalizaDesc extends LatexAnalysisElement{
$this->pdf->SetSubject('An Order');
// set default header data
- $this->pdf->SetHeaderData(null, null, "www.1ka.si", $this->encodeText(SurveyInfo::getInstance()->getSurveyAkronim()));
+ $this->pdf->SetHeaderData(null, null, "www.1ka.si", LatexDocument::encodeText(SurveyInfo::getInstance()->getSurveyAkronim()));
//set auto page breaks
$this->pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
@@ -211,7 +211,7 @@ class AnalizaDesc extends LatexAnalysisElement{
//Priprava parametrov za tabelo - konec
//zacetek latex tabele z obrobo za prvo tabelo
- $pdfTable = 'tabularx';
+ $pdfTable = 'xltabular';
$rtfTable = 'tabular';
$pdfTableWidth = 1;
$rtfTableWidth = 1;
@@ -226,16 +226,16 @@ class AnalizaDesc extends LatexAnalysisElement{
/*priprava polja z naslovi stolpcev*/
$text = array();
- $text[] = '\textbf{'.$this->encodeText($lang['srv_analiza_opisne_variable']).'}';
- $text[] = '\textbf{'.$this->encodeText($lang['srv_analiza_opisne_variable_text1']).'}';
+ $text[] = '\textbf{'.LatexDocument::encodeText($lang['srv_analiza_opisne_variable']).'}';
+ $text[] = '\textbf{'.LatexDocument::encodeText($lang['srv_analiza_opisne_variable_text1']).'}';
- $text[] = '\textbf{'.$this->encodeText($lang['srv_analiza_opisne_m']).'}';
- $text[] = '\textbf{'.$this->encodeText($lang['srv_analiza_num_units']).'}';
- //$text[] = '\textbf{'.$this->encodeText($lang['srv_analiza_opisne_povprecje1']).'}';
- $text[] = '\textbf{'.$this->encodeText($lang['srv_analiza_opisne_povprecje_odstotek1']).'}';
- $text[] = '\textbf{'.$this->encodeText($lang['srv_analiza_opisne_odklon']).'}';
- $text[] = '\textbf{'.$this->encodeText($lang['srv_analiza_opisne_min']).'}';
- $text[] = '\textbf{'.$this->encodeText($lang['srv_analiza_opisne_max']).'}';
+ $text[] = '\textbf{'.LatexDocument::encodeText($lang['srv_analiza_opisne_m']).'}';
+ $text[] = '\textbf{'.LatexDocument::encodeText($lang['srv_analiza_num_units']).'}';
+ //$text[] = '\textbf{'.LatexDocument::encodeText($lang['srv_analiza_opisne_povprecje1']).'}';
+ $text[] = '\textbf{'.LatexDocument::encodeText($lang['srv_analiza_opisne_povprecje_odstotek1']).'}';
+ $text[] = '\textbf{'.LatexDocument::encodeText($lang['srv_analiza_opisne_odklon']).'}';
+ $text[] = '\textbf{'.LatexDocument::encodeText($lang['srv_analiza_opisne_min']).'}';
+ $text[] = '\textbf{'.LatexDocument::encodeText($lang['srv_analiza_opisne_max']).'}';
/*priprava polja z naslovi stolpcev - konec*/
$tabela .= $this->tableRow($text);
@@ -249,14 +249,14 @@ class AnalizaDesc extends LatexAnalysisElement{
/*izpis ostalih vrstic*/
foreach (SurveyAnalysis::$_HEADERS AS $spid => $spremenljivka) {
/* preverjamo ali je meta*/
- if ($spremenljivka['tip'] != 'm'
+ if (isset($spremenljivka['tip'])?$spremenljivka['tip']:'' != 'm'
&& ( count(SurveyAnalysis::$_FILTRED_VARIABLES) == 0 || (count(SurveyAnalysis::$_FILTRED_VARIABLES) > 0 && isset(SurveyAnalysis::$_FILTRED_VARIABLES[$spid]) ))
&& in_array($spremenljivka['tip'], SurveyAnalysis::$_FILTRED_TYPES)
&& ($this->spremenljivka == $spid || $this->spremenljivka == null) ) {
$show_enota = false;
/* preverimo ali imamo samo eno variablo in če iammo enoto*/
- if ((int)$spremenljivka['enota'] != 0 || $spremenljivka['cnt_all'] > 1 ) {
+ if ((int)(isset($spremenljivka['enota'])?$spremenljivka['enota']:0) != 0 || isset($spremenljivka['cnt_all'])?$spremenljivka['cnt_all']:0 > 1 ) {
$show_enota = true;
}
@@ -292,12 +292,11 @@ class AnalizaDesc extends LatexAnalysisElement{
if (count ($grid['variables']) > 0)
foreach ($grid['variables'] AS $vid => $variable ){
/* dodamo ostale vrstice*/
- $do_show = ($variable['other'] !=1 && ($spremenljivka['tip'] == 1 || $spremenljivka['tip'] == 3 || $spremenljivka['tip'] == 5 || $spremenljivka['tip'] == 8 ))
+ $do_show = (isset($variable['other'])?$variable['other']:0 !=1 && ($spremenljivka['tip'] == 1 || $spremenljivka['tip'] == 3 || $spremenljivka['tip'] == 5 || $spremenljivka['tip'] == 8 ))
? false
: true;
if ($do_show) {
- //self::displayDescriptivesVariablaRow($spremenljivka,$grid,$variable,$_css);
- $tabela .= $this->displayDescriptivesVariablaRow($spremenljivka,$grid,$variable,$_css);
+ $tabela .= $this->displayDescriptivesVariablaRow($spremenljivka,$grid,$variable,isset($_css)?$_css:null);
}
$grid['new_grid'] = false;
@@ -310,9 +309,8 @@ class AnalizaDesc extends LatexAnalysisElement{
/*zakljucek latex tabele*/
- $tabela .= ($export_format == 'pdf' ? "\\end{tabularx}" : "\\end{tabular}");
+ $tabela .= ($export_format == 'pdf' ? "\\end{xltabular}" : "\\end{tabular}");
/*zaljucek latex tabele - konec */
- //echo "</br> Tex celotne tabele: ".$tabela."</br>";
return $tabela;
}
}
diff --git a/admin/survey/export/latexclasses/Analize/AnalizaFreq.php b/admin/survey/export/latexclasses/Analize/AnalizaFreq.php
index 8945266..8926858 100644
--- a/admin/survey/export/latexclasses/Analize/AnalizaFreq.php
+++ b/admin/survey/export/latexclasses/Analize/AnalizaFreq.php
@@ -8,39 +8,39 @@
include_once('../exportclases/class.pdfIzvozAnalizaFunctions.php');
require_once('../exportclases/class.enka.pdf.php'); */
- define("ALLOW_HIDE_ZERRO_REGULAR", false); // omogočimo delovanje prikazovanja/skrivanja ničelnih vnosti za navadne odgovore
- define("ALLOW_HIDE_ZERRO_MISSING", true); // omogočimo delovanje prikazovanja/skrivanja ničelnih vnosti za missinge
+ if(!defined("ALLOW_HIDE_ZERRO_REGULAR"))define("ALLOW_HIDE_ZERRO_REGULAR", false); // omogočimo delovanje prikazovanja/skrivanja ničelnih vnosti za navadne odgovore
+ if(!defined("ALLOW_HIDE_ZERRO_MISSING"))define("ALLOW_HIDE_ZERRO_MISSING", true); // omogočimo delovanje prikazovanja/skrivanja ničelnih vnosti za missinge
- define("NUM_DIGIT_AVERAGE", 2); // stevilo digitalnih mest za povprecje
- define("NUM_DIGIT_DEVIATION", 2); // stevilo digitalnih mest za povprecje
+ if(!defined("NUM_DIGIT_AVERAGE"))define("NUM_DIGIT_AVERAGE", 2); // stevilo digitalnih mest za povprecje
+ if(!defined("NUM_DIGIT_DEVIATION"))define("NUM_DIGIT_DEVIATION", 2); // stevilo digitalnih mest za povprecje
- define("M_ANALIZA_DESCRIPTOR", "descriptor");
- define("M_ANALIZA_FREQUENCY", "frequency");
+ if(!defined("M_ANALIZA_DESCRIPTOR"))define("M_ANALIZA_DESCRIPTOR", "descriptor");
+ if(!defined("M_ANALIZA_FREQUENCY"))define("M_ANALIZA_FREQUENCY", "frequency");
- define("FNT_FREESERIF", "freeserif");
- define("FNT_FREESANS", "freesans");
- define("FNT_HELVETICA", "helvetica");
+ if(!defined("FNT_FREESERIF"))define("FNT_FREESERIF", "freeserif");
+ if(!defined("FNT_FREESANS"))define("FNT_FREESANS", "freesans");
+ if(!defined("FNT_HELVETICA"))define("FNT_HELVETICA", "helvetica");
- define("FNT_MAIN_TEXT", FNT_FREESANS);
- define("FNT_QUESTION_TEXT", FNT_FREESANS);
- define("FNT_HEADER_TEXT", FNT_FREESANS);
+ if(!defined("FNT_MAIN_TEXT"))define("FNT_MAIN_TEXT", FNT_FREESANS);
+ if(!defined("FNT_QUESTION_TEXT"))define("FNT_QUESTION_TEXT", FNT_FREESANS);
+ if(!defined("FNT_HEADER_TEXT"))define("FNT_HEADER_TEXT", FNT_FREESANS);
- define("FNT_MAIN_SIZE", 10);
- define("FNT_QUESTION_SIZE", 9);
- define("FNT_HEADER_SIZE", 10);
+ if(!defined("FNT_MAIN_SIZE"))define("FNT_MAIN_SIZE", 10);
+ if(!defined("FNT_QUESTION_SIZE"))define("FNT_QUESTION_SIZE", 9);
+ if(!defined("FNT_HEADER_SIZE"))define("FNT_HEADER_SIZE", 10);
- define("RADIO_BTN_SIZE", 3);
- define("CHCK_BTN_SIZE", 3);
- define("LINE_BREAK", 6);
+ if(!defined("RADIO_BTN_SIZE"))define("RADIO_BTN_SIZE", 3);
+ if(!defined("CHCK_BTN_SIZE"))define("CHCK_BTN_SIZE", 3);
+ if(!defined("LINE_BREAK"))define("LINE_BREAK", 6);
- define ('PDF_MARGIN_HEADER', 8);
- define ('PDF_MARGIN_FOOTER', 12);
- define ('PDF_MARGIN_TOP', 18);
- define ('PDF_MARGIN_BOTTOM', 18);
- define ('PDF_MARGIN_LEFT', 15);
- define ('PDF_MARGIN_RIGHT', 15);
+ if(!defined("PDF_MARGIN_HEADER"))define ('PDF_MARGIN_HEADER', 8);
+ if(!defined("PDF_MARGIN_FOOTER"))define ('PDF_MARGIN_FOOTER', 12);
+ if(!defined("PDF_MARGIN_TOP"))define ('PDF_MARGIN_TOP', 18);
+ if(!defined("PDF_MARGIN_BOTTOM"))define ('PDF_MARGIN_BOTTOM', 18);
+ if(!defined("PDF_MARGIN_LEFT"))define ('PDF_MARGIN_LEFT', 15);
+ if(!defined("PDF_MARGIN_RIGHT"))define ('PDF_MARGIN_RIGHT', 15);
- define ('MEJA_DOLZINA_VPRASANJA', 132);
+ if(!defined("MEJA_DOLZINA_VPRASANJA"))define ('MEJA_DOLZINA_VPRASANJA', 132);
/**
* @desc Class za generacijo izvoza v Latex
@@ -69,7 +69,6 @@ class AnalizaFreq extends LatexAnalysisElement{
protected $texBigSkip = '\bigskip';
protected $spaceBetweenTables = ' \newline \vspace*{1 cm} \newline';
-
/**
* @desc konstruktor
*/
@@ -169,7 +168,9 @@ class AnalizaFreq extends LatexAnalysisElement{
case 5:
# nagovor
//pdfIzvozAnalizaSums::sumNagovor($spid,'freq');
- $tabela .= $this->sumNagovor($spid,'freq');
+ //$tabela .= $this->sumNagovor($spid,'freq');
+ $analizaSums = new AnalizaSums;
+ $tabela .= $analizaSums->sumNagovor($spid,'freq');
//$tabela .= $this->spaceBetweenTables;
break;
}
@@ -212,7 +213,7 @@ class AnalizaFreq extends LatexAnalysisElement{
//Priprava parametrov za tabelo - konec
//zacetek latex tabele z obrobo za prvo tabelo
- $pdfTable = 'tabularx';
+ $pdfTable = 'xltabular';
$rtfTable = 'tabular';
$pdfTableWidth = 1;
$rtfTableWidth = 1;
@@ -228,14 +229,14 @@ class AnalizaFreq extends LatexAnalysisElement{
/*Naslovni vrstici tabele*/
//prva vrstica tabele
- //$tex .= $this->encodeText($spremenljivka['variable'])." & \multicolumn{".$steviloOstalihStolpcev."}{X|}{".$this->encodeText($spremenljivka['naslov'])."} ".$this->texNewLine;
- //$tex .= $this->encodeText($spremenljivka['variable'])." & \multicolumn{".$steviloOstalihStolpcev."}{l|}{".$this->encodeText($spremenljivka['naslov'])."} ".$this->texNewLine;
- //$tex .= $this->encodeText($spremenljivka['variable']).' & \multicolumn{'.$steviloOstalihStolpcev.'}{>{\hsize=\dimexpr '.($steviloOstalihStolpcev+1).'\hsize + '.($steviloOstalihStolpcev+1).'\tabcolsep + \arrayrulewidth}X|}{'.$this->encodeText($spremenljivka['naslov']).'} '.$this->texNewLine;
- $dolzinaVprasanja = strlen($this->encodeText($spremenljivka['naslov']));
- if($dolzinaVprasanja > MEJA_DOLZINA_VPRASANJA){ //ce je dolzina vprasanja daljsa od ene vrstice v tabeli
- $tex .= $this->encodeText($spremenljivka['variable'])." & \multicolumn{".$steviloOstalihStolpcev."}{X|}{".$this->encodeText($spremenljivka['naslov'])."} ".$this->texNewLine;
+ //$tex .= LatexDocument::encodeText($spremenljivka['variable'])." & \multicolumn{".$steviloOstalihStolpcev."}{X|}{".LatexDocument::encodeText($spremenljivka['naslov'])."} ".$this->texNewLine;
+ //$tex .= LatexDocument::encodeText($spremenljivka['variable'])." & \multicolumn{".$steviloOstalihStolpcev."}{l|}{".LatexDocument::encodeText($spremenljivka['naslov'])."} ".$this->texNewLine;
+ //$tex .= LatexDocument::encodeText($spremenljivka['variable']).' & \multicolumn{'.$steviloOstalihStolpcev.'}{>{\hsize=\dimexpr '.($steviloOstalihStolpcev+1).'\hsize + '.($steviloOstalihStolpcev+1).'\tabcolsep + \arrayrulewidth}X|}{'.LatexDocument::encodeText($spremenljivka['naslov']).'} '.$this->texNewLine;
+ $dolzinaVprasanja = strlen(LatexDocument::encodeText($spremenljivka['naslov']));
+ if($dolzinaVprasanja > MEJA_DOLZINA_VPRASANJA){ //ce je dolzina vprasanja daljsa od ene vrstice v tabeli
+ $tex .= LatexDocument::encodeText($spremenljivka['variable'])." & \multicolumn{".$steviloOstalihStolpcev."}{X|}{".LatexDocument::encodeText($spremenljivka['naslov'])."} ".$this->texNewLine;
}else{
- $tex .= $this->encodeText($spremenljivka['variable'])." & \multicolumn{".$steviloOstalihStolpcev."}{l|}{".$this->encodeText($spremenljivka['naslov'])."} ".$this->texNewLine;
+ $tex .= LatexDocument::encodeText($spremenljivka['variable'])." & \multicolumn{".$steviloOstalihStolpcev."}{l|}{".LatexDocument::encodeText($spremenljivka['naslov'])."} ".$this->texNewLine;
}
@@ -273,9 +274,9 @@ class AnalizaFreq extends LatexAnalysisElement{
$maxAnswer = (SurveyDataSettingProfiles :: getSetting('numOpenAnswers') > 0) ? SurveyDataSettingProfiles :: getSetting('numOpenAnswers') : 30;
$counter = 0;
$_kumulativa = 0;
- //SurveyAnalysis::$_FREQUENCYS[$_sequence]
- if (count(SurveyAnalysis::$_FREQUENCYS[$_sequence]['valid'])> 0 ) {
- foreach (SurveyAnalysis::$_FREQUENCYS[$_sequence]['valid'] AS $vkey => $vAnswer) {
+ $surveyAnalisysFreqValid = isset(SurveyAnalysis::$_FREQUENCYS[$_sequence]['valid'])?SurveyAnalysis::$_FREQUENCYS[$_sequence]['valid']:0;
+ if (is_countable($surveyAnalisysFreqValid) && count($surveyAnalisysFreqValid)> 0 ) {
+ foreach ($surveyAnalisysFreqValid AS $vkey => $vAnswer) {
if ($vAnswer['cnt'] > 0 /*&& $counter < $maxAnswer*/ || true) { # izpisujemo samo tiste ki nisno 0
if (in_array($spremenljivka['tip'],array(4,7,8,19,20,21))) { // text, number, datum, mtext, mnumber, text*
$options['isTextAnswer'] = true;
@@ -297,7 +298,7 @@ class AnalizaFreq extends LatexAnalysisElement{
if (count(SurveyAnalysis::$_FREQUENCYS[$_sequence]['invalid'])> 0 ) {
$_Z_MV = !$this->hideEmpty;
if($_Z_MV){ //ce je potrebno izpisati tudi manjkajoce
- $tex .= $this->encodeText($lang['srv_anl_missing1']);
+ $tex .= LatexDocument::encodeText($lang['srv_anl_missing1']);
}
foreach (SurveyAnalysis::$_FREQUENCYS[$_sequence]['invalid'] AS $ikey => $iAnswer) {
if ($iAnswer['cnt'] > 0 ) { # izpisujemo samo tiste ki nisno 0
@@ -319,7 +320,7 @@ class AnalizaFreq extends LatexAnalysisElement{
}
//zaljucek latex tabele z obrobo za prvo tabelo
- $tex .= ($export_format == 'pdf' ? "\\end{tabularx}" : "\\end{tabular}");
+ $tex .= ($export_format == 'pdf' ? "\\end{xltabular}" : "\\end{tabular}");
//zaljucek latex tabele z obrobo za prvo tabelo - konec
# izpišemo še tekstovne odgovore za polja drugo
@@ -347,9 +348,9 @@ class AnalizaFreq extends LatexAnalysisElement{
$options[$_oKey] = $_option;
}
- $text[] = $this->encodeText($variable['variable']);
+ $text[] = LatexDocument::encodeText($variable['variable']);
- $text[] = $this->encodeText($variable['naslov']);
+ $text[] = LatexDocument::encodeText($variable['naslov']);
$text[] = '';
$text[] = '';
diff --git a/admin/survey/export/latexclasses/Analize/AnalizaMean.php b/admin/survey/export/latexclasses/Analize/AnalizaMean.php
index e2bceba..138afcc 100644
--- a/admin/survey/export/latexclasses/Analize/AnalizaMean.php
+++ b/admin/survey/export/latexclasses/Analize/AnalizaMean.php
@@ -7,14 +7,14 @@
/* include_once('../exportclases/class.pdfIzvozAnalizaFunctions.php');
require_once('../exportclases/class.enka.pdf.php'); */
- define("ALLOW_HIDE_ZERRO_REGULAR", false); // omogočimo delovanje prikazovanja/skrivanja ničelnih vnosti za navadne odgovore
- define("ALLOW_HIDE_ZERRO_MISSING", true); // omogočimo delovanje prikazovanja/skrivanja ničelnih vnosti za missinge
+ if (!defined('ALLOW_HIDE_ZERRO_REGULAR')) define("ALLOW_HIDE_ZERRO_REGULAR", false); // omogočimo delovanje prikazovanja/skrivanja ničelnih vnosti za navadne odgovore
+ if (!defined('ALLOW_HIDE_ZERRO_MISSING')) define("ALLOW_HIDE_ZERRO_MISSING", true); // omogočimo delovanje prikazovanja/skrivanja ničelnih vnosti za missinge
- define("NUM_DIGIT_AVERAGE", 2); // stevilo digitalnih mest za povprecje
- define("NUM_DIGIT_DEVIATION", 2); // stevilo digitalnih mest za povprecje
+ if (!defined('NUM_DIGIT_AVERAGE')) define("NUM_DIGIT_AVERAGE", 2); // stevilo digitalnih mest za povprecje
+ if (!defined('NUM_DIGIT_DEVIATION')) define("NUM_DIGIT_DEVIATION", 2); // stevilo digitalnih mest za povprecje
- define("M_ANALIZA_DESCRIPTOR", "descriptor");
- define("M_ANALIZA_FREQUENCY", "frequency");
+ if (!defined('M_ANALIZA_DESCRIPTOR')) define("M_ANALIZA_DESCRIPTOR", "descriptor");
+ if (!defined('M_ANALIZA_FREQUENCY')) define("M_ANALIZA_FREQUENCY", "frequency");
define("FNT_FREESERIF", "freeserif");
define("FNT_FREESANS", "freesans");
@@ -125,11 +125,6 @@ class AnalizaMean extends LatexAnalysisElement{
$singleWidth = round( 180 / $cols / 2 );
// visina prve vrstice
-/* $firstHeight = 0;
- for ($i = 0; $i < $cols; $i++) {
- $label1 = $this->meansClass->getSpremenljivkaTitle($_means[$i]['v1']);
- $firstHeight = ($firstHeight > $this->getCellHeight($this->encodeText($label1), $singleWidth*2)) ? $firstHeight : $this->getCellHeight($this->encodeText($label1), $singleWidth*2);
- } */
//Priprava parametrov za tabelo
$steviloStolpcevParameterTabular = 3;
@@ -152,7 +147,7 @@ class AnalizaMean extends LatexAnalysisElement{
//Priprava parametrov za tabelo - konec
//zacetek latex tabele z obrobo za prvo tabelo
- $pdfTable = 'tabularx';
+ $pdfTable = 'xltabular';
$rtfTable = 'tabular';
$pdfTableWidth = 1;
$rtfTableWidth = 1;
@@ -167,11 +162,10 @@ class AnalizaMean extends LatexAnalysisElement{
//prva vrstica tabele
$label2 = $this->meansClass->getSpremenljivkaTitle($_means[0]['v2']);
- //$this->pdf->MultiCell(80, $firstHeight, $this->encodeText($label2), 'TLR', 'C', 0, 0, 0 ,0, true);
$prva = '';
for ($i = 0; $i < $cols; $i++) {
$label1 = $this->meansClass->getSpremenljivkaTitle($_means[$i]['v1']);
- //$this->pdf->MultiCell($singleWidth*2, $firstHeight, $this->encodeText($label1), 1, 'C', 0, 0, 0 ,0, true);
+ //$this->pdf->MultiCell($singleWidth*2, $firstHeight, LatexDocument::encodeText($label1), 1, 'C', 0, 0, 0 ,0, true);
$prva .= $label1.' ';
}
@@ -188,28 +182,18 @@ class AnalizaMean extends LatexAnalysisElement{
$steviloArrayrulewidth = ($steviloPodStolpcev1-1);
if($export_format=='pdf'){
- $tabela .= $this->encodeText($label2)." & \multicolumn{".$steviloPodStolpcev1."}{>{\hsize=\dimexpr".$steviloPodStolpcev1."\hsize+".$steviloTabColSep."\\tabcolsep+".$steviloArrayrulewidth."\arrayrulewidth\\relax}".$poravnava."|}{".$this->encodeText($prva)."} ".$this->texNewLine;
+ $tabela .= LatexDocument::encodeText($label2)." & \multicolumn{".$steviloPodStolpcev1."}{>{\hsize=\dimexpr".$steviloPodStolpcev1."\hsize+".$steviloTabColSep."\\tabcolsep+".$steviloArrayrulewidth."\arrayrulewidth\\relax}".$poravnava."|}{".LatexDocument::encodeText($prva)."} ".$this->texNewLine;
}elseif($export_format=='rtf'){
- $tabela .= $this->encodeText($label2)." & \multicolumn{".$steviloPodStolpcev1."}{".$poravnava."|}{".$this->encodeText($prva)."} ".$this->texNewLine;
+ $tabela .= LatexDocument::encodeText($label2)." & \multicolumn{".$steviloPodStolpcev1."}{".$poravnava."|}{".LatexDocument::encodeText($prva)."} ".$this->texNewLine;
}
############
-
- //$tabela .= $this->encodeText($label2)." & \multicolumn{".$steviloPodStolpcev1."}{>{\hsize=\dimexpr".$steviloPodStolpcev1."\hsize+".$steviloPodStolpcev1."\\tabcolsep+\arrayrulewidth\\relax}".$poravnava."|}{".$this->encodeText($prva)."} ".$this->texNewLine;
- //$tabela .= $this->encodeText($label2)." & \multicolumn{".$steviloPodStolpcev1."}{X|}{".$this->encodeText($prva)."} ".$this->texNewLine;
- //$tabela .= $this->encodeText($label2)." & \multicolumn{".$steviloPodStolpcev1."}{".$poravnava."|}{".$this->encodeText($prva)."} ".$this->texNewLine;
- //$tabela .= $this->encodeText($label2)." & \multicolumn{".$steviloPodStolpcev1."}{C|}{".$this->encodeText($prva)."} ".$this->texNewLine;
- //$tabela .= $this->encodeText($label2).' & \multicolumn{'.$steviloPodStolpcev1.'}{>{\hsize=\dimexpr '.($steviloPodStolpcev1).'\hsize + '.($steviloPodStolpcev1).'\tabcolsep + \arrayrulewidth}X|}{'.$this->encodeText($prva).'} '.$this->texNewLine;
-
+
//prva vrstica tabele - konec
//druga vrstica tabele
- //$this->pdf->MultiCell(80, 7, $this->encodeText(''), 'BLR', 'C', 0, 0, 0 ,0, true);
- //echo "stolpci: ".$cols."</br>";
- //echo "vrstice: ".$rows."</br>";
$druga = array();
$steviloPodStolpcev = $steviloPodStolpcev1 + 1;
- //$tabela .= "\\cline{2-".$steviloPodStolpcev."} & "; //horizontalna vrstica od 2 do zadnje celice
if($export_format != 'xls'){
$tabela .= "\\cline{2-".$steviloPodStolpcev."} "; //horizontalna vrstica od 2 do zadnje celice
}
@@ -219,12 +203,9 @@ class AnalizaMean extends LatexAnalysisElement{
$brezHline = $this->getBrezHline($export_format);
for ($i = 0; $i < $cols; $i++) {
- $druga[] = $this->encodeText($lang['srv_means_label']);
- $druga[] = $this->encodeText($lang['srv_means_label4']);
- //$this->pdf->MultiCell($singleWidth, 7, $this->encodeText($lang['srv_means_label']), 1, 'C', 0, 0, 0 ,0, true);
- //$this->pdf->MultiCell($singleWidth, 7, $this->encodeText($lang['srv_means_label4']), 1, 'C', 0, 0, 0 ,0, true);
+ $druga[] = LatexDocument::encodeText($lang['srv_means_label']);
+ $druga[] = LatexDocument::encodeText($lang['srv_means_label4']);
}
- //$this->pdf->MultiCell(1, 7, $this->encodeText(''), 0, 'C', 0, 1, 0 ,0, true);
$tabela .= $this->tableRow($druga, $brezHline)." ";
//druga vrstica tabele - konec
@@ -236,24 +217,19 @@ class AnalizaMean extends LatexAnalysisElement{
$variabla = $crossVariabla2['naslov'];
# če ni tekstovni odgovor dodamo key
if ($crossVariabla2['type'] !== 't' ) {
- if ($crossVariabla2['vr_id'] == null) {
+ if ((isset($crossVariabla2['vr_id'])?$crossVariabla2['vr_id']:null) == null) {
$variabla .= ' ( '.$ckey2.' )';
} else {
$variabla .= ' ( '.$crossVariabla2['vr_id'].' )';
}
}
- //$this->pdf->MultiCell(80, 7, $this->encodeText($variabla), 1, 'C', 0, 0, 0 ,0, true);
- $dataVrstica[] = $this->encodeText($variabla);
+ $dataVrstica[] = LatexDocument::encodeText($variabla);
# celice z vsebino
- for ($i = 0; $i < $cols; $i++) {
- //$dataVrstica[] = $this->encodeText($this->meansClass->formatNumber($_means[$i]['result'][$ckey2], SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_RESIDUAL')));
- $dataVrstica[] = $this->encodeText(self::formatNumber($_means[$i]['result'][$ckey2], SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_RESIDUAL')));
- $dataVrstica[] = $this->encodeText((int)$_means[$i]['sumaVrstica'][$ckey2]);
- //$this->pdf->MultiCell($singleWidth, 7, $this->encodeText($this->meansClass->formatNumber($_means[$i]['result'][$ckey2], SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_RESIDUAL'))), 1, 'C', 0, 0, 0 ,0, true);
- //$this->pdf->MultiCell($singleWidth, 7, $this->encodeText((int)$_means[$i]['sumaVrstica'][$ckey2]), 1, 'C', 0, 0, 0 ,0, true);
+ for ($i = 0; $i < $cols; $i++) {
+ $dataVrstica[] = LatexDocument::encodeText(self::formatNumber(isset($_means[$i]['result'][$ckey2])?$_means[$i]['result'][$ckey2]:0, SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_RESIDUAL')));
+ $dataVrstica[] = LatexDocument::encodeText((int)isset($_means[$i]['sumaVrstica'][$ckey2])?$_means[$i]['sumaVrstica'][$ckey2]:0);
}
- //$this->pdf->MultiCell(1, 7, $this->encodeText(''), 0, 'C', 0, 1, 0 ,0, true);
$tabela .= $this->tableRow($dataVrstica, $brezHline)." ";
}
}
@@ -261,21 +237,19 @@ class AnalizaMean extends LatexAnalysisElement{
//SKUPAJ
$skupajVrstica = array();
- //$this->pdf->MultiCell(80, 7, $this->encodeText($lang['srv_means_label3']), 1, 'C', 0, 0, 0 ,0, true);
- $skupajVrstica[] = $this->encodeText($lang['srv_means_label3']);
+ $skupajVrstica[] = LatexDocument::encodeText($lang['srv_means_label3']);
for ($i = 0; $i < $cols; $i++) {
- //$skupajVrstica[] = $this->encodeText($this->meansClass->formatNumber($_means[$i]['sumaMeans'], SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_RESIDUAL')));
- $skupajVrstica[] = $this->encodeText(self::formatNumber($_means[$i]['sumaMeans'], SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_RESIDUAL')));
- //$this->pdf->MultiCell($singleWidth, 7, $this->encodeText($this->meansClass->formatNumber($_means[$i]['sumaMeans'], SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_RESIDUAL'))), 1, 'C', 0, 0, 0 ,0, true);
- $skupajVrstica[] = $this->encodeText((int)$_means[$i]['sumaSkupna']);
- //$this->pdf->MultiCell($singleWidth, 7, $this->encodeText((int)$_means[$i]['sumaSkupna']), 1, 'C', 0, 0, 0 ,0, true);
+ //$skupajVrstica[] = LatexDocument::encodeText($this->meansClass->formatNumber($_means[$i]['sumaMeans'], SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_RESIDUAL')));
+ $skupajVrstica[] = LatexDocument::encodeText(self::formatNumber($_means[$i]['sumaMeans'], SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_RESIDUAL')));
+ //$this->pdf->MultiCell($singleWidth, 7, LatexDocument::encodeText($this->meansClass->formatNumber($_means[$i]['sumaMeans'], SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_RESIDUAL'))), 1, 'C', 0, 0, 0 ,0, true);
+ $skupajVrstica[] = LatexDocument::encodeText((int)$_means[$i]['sumaSkupna']);
+ //$this->pdf->MultiCell($singleWidth, 7, LatexDocument::encodeText((int)$_means[$i]['sumaSkupna']), 1, 'C', 0, 0, 0 ,0, true);
}
- //$this->pdf->MultiCell(1, 7, $this->encodeText(''), 0, 'C', 0, 1, 0 ,0, true);
$tabela .= $this->tableRow($skupajVrstica, $brezHline)." ";
//SKUPAJ - konec
//zaljucek latex tabele z obrobo za prvo tabelo
- $tabela .= ($export_format == 'pdf' ? "\\end{tabularx}" : "\\end{tabular}");
+ $tabela .= ($export_format == 'pdf' ? "\\end{xltabular}" : "\\end{tabular}");
//zaljucek latex tabele z obrobo za prvo tabelo - konec
return $tabela;
}
diff --git a/admin/survey/export/latexclasses/Analize/AnalizaMultiCrosstab.php b/admin/survey/export/latexclasses/Analize/AnalizaMultiCrosstab.php
index 02f6eb9..ce2126a 100644
--- a/admin/survey/export/latexclasses/Analize/AnalizaMultiCrosstab.php
+++ b/admin/survey/export/latexclasses/Analize/AnalizaMultiCrosstab.php
@@ -7,14 +7,14 @@
include_once('../exportclases/class.pdfIzvozAnalizaFunctions.php');
require_once('../exportclases/class.enka.pdf.php');
- define("ALLOW_HIDE_ZERRO_REGULAR", false); // omogočimo delovanje prikazovanja/skrivanja ničelnih vnosti za navadne odgovore
- define("ALLOW_HIDE_ZERRO_MISSING", true); // omogočimo delovanje prikazovanja/skrivanja ničelnih vnosti za missinge
+ if (!defined('ALLOW_HIDE_ZERRO_REGULAR')) define("ALLOW_HIDE_ZERRO_REGULAR", false); // omogočimo delovanje prikazovanja/skrivanja ničelnih vnosti za navadne odgovore
+ if (!defined('ALLOW_HIDE_ZERRO_MISSING')) define("ALLOW_HIDE_ZERRO_MISSING", true); // omogočimo delovanje prikazovanja/skrivanja ničelnih vnosti za missinge
- define("NUM_DIGIT_AVERAGE", 2); // stevilo digitalnih mest za povprecje
- define("NUM_DIGIT_DEVIATION", 2); // stevilo digitalnih mest za povprecje
+ if (!defined('NUM_DIGIT_AVERAGE')) define("NUM_DIGIT_AVERAGE", 2); // stevilo digitalnih mest za povprecje
+ if (!defined('NUM_DIGIT_DEVIATION')) define("NUM_DIGIT_DEVIATION", 2); // stevilo digitalnih mest za povprecje
- define("M_ANALIZA_DESCRIPTOR", "descriptor");
- define("M_ANALIZA_FREQUENCY", "frequency");
+ if (!defined('M_ANALIZA_DESCRIPTOR')) define("M_ANALIZA_DESCRIPTOR", "descriptor");
+ if (!defined('M_ANALIZA_FREQUENCY')) define("M_ANALIZA_FREQUENCY", "frequency");
define("FNT_FREESERIF", "freeserif");
define("FNT_FREESANS", "freesans");
@@ -84,12 +84,8 @@ class AnalizaMultiCrosstab extends LatexAnalysisElement {
global $global_user_id;
// preverimo ali imamo stevilko ankete
- //if ( is_numeric($anketa) ){
if ( is_numeric($anketa['id']) ){
- //$this->anketa['id'] = $anketa;
$this->anketa = $anketa;
- // create new PDF document
- //$this->pdf = new enka_TCPDF('L', PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
}
else{
$this->pi['msg'] = "Anketa ni izbrana!";
@@ -142,14 +138,8 @@ class AnalizaMultiCrosstab extends LatexAnalysisElement {
$this->multiCrosstabClass->getSelectedVars();
// Izpisemo naslov tabele
- //echo "naslov tabele: ".$this->encodeText($this->multiCrosstabClass->table_settings[$this->multiCrosstabClass->table_id]['title'])."</br>";
- $tabela .= '\textbf{'.$this->encodeText($this->multiCrosstabClass->table_settings[$this->multiCrosstabClass->table_id]['title']).'}'.$this->texBigSkip.$this->texNewLine;
- //echo $tabela."</br>";
-/* $this->pdf->setFont('','B','10');
- $this->pdf->MultiCell(150, 5, $this->encodeText($this->multiCrosstabClass->table_settings[$this->multiCrosstabClass->table_id]['title']), 0, 'L', 0, 1, 0 ,0, true);
- $this->pdf->ln(5);
- $this->pdf->setFont('','','6'); */
-
+ $tabela .= '\textbf{'.LatexDocument::encodeText($this->multiCrosstabClass->table_settings[$this->multiCrosstabClass->table_id]['title']).'}'.$this->texBigSkip.$this->texNewLine;
+
// TABELA
@@ -198,17 +188,16 @@ class AnalizaMultiCrosstab extends LatexAnalysisElement {
foreach($this->multiCrosstabClass->selectedVars['ver'] as $var){
$cntVerVars++;
}
- //echo "cntVerVars: ".$cntVerVars."</br>";
+ $tretjaVrsticaVert = array();
+ $cetrtaVrsticaVert = array();
if($this->multiCrosstabClass->colSpan == 0){
- //$this->cellWidth = $dataWidth/2;
- //$this->pdf->MultiCell($metaWidth, 0, '', 'B', 'L', 0, 1, 0 ,0, true);
+
$steviloPodstolpcev = 1;
$steviloPodstolpcevV1[] = $steviloPodstolpcev;
}
// Imamo 2 nivoja
elseif($this->multiCrosstabClass->colLevel2){
- //echo "vertikalno izbrane sprem. 1. vrstica, ko imamo 2 nivoja</br>";
$this->cellWidth = $dataWidth / $this->multiCrosstabClass->colSpan;
@@ -223,7 +212,6 @@ class AnalizaMultiCrosstab extends LatexAnalysisElement {
foreach($this->multiCrosstabClass->variablesList[$parentVar['spr']]['options'] as $option){
foreach($parentVar['sub'] as $var){
foreach($this->multiCrosstabClass->variablesList[$var['spr']]['options'] as $suboption){
- //$this->pdf->MultiCell($this->cellWidth, $lineHeight, $this->snippet($suboption, 25), 1, 'C', 0, 0, 0 ,0, true, $stretch=0, $ishtml=false, $autopadding=false, $maxh=0);
if($export_format != 'xls'){
$cetrtaVrsticaVertText = $this->snippet($suboption, 25);
$cetrtaVrsticaVertTmpText = $this->snippet($suboption, 25);
@@ -241,25 +229,19 @@ class AnalizaMultiCrosstab extends LatexAnalysisElement {
}
}
else{
- //$this->pdf->MultiCell($this->cellWidth*count($this->multiCrosstabClass->variablesList[$parentVar['spr']]['options']), $lineHeight, '', 0, 'C', 0, 0, 0 ,0, true);
-
foreach($this->multiCrosstabClass->variablesList[$parentVar['spr']]['options'] as $option){
- //$this->pdf->MultiCell($this->cellWidth, $lineHeight*2, $this->snippet($option, 25), 1, 'C', 0, 0, 0 ,0, true);
-
- /* $cetrtaVrsticaVert[] = $this->snippet($option, 25);
- $cetrtaVrsticaVertTmp[] = $this->snippet($suboption, 25); */
if($export_format != 'xls'){
$cetrtaVrsticaVertText = $this->snippet($option, 25);
- $cetrtaVrsticaVertTmpText = $this->snippet($suboption, 25);
+ //$cetrtaVrsticaVertTmpText = $this->snippet($suboption, 25);
}else{
$cetrtaVrsticaVertText = $option;
- $cetrtaVrsticaVertTmpText = $suboption;
+ //$cetrtaVrsticaVertTmpText = $suboption;
}
$cetrtaVrsticaVert[] = $cetrtaVrsticaVertText;
- $cetrtaVrsticaVertTmp[] = $cetrtaVrsticaVertTmpText;
+ //$cetrtaVrsticaVertTmp[] = $cetrtaVrsticaVertTmpText;
$indeksMultiRow[] = 0;
}
- $steviloPodstolpcev = count($cetrtaVrsticaVertTmp);
+ //$steviloPodstolpcev = count($cetrtaVrsticaVertTmp);
$steviloPodstolpcevV3[] = count($this->multiCrosstabClass->variablesList[$parentVar['spr']]['options']);
}
if($steviloPodstolpcev!=0){
@@ -271,7 +253,6 @@ class AnalizaMultiCrosstab extends LatexAnalysisElement {
// Izrisemo VERTIKALNO izbrane spremenljivkec - 1. vrstica
- //$this->pdf->MultiCell($metaWidth, $lineHeight, '', 0, 'L', 0, 0, 0 ,0, true);
if(count($this->multiCrosstabClass->selectedVars['ver'])){
$prvaVrsticaVert = array();
@@ -283,43 +264,36 @@ class AnalizaMultiCrosstab extends LatexAnalysisElement {
$rowspan = 1;
$width = $this->cellWidth * count($this->multiCrosstabClass->variablesList[$var['sub'][0]['spr']]['options']) * count($this->multiCrosstabClass->variablesList[$var['spr']]['options']);
if($export_format != 'xls'){
- $naslov = $this->encodeText($this->snippet($this->multiCrosstabClass->variablesList[$var['spr']]['naslov'], 25));
+ $naslov = LatexDocument::encodeText($this->snippet($this->multiCrosstabClass->variablesList[$var['spr']]['naslov'], 25));
}else{
- $naslov = $this->encodeText($this->multiCrosstabClass->variablesList[$var['spr']]['naslov']);
+ $naslov = LatexDocument::encodeText($this->multiCrosstabClass->variablesList[$var['spr']]['naslov']);
}
}
else{
$rowspan = 2;
$width = $this->cellWidth * count($this->multiCrosstabClass->variablesList[$var['spr']]['options']);
if($export_format != 'xls'){
- $naslov = '\multirow{2}{*}{ '.$this->encodeText($this->snippet($this->multiCrosstabClass->variablesList[$var['spr']]['naslov'], 25)).' }';
+ $naslov = '\multirow{2}{*}{ '.LatexDocument::encodeText($this->snippet($this->multiCrosstabClass->variablesList[$var['spr']]['naslov'], 25)).' }';
}else{
- $naslov = $this->encodeText($this->multiCrosstabClass->variablesList[$var['spr']]['naslov']);
+ $naslov = LatexDocument::encodeText($this->multiCrosstabClass->variablesList[$var['spr']]['naslov']);
}
}
- //$this->pdf->MultiCell($width, $lineHeight*$rowspan, $this->snippet($this->multiCrosstabClass->variablesList[$var['spr']]['naslov'], 25), 1, 'C', 0, 0, 0 ,0, true);
-
- //$naslov = $this->snippet($this->multiCrosstabClass->variablesList[$var['spr']]['naslov'], 25);
- //$naslov = $this->encodeText($this->snippet($this->multiCrosstabClass->variablesList[$var['spr']]['naslov'], 25));
$prvaVrsticaVert[] = $naslov;
//echo "naslov: ".$naslov."</br>";
}
}
- //$this->pdf->MultiCell(1, $lineHeight, '', 0, 'L', 0, 1, 0 ,0, true);
+
// Izris vrstic za 2. nivo - 3. in 4. vrstica
- //$this->pdf->MultiCell($metaWidth, $lineHeight, '', 0, 'L', 0, 0, 0 ,0, true);
+
if(count($this->multiCrosstabClass->selectedVars['ver'])){
- $tretjaVrsticaVert = array();
foreach($this->multiCrosstabClass->selectedVars['ver'] as $parentVar){
// ce imamo childe na 2. nivoju
if(count($parentVar['sub']) > 0){
- //$tretjaVrsticaVert = array();
foreach($this->multiCrosstabClass->variablesList[$parentVar['spr']]['options'] as $option){
$width = $this->cellWidth * count($this->multiCrosstabClass->variablesList[$parentVar['sub'][0]['spr']]['options']);
foreach($parentVar['sub'] as $var){
- //$this->pdf->MultiCell($width, $lineHeight, $this->snippet($this->multiCrosstabClass->variablesList[$var['spr']]['naslov'], 25), 1, 'C', 0, 0, 0 ,0, true);
if($export_format != 'xls'){
$tretjaVrsticaVert[] = $this->snippet($this->multiCrosstabClass->variablesList[$var['spr']]['naslov'], 25);
}else{
@@ -331,9 +305,7 @@ class AnalizaMultiCrosstab extends LatexAnalysisElement {
}
}
else{
- //$this->pdf->MultiCell($this->cellWidth*count($this->multiCrosstabClass->variablesList[$parentVar['spr']]['options']), $lineHeight, '', 0, 'C', 0, 0, 0 ,0, true);
- //$tretjaVrsticaVert[] = '';
$tretjaVrsticaVert[] = '\multirow{2}{*}{}';
@@ -343,7 +315,6 @@ class AnalizaMultiCrosstab extends LatexAnalysisElement {
}
// Izrisemo VARIABLE za spremenljivko - 2. vrstica
- //$this->pdf->MultiCell($metaWidth, $lineHeight, '', 0, 'L', 0, 0, 0 ,0, true);
if(count($this->multiCrosstabClass->selectedVars['ver'])){
$drugaVrsticaVert = array();
@@ -378,16 +349,13 @@ class AnalizaMultiCrosstab extends LatexAnalysisElement {
}
}
}
- //$this->pdf->MultiCell(1, $lineHeight, '', 0, 'L', 0, 1, 0 ,0, true);
}
// Imamo samo 1 nivo
else{
// Izrisemo VERTIKALNO izbrane spremenljivkec - 1. vrstica
- //echo "Samo 1 nivo </br>";
// Izracunamo sirine celic
$this->cellWidth = $dataWidth / $this->multiCrosstabClass->fullColSpan;
- //$this->pdf->MultiCell($metaWidth, $lineHeight, '', 0, 'C', 0, 0, 0 ,0, true);
if(count($this->multiCrosstabClass->selectedVars['ver'])){
$prvaVrsticaVert = array();
@@ -403,22 +371,12 @@ class AnalizaMultiCrosstab extends LatexAnalysisElement {
}
}
- //$prvaVrsticaVert[] = $this->snippet($naslov, 35);
-
- //$sprWidth = count($this->multiCrosstabClass->variablesList[$var['spr']]['options']) * $this->cellWidth;
- //if($this->multiCrosstabClass->table_settings[$this->multiCrosstabClass->table_id]['sums'] == 1 && !$this->multiCrosstabClass->rowLevel2)
- //$sprWidth += $this->cellWidth;
- //$this->pdf->MultiCell($sprWidth, $lineHeight, $this->snippet($this->multiCrosstabClass->variablesList[$var['spr']]['naslov'], 35), 1, 'C', 0, 0, 0 ,0, true);
-
+ //$prvaVrsticaVert[] = $this->snippet($naslov, 35);
}
-
- //$this->pdf->MultiCell(1, $lineHeight, '', 0, 'C', 0, 1, 0 ,0, true);
- //$tabela .= $this->tableRow($prvaVrsticaVert);
- //echo $tabela;
+
}
// Nimamo nobene vertikalne spremenljivke in 2 horizontalni
elseif($this->multiCrosstabClass->rowLevel2){
- //$this->pdf->MultiCell($dataWidth, $lineHeight, '', 0, 'C', 0, 0, 0 ,0, true);
echo "Nimamo nobene vertikalne spremenljivke in 2 horizontalni </br>";
}
@@ -429,22 +387,12 @@ class AnalizaMultiCrosstab extends LatexAnalysisElement {
// Iracunamo visino najvisje celice
$cellHeight = $lineHeight;
-/* foreach($this->multiCrosstabClass->selectedVars['ver'] as $var){
-
- foreach($this->multiCrosstabClass->variablesList[$var['spr']]['options'] as $option){
- $height = $this->getCellHeight($this->snippet($option, 25), $this->cellWidth);
- $cellHeight = ($height > $cellHeight) ? $height : $cellHeight;
- }
- } */
-
- //$this->pdf->MultiCell($metaWidth, $cellHeight, '', 'B', 'C', 0, 0, 0 ,0, true);
-
foreach($this->multiCrosstabClass->selectedVars['ver'] as $var){
$steviloPodstolpcev = 0;
// Loop cez variable spremenljivke
foreach($this->multiCrosstabClass->variablesList[$var['spr']]['options'] as $option){
- //$this->pdf->MultiCell($this->cellWidth, $cellHeight, $this->snippet($option, 25), 1, 'C', 0, 0, 0 ,0, true);
+
if($export_format != 'xls'){
$drugaVrsticaVert[] = $this->snippet($option, 25);
}else{
@@ -456,16 +404,10 @@ class AnalizaMultiCrosstab extends LatexAnalysisElement {
// Suma (ce jo imamo vklopljeno)
if($this->multiCrosstabClass->table_settings[$this->multiCrosstabClass->table_id]['sums'] == 1 && !$this->multiCrosstabClass->rowLevel2){
- //$this->pdf->MultiCell($this->cellWidth, $cellHeight, $lang['srv_analiza_crosstab_skupaj'], 1, 'C', 0, 0, 0 ,0, true);
$drugaVrsticaVert[] = $lang['srv_analiza_crosstab_skupaj'];
$steviloPodstolpcev++;
}
-
-/* if($colspan<4){
- $steviloPodstolpcevV2[] = $steviloPodstolpcev;
- }elseif($steviloPodstolpcev!=0&&$colspan==4){
- $steviloPodstolpcevV2[] = $steviloPodstolpcev;
- } */
+
if($steviloPodstolpcev!=0){
$steviloPodstolpcevV1[] = $steviloPodstolpcev;
}
@@ -473,7 +415,6 @@ class AnalizaMultiCrosstab extends LatexAnalysisElement {
//$steviloPodstolpcevV2[] = $steviloPodstolpcev;
}
//$tabela .= $this->tableRow($drugaVrsticaVert);
- //$this->pdf->MultiCell(1, $cellHeight, '', 0, 'C', 0, 1, 0 ,0, true);
}
}
@@ -501,7 +442,7 @@ class AnalizaMultiCrosstab extends LatexAnalysisElement {
/*Priprava parametrov za tabelo in ostala polja za nadaljnji izpis - konec*/
//zacetek latex tabele z obrobo za prvo tabelo
- $pdfTable = 'tabularx';
+ $pdfTable = 'xltabular';
$rtfTable = 'tabular';
$pdfTableWidth = 1;
$rtfTableWidth = 1;
@@ -512,8 +453,7 @@ class AnalizaMultiCrosstab extends LatexAnalysisElement {
$tabela .= "\\cline{".($colspan+1)."-".$steviloStolpcevParameterTabular."}"; //prekinjena horizontalna vrstica na vrhu tabele
}
- $tabela .= $this->MultiColCellLatex($colspan, '', 1); //prazne celice v prvi vrstici
- //$tabela .= $this->tableRow($prvaVrsticaVert, 1, 0, 0, $steviloPodstolpcevV1); //izpis prve vrstice tabele
+ $tabela .= $this->MultiColCellLatex($colspan, '', 1, $export_format); //prazne celice v prvi vrstici
$tabela .= $this->tableRow($prvaVrsticaVert, 1, 0, 0, '', $export_format, $steviloPodstolpcevV1); //izpis prve vrstice tabele
//prekinjena horizontalna vrstica po prvi vrstici
@@ -523,9 +463,8 @@ class AnalizaMultiCrosstab extends LatexAnalysisElement {
//prekinjena horizontalna vrstica po prvi vrstici - konec
if(count($drugaVrsticaVert)){
- $tabela .= $this->MultiColCellLatex($colspan, '', 1); //prazne celice v drugi vrstici
+ $tabela .= $this->MultiColCellLatex($colspan, '', 1, $export_format); //prazne celice v drugi vrstici
if(count($steviloPodstolpcevV2)){
- //$tabela .= $this->tableRow($drugaVrsticaVert, 1, 0, 0, $steviloPodstolpcevV2);
$tabela .= $this->tableRow($drugaVrsticaVert, 1, 0, 0, '', $export_format, $steviloPodstolpcevV2);
}else{
$tabela .= $this->tableRow($drugaVrsticaVert, 1);
@@ -538,10 +477,9 @@ class AnalizaMultiCrosstab extends LatexAnalysisElement {
//prekinjena horizontalna vrstica po drugi vrstici - konec
}
- if(count($tretjaVrsticaVert)){
- $tabela .= $this->MultiColCellLatex($colspan, '', 1); //prazne celice v drugi vrstici
+ if(is_countable($tretjaVrsticaVert) && count($tretjaVrsticaVert)){
+ $tabela .= $this->MultiColCellLatex($colspan, '', 1, $export_format); //prazne celice v drugi vrstici
if(count($steviloPodstolpcevV3)){
- //$tabela .= $this->tableRow($tretjaVrsticaVert, 1, 0, 0, $steviloPodstolpcevV3);
$tabela .= $this->tableRow($tretjaVrsticaVert, 1, 0, 0, '', $export_format, $steviloPodstolpcevV3);
}else{
$tabela .= $this->tableRow($tretjaVrsticaVert, 1);
@@ -552,7 +490,7 @@ class AnalizaMultiCrosstab extends LatexAnalysisElement {
}
if(count($cetrtaVrsticaVert)){
- $tabela .= $this->MultiColCellLatex($colspan, '', 1); //prazne celice v drugi vrstici
+ $tabela .= $this->MultiColCellLatex($colspan, '', 1, $export_format); //prazne celice v drugi vrstici
$tabela .= $this->tableRow($cetrtaVrsticaVert, 1);
}
@@ -572,7 +510,6 @@ class AnalizaMultiCrosstab extends LatexAnalysisElement {
$order0 = 0;
foreach($this->multiCrosstabClass->variablesList[$parentVar['spr']]['options'] as $option){
- //echo "option hor 2. nivoja: ".$option."</br>";
$cnt2 = 0;
// ce imamo childe na 2. nivoju
@@ -605,17 +542,14 @@ class AnalizaMultiCrosstab extends LatexAnalysisElement {
if($cnt == 0){
if($export_format != 'xls'){
- $tabela .= $this->encodeText($this->snippet($this->multiCrosstabClass->variablesList[$parentVar['spr']]['naslov'], 25))." & ";
+ $tabela .= LatexDocument::encodeText($this->snippet($this->multiCrosstabClass->variablesList[$parentVar['spr']]['naslov'], 25))." & ";
}else{
- $tabela .= $this->encodeText($this->multiCrosstabClass->variablesList[$parentVar['spr']]['naslov'])." & ";
+ $tabela .= LatexDocument::encodeText($this->multiCrosstabClass->variablesList[$parentVar['spr']]['naslov'])." & ";
}
- //$this->pdf->MultiCell($width, $this->cellHeight, $this->snippet($this->multiCrosstabClass->variablesList[$parentVar['spr']]['naslov'], 25), 'LR', 'C', 0, 0, 0 ,0, true);
- //echo "naslov : ".$this->snippet($this->multiCrosstabClass->variablesList[$parentVar['spr']]['naslov'], 25)."</br>";
+
}
else{
$tabela .= " & ";
- //$this->pdf->MultiCell($width, $this->cellHeight, '', 'LR'.$border1, 'C', 0, 0, 0 ,0, true);
- //echo "naslov : </br>";
}
@@ -623,54 +557,42 @@ class AnalizaMultiCrosstab extends LatexAnalysisElement {
//if($cnt2 == floor(count($this->multiCrosstabClass->variablesList[$var['spr']]['options'])/2)){
if($cnt2 == 0){
if($export_format != 'xls'){
- $tabela .= $this->encodeText($this->snippet($option, 25))." & ";
+ $tabela .= LatexDocument::encodeText($this->snippet($option, 25))." & ";
}else{
- $tabela .= $this->encodeText($option)." & ";
+ $tabela .= LatexDocument::encodeText($option)." & ";
}
- //echo "variabla : ".$this->snippet($option, 25)."</br>";
- //$this->pdf->MultiCell($width, $this->cellHeight, $this->snippet($option, 25), 'LR', 'C', 0, 0, 0 ,0, true);
}
else{
$tabela .= " & ";
- //echo "variabla : </br>";
- //$this->pdf->MultiCell($width, $this->cellHeight, '', 'LR'.$border2, 'C', 0, 0, 0 ,0, true);
}
//if($cnt3 == floor(count($this->multiCrosstabClass->variablesList[$var['spr']]['options'])/2)){
if($cnt3 == 0){
if($export_format != 'xls'){
- $tabela .= $this->encodeText($this->snippet($this->multiCrosstabClass->variablesList[$var['spr']]['naslov'], 25))." & ";
+ $tabela .= LatexDocument::encodeText($this->snippet($this->multiCrosstabClass->variablesList[$var['spr']]['naslov'], 25))." & ";
}else{
- $tabela .= $this->encodeText($this->multiCrosstabClass->variablesList[$var['spr']]['naslov'])." & ";
+ $tabela .= LatexDocument::encodeText($this->multiCrosstabClass->variablesList[$var['spr']]['naslov'])." & ";
}
- //echo "variabla cnt3: ".$this->snippet($this->multiCrosstabClass->variablesList[$var['spr']]['naslov'], 25)."</br>";
- //$this->pdf->MultiCell($width, $this->cellHeight, $this->snippet($this->multiCrosstabClass->variablesList[$var['spr']]['naslov'], 25), 'LR', 'C', 0, 0, 0 ,0, true);
}
else{
- $tabela .= " & ";
- //echo "variabla cnt3: </br>";
- //$this->pdf->MultiCell($width, $this->cellHeight, '', 'LR'.$border2, 'C', 0, 0, 0 ,0, true);
+ $tabela .= " & ";
}
// Variabla 2
if($export_format != 'xls'){
- $tabela .= $this->encodeText($this->snippet($suboption, 25))." & ";
+ $tabela .= LatexDocument::encodeText($this->snippet($suboption, 25))." & ";
}else{
- $tabela .= $this->encodeText($suboption)." & ";
+ $tabela .= LatexDocument::encodeText($suboption)." & ";
}
- //$this->pdf->MultiCell($width, $this->cellHeight, $this->snippet($suboption, 25), 1, 'C', 0, 0, 0 ,0, true);
- //echo "option variabla 2: ".$this->snippet($suboption, 25)."</br>";
// Celice s podatki
$vrsticaPodatki = $this->displayDataCells($parentVar, $order0, $var, $cnt3);
- //print_r($vrsticaPodatki);
+
################# izpis celic s podatki
$tabela .= $this->displayDataCellLatex($vrsticaPodatki, $this->tableSettingsNumerus, $this->tableSettingsAvgVar, $this->tableSettingsDelezVar, $colspan, $steviloStolpcevParameterTabular, $export_format);
################# izpis celic s podatki - konec
// Celice s podatki - konec
- //$this->pdf->MultiCell(1, $this->cellHeight, '', 0, 'C', 0, 1, 0 ,0, true);
-
$cnt++;
$cnt2++;
$cnt3++;
@@ -753,11 +675,9 @@ class AnalizaMultiCrosstab extends LatexAnalysisElement {
}else{
$naslovVarHor = '';
}
- //echo "naslovVarHor: ".$naslovVarHor."</br>";
$tabela .= $naslovVarHor." & ";
// Variabla
- //$this->pdf->MultiCell($width, $this->cellHeight, $this->snippet($option, 25), '1', 'C', 0, 0, 0 ,0, true);
//echo "variabla: ".$this->snippet($option, 25)."</br>";
if($export_format != 'xls'){
$tabela .= $this->snippet($option, 25)." & ";
@@ -766,8 +686,8 @@ class AnalizaMultiCrosstab extends LatexAnalysisElement {
}
// Celice s podatki
- //echo "celica s podatki: ".$var."</br>";
// Ce nimamo nobenega krizanja izpisemo prazne
+ $spr2=isset($spr2)?$spr2:'';
if($spr2 == '' && $this->multiCrosstabClass->colSpan == 0){
//$tabela .= " & ";
$tabela .= $this->texNewLine;
@@ -778,7 +698,6 @@ class AnalizaMultiCrosstab extends LatexAnalysisElement {
$tabela .= $this->displayDataCellLatex($vrsticaPodatki, $this->tableSettingsNumerus, $this->tableSettingsAvgVar, $this->tableSettingsDelezVar, $colspan, $steviloStolpcevParameterTabular, $export_format);
################# izpis celic s podatki - konec
}
- //$this->pdf->MultiCell(1, $this->cellHeight, '', 0, 'C', 0, 1, 0 ,0, true);
if($export_format != 'xls'){
$tabela .= "\\cline{".($colspan)."-".$steviloStolpcevParameterTabular."}"; //prekinjena horizontalna vrstica
@@ -788,11 +707,8 @@ class AnalizaMultiCrosstab extends LatexAnalysisElement {
}
// Vrstica za sumo (ce jo imamo vklopljeno)
if($suma){
-
- //$this->pdf->MultiCell($width, $this->cellHeight, '', 'BLR', 'C', 0, 0, 0 ,0, true);
- //$this->pdf->MultiCell($width, $this->cellHeight, $lang['srv_analiza_crosstab_skupaj'], '1', 'C', 0, 0, 0 ,0, true);
- $tabela .= " & ".$this->encodeText($lang['srv_analiza_crosstab_skupaj'])." & ";
- //$tabela .= $this->encodeText($lang['srv_analiza_crosstab_skupaj'])." & ";
+
+ $tabela .= " & ".LatexDocument::encodeText($lang['srv_analiza_crosstab_skupaj'])." & ";
$vrsticaPodatkiSumNum = array();
$vrsticaPodatkiSumPer = array();
@@ -876,7 +792,6 @@ class AnalizaMultiCrosstab extends LatexAnalysisElement {
}
if($this->tableSettingsDelezVar!= ''){
$color = 'red';
- //$tabela .= $this->tableRow($vrsticaPodatkiSumDelez,1);
$tabela .= $this->tableRow($vrsticaPodatkiSumDelez,1,0,0,$color, $export_format);
}
}
@@ -898,7 +813,7 @@ class AnalizaMultiCrosstab extends LatexAnalysisElement {
}
//zaljucek latex tabele z obrobo za drugo tabelo
- $tabela .= ($export_format == 'pdf' ? "\\end{tabularx}" : "\\end{tabular}");
+ $tabela .= ($export_format == 'pdf' ? "\\end{xltabular}" : "\\end{tabular}");
//zaljucek latex tabele z obrobo za drugo tabelo - konec
//echo "tabela: ".$tabela;
return $tabela;
@@ -1434,27 +1349,6 @@ class AnalizaMultiCrosstab extends LatexAnalysisElement {
function displaySumsCell($spr1=null, $spr2=null, $val=null, $orientation=null){
$celicaSums = array();
- //echo "Orientacija skupaj: ".$orientation."</br>";
-/* $startX = $this->pdf->getX();
- $startY = $this->pdf->getY(); */
-
- // Nastavimo visino posamezne vrstice
-/* $cellSpan = 0;
- if($this->multiCrosstabClass->table_settings[$this->multiCrosstabClass->table_id]['numerus'] == 1)
- $cellSpan++;
- if($this->multiCrosstabClass->table_settings[$this->multiCrosstabClass->table_id]['percent'] == 1)
- $cellSpan++;
- if($this->multiCrosstabClass->table_settings[$this->multiCrosstabClass->table_id]['avgVar'] != '')
- $cellSpan++;
- if($this->multiCrosstabClass->table_settings[$this->multiCrosstabClass->table_id]['delezVar'] != '')
- $cellSpan++;
- $cellSpan = ($cellSpan > 0) ? $cellSpan : 1;
- $lineHeight = $this->cellHeight / $cellSpan; */
-
- // Nastavimo barvo texta
-/* $this->pdf->SetTextColor(160, 0, 0);
- $this->pdf->setFont('','B','6'); */
-
$crosstabs = $this->multiCrosstabClass->crosstabData[$spr1['spr'].'-'.$spr2['spr']];
// Celica s skupno sumo
@@ -1463,16 +1357,11 @@ class AnalizaMultiCrosstab extends LatexAnalysisElement {
// Numerus
if($this->multiCrosstabClass->table_settings[$this->multiCrosstabClass->table_id]['numerus'] == 1){
$celicaSums['numerus'] = $crosstabs['sumaSkupna'];
-/* $this->pdf->MultiCell($this->cellWidth, $lineHeight, $crosstabs['sumaSkupna'], 1, 'C', 0, 0, 0 ,0, true);
- $this->pdf->setXY($this->pdf->getX() - $this->cellWidth, $this->pdf->getY() + $lineHeight); */
}
// Procenti
if($this->multiCrosstabClass->table_settings[$this->multiCrosstabClass->table_id]['percent'] == 1){
- //$celicaSums['percent'] = $this->formatNumber(100, SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_PERCENT'), '%');
- $celicaSums['percent'] = $this->encodeText($this->formatNumber(100, SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_PERCENT'), '%'));
-/* $this->pdf->MultiCell($this->cellWidth, $lineHeight, $this->formatNumber(100, SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_PERCENT'), '%'), 1, 'C', 0, 0, 0 ,0, true);
- $this->pdf->setXY($this->pdf->getX() - $this->cellWidth, $this->pdf->getY() + $lineHeight); */
+ $celicaSums['percent'] = LatexDocument::encodeText($this->formatNumber(100, SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_PERCENT'), '%'));
}
// Povprecje
@@ -1490,13 +1379,6 @@ class AnalizaMultiCrosstab extends LatexAnalysisElement {
$avg = $tempAvg / $crosstabs['sumaSkupna'];
}
$celicaSums['avg'] = $this->formatNumber($avg, SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_AVERAGE'));
-/* $this->pdf->SetFillColor(220, 220, 255);
- $this->pdf->SetTextColor(0, 0, 230);
- $this->pdf->MultiCell($this->cellWidth, $lineHeight, $this->formatNumber($avg, SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_AVERAGE')), 1, 'C', 1, 0, 0 ,0, true);
- $this->pdf->SetFillColor(250, 250, 250);
- $this->pdf->SetTextColor(0, 0, 0);
-
- $this->pdf->setXY($this->pdf->getX() - $this->cellWidth, $this->pdf->getY() + $lineHeight); */
}
// Delez
@@ -1511,15 +1393,7 @@ class AnalizaMultiCrosstab extends LatexAnalysisElement {
}
}
}
- //$celicaSums['delez'] = $this->formatNumber($delez*100, SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_PERCENT'), '%');
- $celicaSums['delez'] = $this->encodeText($this->formatNumber($delez*100, SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_PERCENT'), '%'));
-/* $this->pdf->SetFillColor(255, 220, 220);
- $this->pdf->SetTextColor(230, 0, 0);
- $this->pdf->MultiCell($this->cellWidth, $lineHeight, $this->formatNumber($delez*100, SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_PERCENT'), '%'), 1, 'C', 1, 0, 0 ,0, true);
- $this->pdf->SetFillColor(250, 250, 250);
- $this->pdf->SetTextColor(0, 0, 0);
-
- $this->pdf->setXY($this->pdf->getX() - $this->cellWidth, $this->pdf->getY() + $lineHeight); */
+ $celicaSums['delez'] = LatexDocument::encodeText($this->formatNumber($delez*100, SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_PERCENT'), '%'));
}
}
// Suma na koncu vrstice
@@ -1530,16 +1404,13 @@ class AnalizaMultiCrosstab extends LatexAnalysisElement {
// Numerus
if($this->multiCrosstabClass->table_settings[$this->multiCrosstabClass->table_id]['numerus'] == 1){
-/* $this->pdf->MultiCell($this->cellWidth, $lineHeight, $crosstabs['sumaVrstica'][$val], 1, 'C', 0, 0, 0 ,0, true);
- $this->pdf->setXY($this->pdf->getX() - $this->cellWidth, $this->pdf->getY() + $lineHeight); */
+
$celicaSums['numerus'] = $crosstabs['sumaVrstica'][$val];
}
// Procenti
if($this->multiCrosstabClass->table_settings[$this->multiCrosstabClass->table_id]['percent'] == 1){
-/* $this->pdf->MultiCell($this->cellWidth, $lineHeight, $this->formatNumber(100, SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_PERCENT'), '%'), 1, 'C', 0, 0, 0 ,0, true);
- $this->pdf->setXY($this->pdf->getX() - $this->cellWidth, $this->pdf->getY() + $lineHeight); */
- //$celicaSums['percent'] = $this->formatNumber(100, SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_PERCENT'), '%');
- $celicaSums['percent'] = $this->encodeText($this->formatNumber(100, SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_PERCENT'), '%'));
+
+ $celicaSums['percent'] = LatexDocument::encodeText($this->formatNumber(100, SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_PERCENT'), '%'));
}
}
else{
@@ -1547,15 +1418,11 @@ class AnalizaMultiCrosstab extends LatexAnalysisElement {
// Numerus
if($this->multiCrosstabClass->table_settings[$this->multiCrosstabClass->table_id]['numerus'] == 1){
$celicaSums['numerus'] = '0';
-/* $this->pdf->MultiCell($this->cellWidth, $lineHeight, '0', 1, 'C', 0, 0, 0 ,0, true);
- $this->pdf->setXY($this->pdf->getX() - $this->cellWidth, $this->pdf->getY() + $lineHeight); */
}
// Procenti
if($this->multiCrosstabClass->table_settings[$this->multiCrosstabClass->table_id]['percent'] == 1){
- //$celicaSums['percent'] = $this->formatNumber(100, SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_PERCENT'), '%');
- $celicaSums['percent'] = $this->encodeText($this->formatNumber(100, SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_PERCENT'), '%'));
-/* $this->pdf->MultiCell($this->cellWidth, $lineHeight, $this->formatNumber(100, SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_PERCENT'), '%'), 1, 'C', 0, 0, 0 ,0, true);
- $this->pdf->setXY($this->pdf->getX() - $this->cellWidth, $this->pdf->getY() + $lineHeight); */
+
+ $celicaSums['percent'] = LatexDocument::encodeText($this->formatNumber(100, SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_PERCENT'), '%'));
}
}
@@ -1574,13 +1441,6 @@ class AnalizaMultiCrosstab extends LatexAnalysisElement {
$celicaSums['avg'] = $this->formatNumber($avg, SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_AVERAGE'));
-/* $this->pdf->SetFillColor(220, 220, 255);
- $this->pdf->SetTextColor(0, 0, 230);
- $this->pdf->MultiCell($this->cellWidth, $lineHeight, $this->formatNumber($avg, SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_AVERAGE')), 1, 'C', 1, 0, 0 ,0, true);
- $this->pdf->SetFillColor(250, 250, 250);
- $this->pdf->SetTextColor(0, 0, 0);
-
- $this->pdf->setXY($this->pdf->getX() - $this->cellWidth, $this->pdf->getY() + $lineHeight); */
}
// Delez
@@ -1593,17 +1453,9 @@ class AnalizaMultiCrosstab extends LatexAnalysisElement {
$delez += $tempDelez;
}
}
+
+ $celicaSums['delez'] = LatexDocument::encodeText($this->formatNumber($delez*100, SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_PERCENT'), '%'));
- //$celicaSums['delez'] = $this->formatNumber($delez*100, SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_PERCENT'), '%');
- $celicaSums['delez'] = $this->encodeText($this->formatNumber($delez*100, SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_PERCENT'), '%'));
-
-/* $this->pdf->SetFillColor(255, 220, 220);
- $this->pdf->SetTextColor(230, 0, 0);
- $this->pdf->MultiCell($this->cellWidth, $lineHeight, $this->formatNumber($delez*100, SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_PERCENT'), '%'), 1, 'C', 1, 0, 0 ,0, true);
- $this->pdf->SetFillColor(250, 250, 250);
- $this->pdf->SetTextColor(0, 0, 0);
-
- $this->pdf->setXY($this->pdf->getX() - $this->cellWidth, $this->pdf->getY() + $lineHeight); */
}
}
// Suma za stolpce
@@ -1614,15 +1466,13 @@ class AnalizaMultiCrosstab extends LatexAnalysisElement {
// Numerus
if($this->multiCrosstabClass->table_settings[$this->multiCrosstabClass->table_id]['numerus'] == 1){
$celicaSums['numerus'] = $crosstabs['sumaStolpec'][$val];
-/* $this->pdf->MultiCell($this->cellWidth, $lineHeight, $crosstabs['sumaStolpec'][$val], 1, 'C', 0, 0, 0 ,0, true);
- $this->pdf->setXY($this->pdf->getX() - $this->cellWidth, $this->pdf->getY() + $lineHeight); */
+
}
// Procenti
if($this->multiCrosstabClass->table_settings[$this->multiCrosstabClass->table_id]['percent'] == 1){
- //$celicaSums['percent'] = $this->formatNumber($this->multiCrosstabClass->getCrossTabPercentage($crosstabs['sumaSkupna'], $crosstabs['sumaStolpec'][$val]), SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_PERCENT'), '%');
- $celicaSums['percent'] = $this->encodeText($this->formatNumber($this->multiCrosstabClass->getCrossTabPercentage($crosstabs['sumaSkupna'], $crosstabs['sumaStolpec'][$val]), SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_PERCENT'), '%'));
-/* $this->pdf->MultiCell($this->cellWidth, $lineHeight, $this->formatNumber($this->multiCrosstabClass->getCrossTabPercentage($crosstabs['sumaSkupna'], $crosstabs['sumaStolpec'][$val]), SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_PERCENT'), '%'), 1, 'C', 0, 0, 0 ,0, true);
- $this->pdf->setXY($this->pdf->getX() - $this->cellWidth, $this->pdf->getY() + $lineHeight); */
+
+ $celicaSums['percent'] = LatexDocument::encodeText($this->formatNumber($this->multiCrosstabClass->getCrossTabPercentage($crosstabs['sumaSkupna'], $crosstabs['sumaStolpec'][$val]), SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_PERCENT'), '%'));
+
}
}
else{
@@ -1630,16 +1480,13 @@ class AnalizaMultiCrosstab extends LatexAnalysisElement {
// Numerus
if($this->multiCrosstabClass->table_settings[$this->multiCrosstabClass->table_id]['numerus'] == 1){
$celicaSums['numerus'] = '0';
-/* $this->pdf->MultiCell($this->cellWidth, $lineHeight, '0', 1, 'C', 0, 0, 0 ,0, true);
- $this->pdf->setXY($this->pdf->getX() - $this->cellWidth, $this->pdf->getY() + $lineHeight); */
+
}
// Procenti
if($this->multiCrosstabClass->table_settings[$this->multiCrosstabClass->table_id]['percent'] == 1){
- //$celicaSums['percent'] = $this->formatNumber(0, SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_PERCENT'), '%');
- $celicaSums['percent'] = $this->encodeText($this->formatNumber(0, SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_PERCENT'), '%'));
-/* $this->pdf->MultiCell($this->cellWidth, $lineHeight, $this->formatNumber(0, SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_PERCENT'), '%'), 1, 'C', 0, 0, 0 ,0, true);
- $this->pdf->setXY($this->pdf->getX() - $this->cellWidth, $this->pdf->getY() + $lineHeight); $this->pdf->MultiCell($this->cellWidth, $lineHeight, $this->formatNumber(0, SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_PERCENT'), '%'), 1, 'C', 0, 0, 0 ,0, true);
- $this->pdf->setXY($this->pdf->getX() - $this->cellWidth, $this->pdf->getY() + $lineHeight); */
+
+ $celicaSums['percent'] = LatexDocument::encodeText($this->formatNumber(0, SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_PERCENT'), '%'));
+
}
}
@@ -1658,13 +1505,6 @@ class AnalizaMultiCrosstab extends LatexAnalysisElement {
}
$celicaSums['avg'] = $this->formatNumber($avg, SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_AVERAGE'));
-/* $this->pdf->SetFillColor(220, 220, 255);
- $this->pdf->SetTextColor(0, 0, 230);
- $this->pdf->MultiCell($this->cellWidth, $lineHeight, $this->formatNumber($avg, SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_AVERAGE')), 1, 'C', 1, 0, 0 ,0, true);
- $this->pdf->SetFillColor(250, 250, 250);
- $this->pdf->SetTextColor(0, 0, 0);
-
- $this->pdf->setXY($this->pdf->getX() - $this->cellWidth, $this->pdf->getY() + $lineHeight); */
}
// Delez
@@ -1677,33 +1517,21 @@ class AnalizaMultiCrosstab extends LatexAnalysisElement {
$delez += $tempDelez[$val];
}
}
- //$celicaSums['delez'] = $this->formatNumber($delez*100, SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_PERCENT'), '%');
- $celicaSums['delez'] = $this->encodeText($this->formatNumber($delez*100, SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_PERCENT'), '%'));
-/* $this->pdf->SetFillColor(255, 220, 220);
- $this->pdf->SetTextColor(230, 0, 0);
- $this->pdf->MultiCell($this->cellWidth, $lineHeight, $this->formatNumber($delez*100, SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_PERCENT'), '%'), 1, 'C', 1, 0, 0 ,0, true);
- $this->pdf->SetFillColor(250, 250, 250);
- $this->pdf->SetTextColor(0, 0, 0);
-
- $this->pdf->setXY($this->pdf->getX() - $this->cellWidth, $this->pdf->getY() + $lineHeight); */
+
+ $celicaSums['delez'] = LatexDocument::encodeText($this->formatNumber($delez*100, SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_PERCENT'), '%'));
+
}
}
-
-/* $this->pdf->SetTextColor(0, 0, 0);
- $this->pdf->setFont('','','6');
- $this->pdf->setXY($startX + $this->cellWidth, $startY); */
+
return $celicaSums;
}
// Izpis celice z vrednostmi
- //function displayDataCell($crosstab, $percent, $avg, $delez){
function displayDataCell($crosstab=null, $percent=null, $avg=null, $delez=null, $cnt=null){
- //$podatekCelice = '';
$podatekCelice = array();
- //$startX = $this->pdf->getX();
- //$startY = $this->pdf->getY();
+
$lineHeight = ($this->cellSpan > 1) ? 5 : 6;
@@ -1711,68 +1539,41 @@ class AnalizaMultiCrosstab extends LatexAnalysisElement {
// Numerus
if($this->multiCrosstabClass->table_settings[$this->multiCrosstabClass->table_id]['numerus'] == 1){
-/* $this->pdf->MultiCell($this->cellWidth, $lineHeight, $crosstab, 1, 'C', 0, 0, 0 ,0, true);
- $this->pdf->setXY($this->pdf->getX() - $this->cellWidth, $this->pdf->getY() + $lineHeight); */
- //$podatekCelice = $crosstab;
$podatekCelice['numerus'][$cnt] = $crosstab;
- //echo "Crosstab ce crosstab > 0: ".$crosstab."</br>";
}
// Procenti
if($this->multiCrosstabClass->table_settings[$this->multiCrosstabClass->table_id]['percent'] == 1){
-/* $this->pdf->MultiCell($this->cellWidth, $lineHeight, $this->formatNumber($percent, SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_PERCENT'), '%'), 1, 'C', 0, 0, 0 ,0, true);
- $this->pdf->setXY($this->pdf->getX() - $this->cellWidth, $this->pdf->getY() + $lineHeight); */
- //$podatekCelice = $this->formatNumber($percent, SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_PERCENT'), '%');
- //$podatekCelice['percent'][$cnt] = $this->formatNumber($percent, SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_PERCENT'), '%');
- $podatekCelice['percent'][$cnt] = $this->encodeText($this->formatNumber($percent, SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_PERCENT'), '%'));
- //echo "Procenti ce crosstab > 0: ".$podatekCelice."</br>";
+
+ $podatekCelice['percent'][$cnt] = LatexDocument::encodeText($this->formatNumber($percent, SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_PERCENT'), '%'));
}
}
else{
// Numerus
if($this->multiCrosstabClass->table_settings[$this->multiCrosstabClass->table_id]['numerus'] == 1){
-/* $this->pdf->MultiCell($this->cellWidth, $lineHeight, '0', 1, 'C', 0, 0, 0 ,0, true);
- $this->pdf->setXY($this->pdf->getX() - $this->cellWidth, $this->pdf->getY() + $lineHeight); */
+
$podatekCelice['numerus'][$cnt] = '0';
}
// Procenti
if($this->multiCrosstabClass->table_settings[$this->multiCrosstabClass->table_id]['percent'] == 1){
-/* $this->pdf->MultiCell($this->cellWidth, $lineHeight, $this->formatNumber(0, SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_PERCENT'), '%'), 1, 'C', 0, 0, 0 ,0, true);
- $this->pdf->setXY($this->pdf->getX() - $this->cellWidth, $this->pdf->getY() + $lineHeight); */
- //$podatekCelice = $this->formatNumber(0, SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_PERCENT'), '%');
- //$podatekCelice['percent'][$cnt] = $this->formatNumber(0, SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_PERCENT'), '%');
- $podatekCelice['percent'][$cnt] = $this->encodeText($this->formatNumber(0, SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_PERCENT'), '%'));
+
+ $podatekCelice['percent'][$cnt] = LatexDocument::encodeText($this->formatNumber(0, SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_PERCENT'), '%'));
}
}
// Povprecje
if($this->multiCrosstabClass->table_settings[$this->multiCrosstabClass->table_id]['avgVar'] > 0){
- //$podatekCelice = $this->formatNumber($avg, SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_AVERAGE'));
- //echo "Povprecje: ".$podatekCelice."</br>";
+
$podatekCelice['avg'][$cnt] = $this->formatNumber($avg, SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_AVERAGE'));
-/* $this->pdf->SetFillColor(220, 220, 255);
- $this->pdf->SetTextColor(0, 0, 230);
- $this->pdf->MultiCell($this->cellWidth, $lineHeight, $this->formatNumber($avg, SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_AVERAGE')), 1, 'C', 1, 0, 0 ,0, true);
- $this->pdf->SetFillColor(250, 250, 250);
- $this->pdf->SetTextColor(0, 0, 0);
-
- $this->pdf->setXY($this->pdf->getX() - $this->cellWidth, $this->pdf->getY() + $lineHeight); */
+
}
// Delez
if($this->multiCrosstabClass->table_settings[$this->multiCrosstabClass->table_id]['delezVar'] > 0){
- //$podatekCelice = $this->formatNumber($delez*100, SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_PERCENT'), '%');
- //echo "Delez: ".$podatekCelice."</br>";
- $podatekCelice['delez'][$cnt] = $this->encodeText($this->formatNumber($delez*100, SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_PERCENT'), '%'));
-/* $this->pdf->SetFillColor(255, 220, 220);
- $this->pdf->SetTextColor(230, 0, 0);
- $this->pdf->MultiCell($this->cellWidth, $lineHeight, $this->formatNumber($delez*100, SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_PERCENT'), '%'), 1, 'C', 1, 0, 0 ,0, true);
- $this->pdf->SetFillColor(250, 250, 250);
- $this->pdf->SetTextColor(0, 0, 0);
-
- $this->pdf->setXY($this->pdf->getX() - $this->cellWidth, $this->pdf->getY() + $lineHeight); */
+
+ $podatekCelice['delez'][$cnt] = LatexDocument::encodeText($this->formatNumber($delez*100, SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_PERCENT'), '%'));
+
}
- //$this->pdf->setXY($startX + $this->cellWidth, $startY);
return $podatekCelice;
}
@@ -1858,13 +1659,6 @@ class AnalizaMultiCrosstab extends LatexAnalysisElement {
return $result;
}
-/* function encodeText($text){
- // popravimo sumnike ce je potrebno
- $text = html_entity_decode($text, ENT_NOQUOTES, 'UTF-8');
- $text = str_replace(array("&scaron;","&#353;","&#269;"),array("š","š","č"),$text);
-
- return strip_tags($text);
- } */
/*Skrajsa tekst in doda '...' na koncu*/
function snippet($text='', $length=64, $tail="..."){
diff --git a/admin/survey/export/latexclasses/Analize/AnalizaSums.php b/admin/survey/export/latexclasses/Analize/AnalizaSums.php
index ca37139..2979f0d 100644
--- a/admin/survey/export/latexclasses/Analize/AnalizaSums.php
+++ b/admin/survey/export/latexclasses/Analize/AnalizaSums.php
@@ -1,5 +1,7 @@
<?php
+use Drupal\migrate\Plugin\migrate\id_map\NullIdMap;
+
global $site_path;
include_once('../../function.php');
@@ -8,37 +10,37 @@
include_once('../exportclases/class.pdfIzvozAnalizaFunctions.php');
require_once('../exportclases/class.enka.pdf.php'); */
- define("ALLOW_HIDE_ZERRO_REGULAR", false); // omogočimo delovanje prikazovanja/skrivanja ničelnih vnosti za navadne odgovore
- define("ALLOW_HIDE_ZERRO_MISSING", true); // omogočimo delovanje prikazovanja/skrivanja ničelnih vnosti za missinge
+ if(!defined("ALLOW_HIDE_ZERRO_REGULAR"))define("ALLOW_HIDE_ZERRO_REGULAR", false); // omogočimo delovanje prikazovanja/skrivanja ničelnih vnosti za navadne odgovore
+ if(!defined("ALLOW_HIDE_ZERRO_MISSING"))define("ALLOW_HIDE_ZERRO_MISSING", true); // omogočimo delovanje prikazovanja/skrivanja ničelnih vnosti za missinge
- define("NUM_DIGIT_AVERAGE", 2); // stevilo digitalnih mest za povprecje
- define("NUM_DIGIT_DEVIATION", 2); // stevilo digitalnih mest za povprecje
+ if(!defined("NUM_DIGIT_AVERAGE"))define("NUM_DIGIT_AVERAGE", 2); // stevilo digitalnih mest za povprecje
+ if(!defined("NUM_DIGIT_DEVIATION"))define("NUM_DIGIT_DEVIATION", 2); // stevilo digitalnih mest za povprecje
- define("M_ANALIZA_DESCRIPTOR", "descriptor");
- define("M_ANALIZA_FREQUENCY", "frequency");
+ if(!defined("M_ANALIZA_DESCRIPTOR"))define("M_ANALIZA_DESCRIPTOR", "descriptor");
+ if(!defined("M_ANALIZA_FREQUENCY"))define("M_ANALIZA_FREQUENCY", "frequency");
- define("FNT_FREESERIF", "freeserif");
- define("FNT_FREESANS", "freesans");
- define("FNT_HELVETICA", "helvetica");
+ if(!defined("FNT_FREESERIF"))define("FNT_FREESERIF", "freeserif");
+ if(!defined("FNT_FREESANS"))define("FNT_FREESANS", "freesans");
+ if(!defined("FNT_HELVETICA"))define("FNT_HELVETICA", "helvetica");
- define("FNT_MAIN_TEXT", FNT_FREESANS);
- define("FNT_QUESTION_TEXT", FNT_FREESANS);
- define("FNT_HEADER_TEXT", FNT_FREESANS);
+ if(!defined("FNT_MAIN_TEXT"))define("FNT_MAIN_TEXT", FNT_FREESANS);
+ if(!defined("FNT_QUESTION_TEXT"))define("FNT_QUESTION_TEXT", FNT_FREESANS);
+ if(!defined("FNT_HEADER_TEXT"))define("FNT_HEADER_TEXT", FNT_FREESANS);
- define("FNT_MAIN_SIZE", 10);
- define("FNT_QUESTION_SIZE", 9);
- define("FNT_HEADER_SIZE", 10);
+ if(!defined("FNT_MAIN_SIZE"))define("FNT_MAIN_SIZE", 10);
+ if(!defined("FNT_QUESTION_SIZE"))define("FNT_QUESTION_SIZE", 9);
+ if(!defined("FNT_HEADER_SIZE"))define("FNT_HEADER_SIZE", 10);
- define("RADIO_BTN_SIZE", 3);
- define("CHCK_BTN_SIZE", 3);
- define("LINE_BREAK", 6);
+ if(!defined("RADIO_BTN_SIZE"))define("RADIO_BTN_SIZE", 3);
+ if(!defined("CHCK_BTN_SIZE"))define("CHCK_BTN_SIZE", 3);
+ if(!defined("LINE_BREAK"))define("LINE_BREAK", 6);
- define ('PDF_MARGIN_HEADER', 8);
- define ('PDF_MARGIN_FOOTER', 12);
- define ('PDF_MARGIN_TOP', 18);
- define ('PDF_MARGIN_BOTTOM', 18);
- define ('PDF_MARGIN_LEFT', 15);
- define ('PDF_MARGIN_RIGHT', 15);
+ if(!defined("PDF_MARGIN_HEADER"))define ('PDF_MARGIN_HEADER', 8);
+ if(!defined("PDF_MARGIN_FOOTER"))define ('PDF_MARGIN_FOOTER', 12);
+ if(!defined("PDF_MARGIN_TOP"))define ('PDF_MARGIN_TOP', 18);
+ if(!defined("PDF_MARGIN_BOTTOM"))define ('PDF_MARGIN_BOTTOM', 18);
+ if(!defined("PDF_MARGIN_LEFT"))define ('PDF_MARGIN_LEFT', 15);
+ if(!defined("PDF_MARGIN_RIGHT"))define ('PDF_MARGIN_RIGHT', 15);
define ('MEJA_DOLZINA_VPRASANJA', 132);
@@ -165,7 +167,6 @@ class AnalizaSums extends LatexAnalysisElement{
//$vars_count = count(SurveyAnalysis::$_FILTRED_VARIABLES);
//$line_break = '';
- //echo "Spr tip v Sums: ".$spremenljivka['tip']."</br>";
switch ($spremenljivka['tip']) {
case 1:
# radio - prikaže navpično
@@ -203,11 +204,11 @@ class AnalizaSums extends LatexAnalysisElement{
break;
case 21: # besedilo*
- # varabla tipa »besedilo« je v sumarniku IDENTIČNA kot v FREKVENCAH.
+ # varabla tipa »besedilo« je v sumarniku IDENTIČNA kot v FREKVENCAH.
if ($spremenljivka['cnt_all'] == 1) {
// če je enodimenzionalna prikažemo kot frekvence
- // predvsem zaradi vprašanj tipa: language, email...
- $tabela .= self::sumTextVertical($spid,'sums', $export_format);
+ // predvsem zaradi vprašanj tipa: language, email...
+ $tabela .= self::sumTextVertical($spid,'sums', $export_format, $spremenljivka['tip']);
} else {
$tabela .= self::sumMultiText($spid,'sums', $export_format);
}
@@ -294,7 +295,7 @@ class AnalizaSums extends LatexAnalysisElement{
//zacetek latex tabele z obrobo za prvo tabelo
- $pdfTable = 'tabularx';
+ $pdfTable = 'xltabular';
$rtfTable = 'tabular';
$pdfTableWidth = 1;
$rtfTableWidth = 1;
@@ -308,15 +309,15 @@ class AnalizaSums extends LatexAnalysisElement{
/*Naslovni vrstici tabele*/
//prva vrstica tabele
- $dolzinaVprasanja = strlen($this->encodeText($spremenljivka['naslov']));
+ $dolzinaVprasanja = strlen(LatexDocument::encodeText($spremenljivka['naslov']));
//echo $dolzinaVprasanja."</br>";
if($dolzinaVprasanja > MEJA_DOLZINA_VPRASANJA){ //ce je dolzina vprasanja daljsa od ene vrstice v tabeli
- $tex .= $this->encodeText($spremenljivka['variable'])." & \multicolumn{5}{X|}{".$this->encodeText($spremenljivka['naslov'])."} ".$this->texNewLine;
+ $tex .= LatexDocument::encodeText($spremenljivka['variable'])." & \multicolumn{5}{X|}{".LatexDocument::encodeText($spremenljivka['naslov'])."} ".$this->texNewLine;
}else{
- $tex .= $this->encodeText($spremenljivka['variable'])." & \multicolumn{5}{l|}{".$this->encodeText($spremenljivka['naslov'])."} ".$this->texNewLine;
+ $tex .= LatexDocument::encodeText($spremenljivka['variable'])." & \multicolumn{5}{l|}{".LatexDocument::encodeText($spremenljivka['naslov'])."} ".$this->texNewLine;
}
- //$tex .= $this->encodeText($spremenljivka['variable'])." & \multicolumn{5}{>{\hsize=\dimexpr 6\hsize+\arrayrulewidth}X|}{".$this->encodeText($spremenljivka['naslov'])."} ".$this->texNewLine;
+ //$tex .= LatexDocument::encodeText($spremenljivka['variable'])." & \multicolumn{5}{>{\hsize=\dimexpr 6\hsize+\arrayrulewidth}X|}{".LatexDocument::encodeText($spremenljivka['naslov'])."} ".$this->texNewLine;
if($export_format != 'xls'){
$tex .= $this->horizontalLineTex; /*obroba*/
@@ -381,7 +382,7 @@ class AnalizaSums extends LatexAnalysisElement{
if (count(SurveyAnalysis::$_FREQUENCYS[$_sequence]['invalid'])> 0 ) {
$_Z_MV = !$this->hideEmpty;
if($_Z_MV){ //ce je potrebno izpisati tudi manjkajoce
- $tex .= $this->encodeText($lang['srv_anl_missing1']);
+ $tex .= LatexDocument::encodeText($lang['srv_anl_missing1']);
}
foreach (SurveyAnalysis::$_FREQUENCYS[$_sequence]['invalid'] AS $ikey => $iAnswer) {
//echo "iAnswer cnt: ".$iAnswer['cnt']."</br>";
@@ -409,7 +410,7 @@ class AnalizaSums extends LatexAnalysisElement{
}
//zaljucek latex tabele z obrobo za prvo tabelo
- $tex .= ($export_format == 'pdf' ? "\\end{tabularx}" : "\\end{tabular}");
+ $tex .= ($export_format == 'pdf' ? "\\end{xltabular}" : "\\end{tabular}");
//zaljucek latex tabele z obrobo za prvo tabelo - konec
/* odklon */
@@ -431,7 +432,7 @@ class AnalizaSums extends LatexAnalysisElement{
if ($show_valid_percent == 1 && SurveyAnalysis::$_HEADERS[$spid]['skala'] != 1) {
$brezHline = 1;
//zacetek latex tabele za drugo tabelo
- $pdfTable = 'tabularx';
+ $pdfTable = 'xltabular';
$rtfTable = 'tabular';
$pdfTableWidth = 1;
$rtfTableWidth = 1;
@@ -445,12 +446,12 @@ class AnalizaSums extends LatexAnalysisElement{
//$text[] = '';
//$text[] = '';
- $text[] = $this->encodeText($lang['srv_analiza_opisne_povprecje1']);
- $text[] = $this->encodeText(self::formatNumber($avg,NUM_DIGIT_AVERAGE,''));
+ $text[] = LatexDocument::encodeText($lang['srv_analiza_opisne_povprecje1']);
+ $text[] = LatexDocument::encodeText(self::formatNumber($avg,NUM_DIGIT_AVERAGE,''));
- $text[] = $this->encodeText($lang['srv_analiza_opisne_odklon']);
+ $text[] = LatexDocument::encodeText($lang['srv_analiza_opisne_odklon']);
- $text[] = $this->encodeText(self::formatNumber($div,NUM_DIGIT_AVERAGE,''));
+ $text[] = LatexDocument::encodeText(self::formatNumber($div,NUM_DIGIT_AVERAGE,''));
if($export_format == 'pdf'){
@@ -470,7 +471,7 @@ class AnalizaSums extends LatexAnalysisElement{
}
//zaljucek latex tabele z obrobo za drugo tabelo
- $tex .= ($export_format == 'pdf' ? "\\end{tabularx}" : "\\end{tabular}");
+ $tex .= ($export_format == 'pdf' ? "\\end{xltabular}" : "\\end{tabular}");
//zaljucek latex tabele z obrobo za drugo tabelo - konec
}
@@ -496,7 +497,9 @@ class AnalizaSums extends LatexAnalysisElement{
$tex = '';
$spremenljivka = SurveyAnalysis::$_HEADERS[$spid];
$_answersOther = array();
-
+ $_navedbe = array();
+ $_valid_cnt = array();
+ $_approp_cnt = array();
//TODO: Koda se nikjer ne uporablja
//$inline_legenda = count ($spremenljivka['grids']) > 1;
//if ($variable['other'] != '1' && $variable['text'] != '1') {
@@ -510,17 +513,18 @@ class AnalizaSums extends LatexAnalysisElement{
/* ugotovimo koliko imamo kolon*/
if (count($spremenljivka['grids']) > 0)
foreach ($spremenljivka['grids'] AS $gid => $grid) {
- $_clmn_cnt[$gid] = $grid['cnt_vars']-$grid['cnt_other'];
+ $_clmn_cnt[$gid] = $grid['cnt_vars']-(isset($grid['cnt_other']) ? $grid['cnt_other'] : 0);
if (count ($grid['variables']) > 0)
foreach ($grid['variables'] AS $vid => $variable) {
$_sequence = $variable['sequence'];
- $_valid_cnt[$gid] = max($_valid_cnt[$gid], SurveyAnalysis::$_FREQUENCYS[$_sequence]['validCnt']);
- $_approp_cnt[$gid] = max($_approp_cnt[$gid], SurveyAnalysis::$_FREQUENCYS[$_sequence]['allCnt']);
+ $_valid_cnt[$gid] = max(isset($_valid_cnt[$gid])?$_valid_cnt[$gid]:0, array_key_exists('validCnt', SurveyAnalysis::$_FREQUENCYS[$_sequence])?SurveyAnalysis::$_FREQUENCYS[$_sequence]['validCnt']:null);
+ $_approp_cnt[$gid] = max(isset($_approp_cnt[$gid])?$_approp_cnt[$gid]:0, SurveyAnalysis::$_FREQUENCYS[$_sequence]['allCnt']);
if ($variable['other'] == true) {
$_answersOther[] = array('spid'=>$spid,'gid'=>$gid,'vid'=>$vid,'sequence'=>$_sequence);
}
- $_valid[$gid][$vid] = SurveyAnalysis::$_FREQUENCYS[$_sequence]['valid'];
- $_navedbe[$gid] += SurveyAnalysis::$_FREQUENCYS[$_sequence]['valid']['1']['cnt'];
+ $_valid[$gid][$vid] = array_key_exists('valid', SurveyAnalysis::$_FREQUENCYS[$_sequence])?SurveyAnalysis::$_FREQUENCYS[$_sequence]['valid']:null;
+ //$_navedbe[$gid] += SurveyAnalysis::$_FREQUENCYS[$_sequence]['valid']['1']['cnt'];
+ $_navedbe[$gid] = isset($_navedbe[$gid])?$_navedbe[$gid]:0 + SurveyAnalysis::$_FREQUENCYS[$_sequence]['valid']['1']['cnt'];
}
}
@@ -544,7 +548,7 @@ class AnalizaSums extends LatexAnalysisElement{
//Priprava parametrov za tabelo - konec
//zacetek latex tabele z obrobo za prvo tabelo
- $pdfTable = 'tabularx';
+ $pdfTable = 'xltabular';
$rtfTable = 'tabular';
$pdfTableWidth = 1;
$rtfTableWidth = 1;
@@ -557,13 +561,13 @@ class AnalizaSums extends LatexAnalysisElement{
//zacetek latex tabele z obrobo za prvo tabelo - konec
//prva vrstica
- $dolzinaVprasanja = strlen($this->encodeText($spremenljivka['naslov']));
+ $dolzinaVprasanja = strlen(LatexDocument::encodeText($spremenljivka['naslov']));
if($dolzinaVprasanja > MEJA_DOLZINA_VPRASANJA){ //ce je dolzina vprasanja daljsa od ene vrstice v tabeli
- $tex .= $this->encodeText($spremenljivka['variable'])." & \multicolumn{8}{X|}{".$this->encodeText($spremenljivka['naslov'])."} ".$this->texNewLine;
+ $tex .= LatexDocument::encodeText($spremenljivka['variable'])." & \multicolumn{8}{X|}{".LatexDocument::encodeText($spremenljivka['naslov'])."} ".$this->texNewLine;
}
else{
- $tex .= $this->encodeText($spremenljivka['variable'])." & \multicolumn{8}{l|}{".$this->encodeText($spremenljivka['naslov'])."} ".$this->texNewLine;
+ $tex .= LatexDocument::encodeText($spremenljivka['variable'])." & \multicolumn{8}{l|}{".LatexDocument::encodeText($spremenljivka['naslov'])."} ".$this->texNewLine;
}
if($export_format != 'xls'){
@@ -571,7 +575,7 @@ class AnalizaSums extends LatexAnalysisElement{
}
//druga vrstica
- $tex .= " & ".$this->encodeText($lang['srv_analiza_opisne_subquestion1'])." & \multicolumn{5}{c|}{".$this->encodeText($lang['srv_analiza_opisne_units'])."} & \multicolumn{2}{c|}{".$this->encodeText($lang['srv_analiza_opisne_arguments'])."} ".$this->texNewLine;
+ $tex .= " & ".LatexDocument::encodeText($lang['srv_analiza_opisne_subquestion1'])." & \multicolumn{5}{c|}{".LatexDocument::encodeText($lang['srv_analiza_opisne_units'])."} & \multicolumn{2}{c|}{".LatexDocument::encodeText($lang['srv_analiza_opisne_arguments'])."} ".$this->texNewLine;
if($export_format != 'xls'){
$tex .= $this->horizontalLineTex; /*obroba*/
}
@@ -580,13 +584,13 @@ class AnalizaSums extends LatexAnalysisElement{
$text = array();
$text[] = '';
$text[] = '';
- $text[] = $this->encodeText($lang['srv_analiza_opisne_frequency']);
- $text[] = $this->encodeText($lang['srv_analiza_opisne_valid']);
- $text[] = $this->encodeText('% - '.$lang['srv_analiza_opisne_valid']);
- $text[] = $this->encodeText($lang['srv_analiza_num_units_valid']);
- $text[] = $this->encodeText('% - '.$lang['srv_analiza_num_units_valid']);
- $text[] = $this->encodeText($lang['srv_analiza_opisne_frequency']);
- $text[] = $this->encodeText('%');
+ $text[] = LatexDocument::encodeText($lang['srv_analiza_opisne_frequency']);
+ $text[] = LatexDocument::encodeText($lang['srv_analiza_opisne_valid']);
+ $text[] = LatexDocument::encodeText('% - '.$lang['srv_analiza_opisne_valid']);
+ $text[] = LatexDocument::encodeText($lang['srv_analiza_num_units_valid']);
+ $text[] = LatexDocument::encodeText('% - '.$lang['srv_analiza_num_units_valid']);
+ $text[] = LatexDocument::encodeText($lang['srv_analiza_opisne_frequency']);
+ $text[] = LatexDocument::encodeText('%');
$brezHline = $this->getBrezHline($export_format);
//echo "notnot: $brezHline </br>";
@@ -606,38 +610,38 @@ class AnalizaSums extends LatexAnalysisElement{
$text = array();
- $text[] = $this->encodeText($variable['variable']);
- $text[] = $this->encodeText($variable['naslov']);
+ $text[] = LatexDocument::encodeText($variable['variable']);
+ $text[] = LatexDocument::encodeText($variable['naslov']);
// Frekvence
- $text[] = $this->encodeText((int)SurveyAnalysis::$_FREQUENCYS[$_sequence]['valid']['1']['cnt']);
+ $text[] = LatexDocument::encodeText((int)SurveyAnalysis::$_FREQUENCYS[$_sequence]['valid']['1']['cnt']);
// Veljavni
- $text[] = $this->encodeText((int)(SurveyAnalysis::$_FREQUENCYS[$_sequence]['valid']['1']['cnt']+(int)SurveyAnalysis::$_FREQUENCYS[$_sequence]['valid']['0']['cnt']));
+ $text[] = LatexDocument::encodeText((int)(SurveyAnalysis::$_FREQUENCYS[$_sequence]['valid']['1']['cnt']+(int)SurveyAnalysis::$_FREQUENCYS[$_sequence]['valid']['0']['cnt']));
// Procent - veljavni
$_percent = (SurveyAnalysis::$_FREQUENCYS[$_sequence]['validCnt'] > 0 ) ? 100*SurveyAnalysis::$_FREQUENCYS[$_sequence]['valid']['1']['cnt'] / SurveyAnalysis::$_FREQUENCYS[$_sequence]['validCnt'] : 0;
- $text[] = $this->encodeText(self::formatNumber($_percent,SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_PERCENT'),'%'));
+ $text[] = LatexDocument::encodeText(self::formatNumber($_percent,SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_PERCENT'),'%'));
$_max_appropriate = max($_max_appropriate, (int)SurveyAnalysis::$_FREQUENCYS[$_sequence]['allCnt']);
$_max_valid = max ($_max_valid, ((int)(SurveyAnalysis::$_FREQUENCYS[$_sequence]['valid']['1']['cnt']+(int)SurveyAnalysis::$_FREQUENCYS[$_sequence]['valid']['0']['cnt'])));
// Ustrezni
- $text[] = $this->encodeText((int)SurveyAnalysis::$_FREQUENCYS[$_sequence]['allCnt']);
+ $text[] = LatexDocument::encodeText((int)SurveyAnalysis::$_FREQUENCYS[$_sequence]['allCnt']);
// % Ustrezni
$valid = (int)(SurveyAnalysis::$_FREQUENCYS[$_sequence]['valid']['1']['cnt']+(int)SurveyAnalysis::$_FREQUENCYS[$_sequence]['valid']['0']['cnt']);
$valid = (int)SurveyAnalysis::$_FREQUENCYS[$_sequence]['valid']['1']['cnt'];
$_percent = ($_max_appropriate > 0 ) ? 100*$valid / $_max_appropriate : 0;
- $text[] = $this->encodeText(self::formatNumber($_percent,SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_PERCENT'),'%'));
+ $text[] = LatexDocument::encodeText(self::formatNumber($_percent,SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_PERCENT'),'%'));
- $text[] = $this->encodeText(SurveyAnalysis::$_FREQUENCYS[$_sequence]['valid']['1']['cnt']);
+ $text[] = LatexDocument::encodeText(SurveyAnalysis::$_FREQUENCYS[$_sequence]['valid']['1']['cnt']);
$_percent = ($_navedbe[$gid] > 0 ) ? 100*SurveyAnalysis::$_FREQUENCYS[$_sequence]['valid']['1']['cnt'] / $_navedbe[$gid] : 0;
- $text[] = $this->encodeText(self::formatNumber($_percent,SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_PERCENT'),'%'));
+ $text[] = LatexDocument::encodeText(self::formatNumber($_percent,SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_PERCENT'),'%'));
$tex .= $this->tableRow($text, $brezHline); //izpis vrstic z odgovori
} else {
@@ -649,26 +653,26 @@ class AnalizaSums extends LatexAnalysisElement{
$text[] = '';
- $text[] = $this->encodeText($lang['srv_anl_suma_valid']);
+ $text[] = LatexDocument::encodeText($lang['srv_anl_suma_valid']);
$text[] = '';
- $text[] = $this->encodeText($_max_valid);
+ $text[] = LatexDocument::encodeText($_max_valid);
$text[] = '';
- $text[] = $this->encodeText($_max_appropriate);
+ $text[] = LatexDocument::encodeText($_max_appropriate);
$text[] = '';
- $text[] = $this->encodeText($_navedbe[$gid]);
+ $text[] = LatexDocument::encodeText($_navedbe[$gid]);
- $text[] = $this->encodeText(self::formatNumber('100',SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_PERCENT'),'%'));
+ $text[] = LatexDocument::encodeText(self::formatNumber('100',SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_PERCENT'),'%'));
$tex .= $this->tableRow($text, $brezHline); //izpis vrstice SKUPAJ
}
//zaljucek latex tabele z obrobo za prvo tabelo
- $tex .= ($export_format == 'pdf' ? "\\end{tabularx}" : "\\end{tabular}");
+ $tex .= ($export_format == 'pdf' ? "\\end{xltabular}" : "\\end{tabular}");
//zaljucek latex tabele z obrobo za prvo tabelo - konec
# izpišemo še tekstovne odgovore za polja drugo
@@ -716,7 +720,7 @@ class AnalizaSums extends LatexAnalysisElement{
//zacetek latex tabele z obrobo za prvo tabelo
- $pdfTable = 'tabularx';
+ $pdfTable = 'xltabular';
$rtfTable = 'tabular';
$pdfTableWidth = 1;
$rtfTableWidth = 1;
@@ -730,7 +734,7 @@ class AnalizaSums extends LatexAnalysisElement{
/*Naslovni vrstici tabele*/
//prva vrstica tabele
- $tex .= $this->encodeText($spremenljivka['variable'])." & ".$this->encodeText($spremenljivka['naslov'])." ".$this->texNewLine;
+ $tex .= LatexDocument::encodeText($spremenljivka['variable'])." & ".LatexDocument::encodeText($spremenljivka['naslov'])." ".$this->texNewLine;
if($export_format != 'xls'){
$tex .= $this->horizontalLineTex; /*obroba*/
}
@@ -741,8 +745,8 @@ class AnalizaSums extends LatexAnalysisElement{
/* $this->pdf->setFont('','b','6');
$this->pdf->ln(5);
- $this->pdf->MultiCell(18, 5, $this->encodeText($spremenljivka['variable']), 1, 'C', 0, 0, 0 ,0, true);
- $this->pdf->MultiCell(162, 5, $this->encodeText($spremenljivka['naslov']), 1, 'L', 0, 1, 0 ,0, true); */
+ $this->pdf->MultiCell(18, 5, LatexDocument::encodeText($spremenljivka['variable']), 1, 'C', 0, 0, 0 ,0, true);
+ $this->pdf->MultiCell(162, 5, LatexDocument::encodeText($spremenljivka['naslov']), 1, 'L', 0, 1, 0 ,0, true); */
//echo "Latex tabele: ".$tex."</br>";
return $tex;
}
@@ -756,7 +760,7 @@ class AnalizaSums extends LatexAnalysisElement{
global $lang;
$tex = '';
$spremenljivka = SurveyAnalysis::$_HEADERS[$spid];
-
+ $_approp_cnt = array();
# dodamo opcijo kje izrisujemo legendo
# če je besedilo * in je samo ena kategorija je inline legenda false
$inline_legenda = (SurveyAnalysis::$_HEADERS[$spid]['cnt_all'] == 1 || in_array($spremenljivka['tip'],array(1,8) ) ) ? false: true;
@@ -764,18 +768,18 @@ class AnalizaSums extends LatexAnalysisElement{
# ali izpisujemo enoto:
$show_enota = true;
- if ((int)$spremenljivka['enota'] == 0 && SurveyAnalysis::$_HEADERS[$spid]['cnt_all'] == 1) {
+ if ((int)isset($spremenljivka['enota'])?$spremenljivka['enota']:null == 0 && SurveyAnalysis::$_HEADERS[$spid]['cnt_all'] == 1) {
$show_enota = false;
}
# ugotovimo koliko imamo kolon
if (count($spremenljivka['grids']) > 0)
foreach ($spremenljivka['grids'] AS $gid => $grid) {
- $_clmn_cnt[$gid] = $grid['cnt_vars']-$grid['cnt_other'];
+ $_clmn_cnt[$gid] = $grid['cnt_vars']-(isset($grid['cnt_other']) ? $grid['cnt_other'] : 0);
if (count($grid['variables']) > 0)
foreach ($grid['variables'] AS $vid => $variable) {
$_sequence = $variable['sequence'];
- $_approp_cnt[$gid] = max($_approp_cnt[$gid], SurveyAnalysis::$_FREQUENCYS[$_sequence]['allCnt']);
+ $_approp_cnt[$gid] = max(isset($_approp_cnt[$gid])?$_approp_cnt[$gid]:null, SurveyAnalysis::$_FREQUENCYS[$_sequence]['allCnt']);
# za povprečje
$sum_xi_fi=0;
@@ -796,7 +800,7 @@ class AnalizaSums extends LatexAnalysisElement{
#povprečje
$avg = ($N > 0) ? $sum_xi_fi / $N : 0;
- $sum_avg += $avg;
+ //$sum_avg += $avg; //Pokomentiral, ker te spremenljivke se ne uporablja nikjer - Patrik
SurveyAnalysis::$_FREQUENCYS[$_sequence]['validAvg'] = $avg;
SurveyAnalysis::$_FREQUENCYS[$_sequence]['validMin'] = $min;
SurveyAnalysis::$_FREQUENCYS[$_sequence]['validMax'] = $max;
@@ -839,7 +843,7 @@ class AnalizaSums extends LatexAnalysisElement{
//Priprava parametrov za tabelo - konec
//zacetek latex tabele z obrobo za prvo tabelo
- $pdfTable = 'tabularx';
+ $pdfTable = 'xltabular';
$rtfTable = 'tabular';
$pdfTableWidth = 1;
$rtfTableWidth = 1;
@@ -853,15 +857,16 @@ class AnalizaSums extends LatexAnalysisElement{
//prva vrstica
$steviloPodStolpcev1 = $steviloStolpcevParameterTabular - 1;
- //$tex .= $this->encodeText($spremenljivka['variable'])." & \multicolumn{".$steviloPodStolpcev1."}{l|}{".$this->encodeText($spremenljivka['naslov'])."} ".$this->texNewLine;
- //$tex .= $this->encodeText($spremenljivka['variable'])." & \multicolumn{".$steviloPodStolpcev1."}{X|}{".$this->encodeText($spremenljivka['naslov'])."} ".$this->texNewLine;
- //$tex .= $this->encodeText($spremenljivka['variable']).' & \multicolumn{'.$steviloPodStolpcev1.'}{>{\hsize=\dimexpr '.($steviloPodStolpcev1+1).'\hsize + '.($steviloPodStolpcev1+1).'\tabcolsep + \arrayrulewidth}X|}{'.$this->encodeText($spremenljivka['naslov']).'} '.$this->texNewLine;
- $dolzinaVprasanja = strlen($this->encodeText($spremenljivka['naslov']));
+ //$tex .= LatexDocument::encodeText($spremenljivka['variable'])." & \multicolumn{".$steviloPodStolpcev1."}{l|}{".LatexDocument::encodeText($spremenljivka['naslov'])."} ".$this->texNewLine;
+ //$tex .= LatexDocument::encodeText($spremenljivka['variable'])." & \multicolumn{".$steviloPodStolpcev1."}{X|}{".LatexDocument::encodeText($spremenljivka['naslov'])."} ".$this->texNewLine;
+ //$tex .= LatexDocument::encodeText($spremenljivka['variable']).' & \multicolumn{'.$steviloPodStolpcev1.'}{>{\hsize=\dimexpr '.($steviloPodStolpcev1+1).'\hsize + '.($steviloPodStolpcev1+1).'\tabcolsep + \arrayrulewidth}X|}{'.LatexDocument::encodeText($spremenljivka['naslov']).'} '.$this->texNewLine;
+ $dolzinaVprasanja = strlen(LatexDocument::encodeText($spremenljivka['naslov']));
//echo $dolzinaVprasanja."</br>";
if($dolzinaVprasanja > MEJA_DOLZINA_VPRASANJA){ //ce je dolzina vprasanja daljsa od ene vrstice v tabeli
- $tex .= $this->encodeText($spremenljivka['variable'])." & \multicolumn{".$steviloPodStolpcev1."}{X|}{".$this->encodeText($spremenljivka['naslov'])."} ".$this->texNewLine;
+ //$tex .= LatexDocument::encodeText($spremenljivka['variable'])." & \multicolumn{".$steviloPodStolpcev1."}{X|}{".LatexDocument::encodeText($spremenljivka['naslov'])."} ".$this->texNewLine;
+ $tex .= LatexDocument::encodeText($spremenljivka['variable'])." & \multicolumn{".$steviloPodStolpcev1."}{p{16cm}|}{".LatexDocument::encodeText($spremenljivka['naslov'])."} ".$this->texNewLine;
}else{
- $tex .= $this->encodeText($spremenljivka['variable'])." & \multicolumn{".$steviloPodStolpcev1."}{l|}{".$this->encodeText($spremenljivka['naslov'])."} ".$this->texNewLine;
+ $tex .= LatexDocument::encodeText($spremenljivka['variable'])." & \multicolumn{".$steviloPodStolpcev1."}{l|}{".LatexDocument::encodeText($spremenljivka['naslov'])."} ".$this->texNewLine;
}
@@ -876,20 +881,20 @@ class AnalizaSums extends LatexAnalysisElement{
if ($show_enota) {
if ($spremenljivka['tip'] == 20 || $spremenljivka['tip'] == 7) {
- $text[] = $this->encodeText($lang['srv_analiza_opisne_subquestion1']);;
+ $text[] = LatexDocument::encodeText($lang['srv_analiza_opisne_subquestion1']);;
} else {
- $text[] = $this->encodeText($lang['srv_analiza_opisne_variable_text1']);
+ $text[] = LatexDocument::encodeText($lang['srv_analiza_opisne_variable_text1']);
}
} else {
$text[] = '';
}
- $text[] = $this->encodeText($lang['srv_analiza_opisne_m']);
- $text[] = $this->encodeText($lang['srv_analiza_num_units']);
- $text[] = $this->encodeText($lang['srv_analiza_opisne_povprecje1']);
- $text[] = $this->encodeText($lang['srv_analiza_opisne_odklon']);
- $text[] = $this->encodeText($lang['srv_analiza_opisne_min']);
- $text[] = $this->encodeText($lang['srv_analiza_opisne_max']);
+ $text[] = LatexDocument::encodeText($lang['srv_analiza_opisne_m']);
+ $text[] = LatexDocument::encodeText($lang['srv_analiza_num_units']);
+ $text[] = LatexDocument::encodeText($lang['srv_analiza_opisne_povprecje1']);
+ $text[] = LatexDocument::encodeText($lang['srv_analiza_opisne_odklon']);
+ $text[] = LatexDocument::encodeText($lang['srv_analiza_opisne_min']);
+ $text[] = LatexDocument::encodeText($lang['srv_analiza_opisne_max']);
$brezHline = $this->getBrezHline($export_format);
$tex .= $this->tableRow($text, $brezHline);
@@ -915,13 +920,13 @@ class AnalizaSums extends LatexAnalysisElement{
$text = array();
if ($spremenljivka['tip'] != 7 ) {
- $text[] = $this->encodeText($variable['variable']);
+ $text[] = LatexDocument::encodeText($variable['variable']);
}
else
$text[] = '';
if ($show_enota) {
- $text[] = $this->encodeText((count($grid['variables']) > 1 && $spremenljivka['tip'] == 20 ? $grid['naslov'] . ' - ' : '' ).$variable['naslov']);
+ $text[] = LatexDocument::encodeText((count($grid['variables']) > 1 && $spremenljivka['tip'] == 20 ? $grid['naslov'] . ' - ' : '' ).$variable['naslov']);
} else {
$text[] = '';;
}
@@ -947,7 +952,7 @@ class AnalizaSums extends LatexAnalysisElement{
}
//zaljucek latex tabele z obrobo za prvo tabelo
- $tex .= ($export_format == 'pdf' ? "\\end{tabularx}" : "\\end{tabular}");
+ $tex .= ($export_format == 'pdf' ? "\\end{xltabular}" : "\\end{tabular}");
//zaljucek latex tabele z obrobo za prvo tabelo - konec
# izpišemo še tekstovne odgovore za polja drugo
@@ -1013,7 +1018,7 @@ class AnalizaSums extends LatexAnalysisElement{
//Priprava parametrov za tabelo - konec
//zacetek latex tabele z obrobo za prvo tabelo
- $pdfTable = 'tabularx';
+ $pdfTable = 'xltabular';
$rtfTable = 'tabular';
$pdfTableWidth = 1;
$rtfTableWidth = 1;
@@ -1027,15 +1032,16 @@ class AnalizaSums extends LatexAnalysisElement{
/* prva vrstica */
$steviloPodStolpcev1 = $steviloStolpcevParameterTabular - 1;
- //$tex .= $this->encodeText($spremenljivka['variable'])." & \multicolumn{".$steviloPodStolpcev1."}{l|}{".$this->encodeText($spremenljivka['naslov'])."} ".$this->texNewLine;
- //$tex .= $this->encodeText($spremenljivka['variable'])." & \multicolumn{".$steviloPodStolpcev1."}{X|}{".$this->encodeText($spremenljivka['naslov'])."} ".$this->texNewLine;
- //$tex .= $this->encodeText($spremenljivka['variable']).' & \multicolumn{'.$steviloPodStolpcev1.'}{>{\hsize=\dimexpr '.($steviloPodStolpcev1+1).'\hsize + '.($steviloPodStolpcev1+1).'\tabcolsep + \arrayrulewidth}X|} {'.$this->encodeText($spremenljivka['naslov']).'} '.$this->texNewLine;
- $dolzinaVprasanja = strlen($this->encodeText($spremenljivka['naslov']));
+ //$tex .= LatexDocument::encodeText($spremenljivka['variable'])." & \multicolumn{".$steviloPodStolpcev1."}{l|}{".LatexDocument::encodeText($spremenljivka['naslov'])."} ".$this->texNewLine;
+ //$tex .= LatexDocument::encodeText($spremenljivka['variable'])." & \multicolumn{".$steviloPodStolpcev1."}{X|}{".LatexDocument::encodeText($spremenljivka['naslov'])."} ".$this->texNewLine;
+ //$tex .= LatexDocument::encodeText($spremenljivka['variable']).' & \multicolumn{'.$steviloPodStolpcev1.'}{>{\hsize=\dimexpr '.($steviloPodStolpcev1+1).'\hsize + '.($steviloPodStolpcev1+1).'\tabcolsep + \arrayrulewidth}X|} {'.LatexDocument::encodeText($spremenljivka['naslov']).'} '.$this->texNewLine;
+ $dolzinaVprasanja = strlen(LatexDocument::encodeText($spremenljivka['naslov']));
//echo $dolzinaVprasanja."</br>";
if($dolzinaVprasanja > MEJA_DOLZINA_VPRASANJA){ //ce je dolzina vprasanja daljsa od ene vrstice v tabeli
- $tex .= $this->encodeText($spremenljivka['variable'])." & \multicolumn{".$steviloPodStolpcev1."}{X|}{".$this->encodeText($spremenljivka['naslov'])."} ".$this->texNewLine;
+ //$tex .= LatexDocument::encodeText($spremenljivka['variable'])." & \multicolumn{".$steviloPodStolpcev1."}{X|}{".LatexDocument::encodeText($spremenljivka['naslov'])."} ".$this->texNewLine;
+ $tex .= LatexDocument::encodeText($spremenljivka['variable'])." & \multicolumn{".$steviloPodStolpcev1."}{p{16cm}|}{".LatexDocument::encodeText($spremenljivka['naslov'])."} ".$this->texNewLine;
}else{
- $tex .= $this->encodeText($spremenljivka['variable'])." & \multicolumn{".$steviloPodStolpcev1."}{l|}{".$this->encodeText($spremenljivka['naslov'])."} ".$this->texNewLine;
+ $tex .= LatexDocument::encodeText($spremenljivka['variable'])." & \multicolumn{".$steviloPodStolpcev1."}{l|}{".LatexDocument::encodeText($spremenljivka['naslov'])."} ".$this->texNewLine;
}
@@ -1045,28 +1051,28 @@ class AnalizaSums extends LatexAnalysisElement{
/* $this->pdf->setFont('','b','6');
$this->pdf->ln(5);
- $this->pdf->MultiCell(18, 5, $this->encodeText($spremenljivka['variable']), 1, 'C', 0, 0, 0 ,0, true);
- $this->pdf->MultiCell(162, 5, $this->encodeText($spremenljivka['naslov']), 1, 'L', 0, 1, 0 ,0, true); */
+ $this->pdf->MultiCell(18, 5, LatexDocument::encodeText($spremenljivka['variable']), 1, 'C', 0, 0, 0 ,0, true);
+ $this->pdf->MultiCell(162, 5, LatexDocument::encodeText($spremenljivka['naslov']), 1, 'L', 0, 1, 0 ,0, true); */
/* prva vrstica - konec */
/* druga vrstica */
$steviloPodStolpcev2 = count($spremenljivka['options']) + 1;
- $tex .= " & ".$this->encodeText($lang['srv_analiza_opisne_subquestion1'])." & \multicolumn{".$steviloPodStolpcev2."}{c|}{".$this->encodeText($lang['srv_analiza_opisne_answers'])."} ";
+ $tex .= " & ".LatexDocument::encodeText($lang['srv_analiza_opisne_subquestion1'])." & \multicolumn{".$steviloPodStolpcev2."}{c|}{".LatexDocument::encodeText($lang['srv_analiza_opisne_answers'])."} ";
-/* $this->pdf->MultiCell(18, 5, $this->encodeText(''), 1, 'L', 0, 0, 0 ,0, true);
- $this->pdf->MultiCell(30, 5, $this->encodeText($lang['srv_analiza_opisne_subquestion']), 1, 'C', 0, 0, 0 ,0, true);
- $this->pdf->MultiCell(72, 5, $this->encodeText($lang['srv_analiza_opisne_answers']), 1, 'C', 0, 0, 0 ,0, true); */
+/* $this->pdf->MultiCell(18, 5, LatexDocument::encodeText(''), 1, 'L', 0, 0, 0 ,0, true);
+ $this->pdf->MultiCell(30, 5, LatexDocument::encodeText($lang['srv_analiza_opisne_subquestion']), 1, 'C', 0, 0, 0 ,0, true);
+ $this->pdf->MultiCell(72, 5, LatexDocument::encodeText($lang['srv_analiza_opisne_answers']), 1, 'C', 0, 0, 0 ,0, true); */
$text = array();
if ($additional_field){
- $text[] = $this->encodeText($lang['srv_analiza_opisne_valid']);
- $text[] = $this->encodeText($lang['srv_analiza_num_units']);
- $text[] = $this->encodeText($lang['srv_analiza_opisne_povprecje1']);
- $text[] = $this->encodeText($lang['srv_analiza_opisne_odklon']);
+ $text[] = LatexDocument::encodeText($lang['srv_analiza_opisne_valid']);
+ $text[] = LatexDocument::encodeText($lang['srv_analiza_num_units']);
+ $text[] = LatexDocument::encodeText($lang['srv_analiza_opisne_povprecje1']);
+ $text[] = LatexDocument::encodeText($lang['srv_analiza_opisne_odklon']);
}
else{
- $text[] = $this->encodeText($lang['srv_analiza_opisne_valid']);
- $text[] = $this->encodeText($lang['srv_analiza_num_units']);
+ $text[] = LatexDocument::encodeText($lang['srv_analiza_opisne_valid']);
+ $text[] = LatexDocument::encodeText($lang['srv_analiza_num_units']);
}
//$tex .= $this->tableRow($text); //izpis ostalega dela vrstice $arrayText, $brezHline=0, $brezNoveVrstice=0, $nadaljevanjeVrstice=0
@@ -1114,7 +1120,7 @@ class AnalizaSums extends LatexAnalysisElement{
$tex .= $this->dynamicCells($textDynamicCells, $count); //izpis celic z odgovori v stolpcih (npr. Sploh ne velja, ...)
- $tex .= " & ".$this->encodeText($lang['srv_anl_suma1']); //Skupaj
+ $tex .= " & ".LatexDocument::encodeText($lang['srv_anl_suma1']); //Skupaj
/*zadnji stolpci po Skupaj*/
if ($additional_field){
@@ -1151,7 +1157,7 @@ class AnalizaSums extends LatexAnalysisElement{
if ($variable['other'] != true) {
// Ce gre za dvojno tabelo naredimo vrstico s naslovom podtabele
- if($spremenljivka['tip'] == 6 && $spremenljivka['enota'] == 3){
+ if(isset($spremenljivka['tip'])&&$spremenljivka['tip'] == 6 && isset($spremenljivka['enota'])&&$spremenljivka['enota'] == 3){
// Če začnemo z drugo podtabelo izpišemo vrstico z naslovom
if($podtabela != $grid['part']){
@@ -1160,9 +1166,9 @@ class AnalizaSums extends LatexAnalysisElement{
$subtitle = $subtitle == '' ? $lang['srv_grid_subtitle_def'].' '.$grid['part'] : $subtitle;
/* $this->pdf->setFont('','b','6');
- $this->pdf->MultiCell(180, $height_title, $this->encodeText($subtitle), 1, 'C', 0, 1, 0 ,0, true);
+ $this->pdf->MultiCell(180, $height_title, LatexDocument::encodeText($subtitle), 1, 'C', 0, 1, 0 ,0, true);
$this->pdf->setFont('','','6'); */
- $tex .= $this->encodeText($subtitle);
+ $tex .= LatexDocument::encodeText($subtitle);
$podtabela = $grid['part'];
}
@@ -1171,7 +1177,7 @@ class AnalizaSums extends LatexAnalysisElement{
if($variable['naslov'] == '')
$variable['naslov'] = '';
- /*$linecount = $this->pdf->getNumLines($this->encodeText($variable['naslov']), 30);
+ /*$linecount = $this->pdf->getNumLines(LatexDocument::encodeText($variable['naslov']), 30);
$linecount == 1 ? $height = 4.7 : $height = 4.7 + ($linecount-1)*3.3;*/
//ce smo na prelomu strani
@@ -1181,10 +1187,10 @@ class AnalizaSums extends LatexAnalysisElement{
$arrayParams['border'] .= 'T';
} */
-/* $this->pdf->MultiCell(18, $height, $this->encodeText($variable['variable']), 1, 'C', 0, 0, 0 ,0, true);
- $this->pdf->MultiCell(30, $height, $this->encodeText($variable['naslov']), 1, 'C', 0, 0, 0 ,0, true); */
- $tex .= $this->encodeText($variable['variable']);
- $tex .= " & ".$this->encodeText($variable['naslov']);
+/* $this->pdf->MultiCell(18, $height, LatexDocument::encodeText($variable['variable']), 1, 'C', 0, 0, 0 ,0, true);
+ $this->pdf->MultiCell(30, $height, LatexDocument::encodeText($variable['naslov']), 1, 'C', 0, 0, 0 ,0, true); */
+ $tex .= LatexDocument::encodeText($variable['variable']);
+ $tex .= " & ".LatexDocument::encodeText($variable['naslov']);
# za odklon in povprečje
@@ -1203,7 +1209,7 @@ class AnalizaSums extends LatexAnalysisElement{
$N += $fi;
}
- $_percent = (SurveyAnalysis::$_FREQUENCYS[$_sequence]['validCnt'] > 0 ) ? SurveyAnalysis::$_FREQUENCYS[$_sequence]['valid'][$key]['cnt'] * 100 / SurveyAnalysis::$_FREQUENCYS[$_sequence]['validCnt'] : 0;
+ $_percent = ((isset(SurveyAnalysis::$_FREQUENCYS[$_sequence]['validCnt'])?SurveyAnalysis::$_FREQUENCYS[$_sequence]['validCnt']:null) > 0 ) ? SurveyAnalysis::$_FREQUENCYS[$_sequence]['valid'][$key]['cnt'] * 100 / SurveyAnalysis::$_FREQUENCYS[$_sequence]['validCnt'] : 0;
$text[] = SurveyAnalysis::$_FREQUENCYS[$_sequence]['valid'][$key]['cnt'].' ('.self::formatNumber($_percent,SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_PERCENT'),'%').')';
@@ -1214,20 +1220,16 @@ class AnalizaSums extends LatexAnalysisElement{
$tex .= " & ".$this->dynamicCells($text, $count); //izpis celic z izracuni odgovorov v stolpcih (npr. Sploh ne velja, ...)
// suma
- $tex .= " & ".$this->encodeText((int)SurveyAnalysis::$_FREQUENCYS[$_sequence]['validCnt'].' ('.self::formatNumber(100,SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_PERCENT'),'%').')');
+ $tex .= " & ".LatexDocument::encodeText((int)(isset(SurveyAnalysis::$_FREQUENCYS[$_sequence]['validCnt'])?SurveyAnalysis::$_FREQUENCYS[$_sequence]['validCnt']:0).' ('.self::formatNumber(100,SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_PERCENT'),'%').')');
// zamenjano veljavni ustrezni
if ($additional_field){
-/* $this->pdf->MultiCell(15, $height, $this->encodeText(SurveyAnalysis::$_FREQUENCYS[$_sequence]['validCnt']), 1, 'C', 0, 0, 0 ,0, true);
- $this->pdf->MultiCell(15, $height, $this->encodeText(SurveyAnalysis::$_FREQUENCYS[$_sequence]['allCnt']), 1, 'C', 0, 0, 0 ,0, true); */
- $tex .= " & ".$this->encodeText(SurveyAnalysis::$_FREQUENCYS[$_sequence]['validCnt']);
- $tex .= " & ".$this->encodeText(SurveyAnalysis::$_FREQUENCYS[$_sequence]['allCnt']);
+ $tex .= " & ".LatexDocument::encodeText(isset(SurveyAnalysis::$_FREQUENCYS[$_sequence]['validCnt'])?SurveyAnalysis::$_FREQUENCYS[$_sequence]['validCnt']:0);
+ $tex .= " & ".LatexDocument::encodeText(SurveyAnalysis::$_FREQUENCYS[$_sequence]['allCnt']);
}
else{
-/* $this->pdf->MultiCell(30, $height, $this->encodeText(SurveyAnalysis::$_FREQUENCYS[$_sequence]['validCnt']), 1, 'C', 0, 0, 0 ,0, true);
- $this->pdf->MultiCell(30, $height, $this->encodeText(SurveyAnalysis::$_FREQUENCYS[$_sequence]['allCnt']), 1, 'C', 0, 1, 0 ,0, true); */
- $tex .= " & ".$this->encodeText(SurveyAnalysis::$_FREQUENCYS[$_sequence]['validCnt']);
- $tex .= " & ".$this->encodeText(SurveyAnalysis::$_FREQUENCYS[$_sequence]['allCnt']);
+ $tex .= " & ".LatexDocument::encodeText(SurveyAnalysis::$_FREQUENCYS[$_sequence]['validCnt']);
+ $tex .= " & ".LatexDocument::encodeText(SurveyAnalysis::$_FREQUENCYS[$_sequence]['allCnt']);
}
# za odklon in povprečje
@@ -1245,8 +1247,8 @@ class AnalizaSums extends LatexAnalysisElement{
}
$div = (($N -1) > 0) ? sqrt($sum_pow_xi_fi_avg / ($N -1)) : 0;
- $tex .= " & ".$this->encodeText(self::formatNumber($avg,SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_AVERAGE'),''));
- $tex .= " & ".$this->encodeText(self::formatNumber($div,SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_AVERAGE'),''));
+ $tex .= " & ".LatexDocument::encodeText(self::formatNumber($avg,SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_AVERAGE'),''));
+ $tex .= " & ".LatexDocument::encodeText(self::formatNumber($div,SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_AVERAGE'),''));
}
/*zakljucek vrstice*/
@@ -1265,7 +1267,7 @@ class AnalizaSums extends LatexAnalysisElement{
}
//zaljucek latex tabele z obrobo za prvo tabelo
- $tex .= ($export_format == 'pdf' ? "\\end{tabularx}" : "\\end{tabular}");
+ $tex .= ($export_format == 'pdf' ? "\\end{xltabular}" : "\\end{tabular}");
//zaljucek latex tabele z obrobo za prvo tabelo - konec
# izpišemo še tekstovne odgovore za polja drugo
@@ -1315,7 +1317,7 @@ class AnalizaSums extends LatexAnalysisElement{
//Priprava parametrov za tabelo - konec
//zacetek latex tabele z obrobo za tabelo z imenom vprasanja/spremenljivke in besedilom vprasanja
- $pdfTable = 'tabularx';
+ $pdfTable = 'xltabular';
$rtfTable = 'tabular';
$pdfTableWidth = 1;
$rtfTableWidth = 1;
@@ -1329,15 +1331,15 @@ class AnalizaSums extends LatexAnalysisElement{
/*Naslovna vrstica tabele*/
//prva vrstica tabele
- //$tex .= $this->encodeText($spremenljivka['variable'])." & \multicolumn{5}{l|}{".$this->encodeText($spremenljivka['naslov'])."} ".$this->texNewLine;
- //$tex .= $this->encodeText($spremenljivka['variable'])." & \multicolumn{5}{>{\hsize=\dimexpr 6\hsize+\arrayrulewidth}X|}{".$this->encodeText($spremenljivka['naslov'])."} ".$this->texNewLine;
- $tex .= $this->encodeText($spremenljivka['variable']).' & '.$this->encodeText($spremenljivka['naslov']).' '.$this->texNewLine;
+ //$tex .= LatexDocument::encodeText($spremenljivka['variable'])." & \multicolumn{5}{l|}{".LatexDocument::encodeText($spremenljivka['naslov'])."} ".$this->texNewLine;
+ //$tex .= LatexDocument::encodeText($spremenljivka['variable'])." & \multicolumn{5}{>{\hsize=\dimexpr 6\hsize+\arrayrulewidth}X|}{".LatexDocument::encodeText($spremenljivka['naslov'])."} ".$this->texNewLine;
+ $tex .= LatexDocument::encodeText($spremenljivka['variable']).' & '.LatexDocument::encodeText($spremenljivka['naslov']).' '.$this->texNewLine;
if($export_format != 'xls'){
$tex .= $this->horizontalLineTex; /*obroba*/
}
//zaljucek latex tabele z obrobo za tabelo z imenom vprasanja/spremenljivke in besedilom vprasanja
- $tex .= ($export_format == 'pdf' ? "\\end{tabularx}" : "\\end{tabular}");
+ $tex .= ($export_format == 'pdf' ? "\\end{xltabular}" : "\\end{tabular}");
//zaljucek latex tabele z obrobo za prvo tabelo - konec
#Priprava prve tabele, z imenom vprasanja/spremenljivke in besedilom vprasanja - konec #############################################
@@ -1365,7 +1367,7 @@ class AnalizaSums extends LatexAnalysisElement{
//Priprava parametrov za tabelo - konec
//zacetek latex tabele z obrobo za prvo tabelo
- $pdfTable = 'tabularx';
+ $pdfTable = 'xltabular';
$rtfTable = 'tabular';
$pdfTableWidth = 1;
$rtfTableWidth = 1;
@@ -1419,7 +1421,7 @@ class AnalizaSums extends LatexAnalysisElement{
if (count(SurveyAnalysis::$_FREQUENCYS[$_sequence]['invalid'])> 0 ) {
$_Z_MV = !$this->hideEmpty;
if($_Z_MV){ //ce je potrebno izpisati tudi manjkajoce
- $tex .= $this->encodeText($lang['srv_anl_missing1']);
+ $tex .= LatexDocument::encodeText($lang['srv_anl_missing1']);
}
foreach (SurveyAnalysis::$_FREQUENCYS[$_sequence]['invalid'] AS $ikey => $iAnswer) {
if ($iAnswer['cnt'] > 0 ) { # izpisujemo samo tiste ki nisno 0
@@ -1440,7 +1442,7 @@ class AnalizaSums extends LatexAnalysisElement{
}
}
//zaljucek latex tabele z obrobo za prvo tabelo
- $tex .= ($export_format == 'pdf' ? "\\end{tabularx}" : "\\end{tabular}");
+ $tex .= ($export_format == 'pdf' ? "\\end{xltabular}" : "\\end{tabular}");
//zaljucek latex tabele z obrobo za prvo tabelo - konec
#Priprava druge tabele, z odgovori - konec #############################################
@@ -1456,7 +1458,7 @@ class AnalizaSums extends LatexAnalysisElement{
return $tex;
}
- function sumTextVertical($spid=null, $_from=null, $export_format='') {
+ function sumTextVertical($spid=null, $_from=null, $export_format='', $spremTip=null) {
//echo "sumTextVertical </br>";
global $lang;
$tex = '';
@@ -1468,7 +1470,13 @@ class AnalizaSums extends LatexAnalysisElement{
$options=array('inline_legenda' => $inline_legenda, 'isTextAnswer' => false, 'isOtherAnswer' => false, 'textAnswerExceed' => false, 'exportFormat' => $export_format);
//Priprava parametrov za tabelo
- $steviloStolpcevParameterTabular = 6;
+ if($spremTip==21){
+ $steviloStolpcevParameterTabular = 2;
+ }else{
+ $steviloStolpcevParameterTabular = 6;
+ }
+
+
$steviloOstalihStolpcev = $steviloStolpcevParameterTabular - 1; /*stevilo stolpcev brez prvega stolpca, ki ima fiksno sirino*/
$sirinaOstalihStolpcev = 0.9/$steviloOstalihStolpcev;
$parameterTabular = '|';
@@ -1477,17 +1485,19 @@ class AnalizaSums extends LatexAnalysisElement{
//ce je prvi stolpec
if($i == 0){
$parameterTabular .= ($export_format == 'pdf' ? 'P|' : 'l|');
- //$parameterTabular .= ($export_format == 'pdf' ? 'X|' : 'l|');
}else{
+ if($spremTip!=21){ //ce ni samo besedilo
$parameterTabular .= ($export_format == 'pdf' ? '>{\hsize='.$sirinaOstalihStolpcev.'\hsize \centering\arraybackslash}X|' : 'c|'); /*sirina ostalih je odvisna od njihovega stevila, da se sirine razporedijo po celotni sirini tabele*/
- //$parameterTabular .= ($export_format == 'pdf' ? 'X|' : 'c|'); /*sirina ostalih je odvisna od njihovega stevila, da se sirine razporedijo po celotni sirini tabele*/
+ }else{
+ $parameterTabular .= ($export_format == 'pdf' ? '>{\hsize='.$sirinaOstalihStolpcev.'\hsize }X|' : 'l|');
+ }
}
}
//Priprava parametrov za tabelo - konec
//zacetek latex tabele z obrobo za prvo tabelo
- $pdfTable = 'tabularx';
+ $pdfTable = 'xltabular';
$rtfTable = 'tabular';
$pdfTableWidth = 1;
$rtfTableWidth = 1;
@@ -1501,15 +1511,19 @@ class AnalizaSums extends LatexAnalysisElement{
/*Naslovni vrstici tabele*/
//prva vrstica tabele
- //$tex .= $this->encodeText($spremenljivka['variable'])." & \multicolumn{5}{l|}{".$this->encodeText($spremenljivka['naslov'])."} ".$this->texNewLine;
- //$tex .= $this->encodeText($spremenljivka['variable'])." & \multicolumn{5}{X|}{".$this->encodeText($spremenljivka['naslov'])."} ".$this->texNewLine;
- //$tex .= $this->encodeText($spremenljivka['variable'])." & \multicolumn{5}{>{\hsize=\dimexpr 6\hsize+\arrayrulewidth}X|}{".$this->encodeText($spremenljivka['naslov'])."} ".$this->texNewLine;
- $dolzinaVprasanja = strlen($this->encodeText($spremenljivka['naslov']));
- //echo $dolzinaVprasanja."</br>";
- if($dolzinaVprasanja > MEJA_DOLZINA_VPRASANJA){ //ce je dolzina vprasanja daljsa od ene vrstice v tabeli
- $tex .= $this->encodeText($spremenljivka['variable'])." & \multicolumn{5}{X|}{".$this->encodeText($spremenljivka['naslov'])."} ".$this->texNewLine;
+ $dolzinaVprasanja = strlen(LatexDocument::encodeText($spremenljivka['naslov']));
+ if($dolzinaVprasanja > MEJA_DOLZINA_VPRASANJA){ //ce je dolzina vprasanja daljsa od ene vrstice v tabeli
+ if($spremTip==21){
+ $tex .= LatexDocument::encodeText($spremenljivka['variable'])." & ".LatexDocument::encodeText($spremenljivka['naslov'])." ".$this->texNewLine;
+ }else{
+ $tex .= LatexDocument::encodeText($spremenljivka['variable'])." & \multicolumn{5}{X|}{".LatexDocument::encodeText($spremenljivka['naslov'])."} ".$this->texNewLine;
+ }
}else{
- $tex .= $this->encodeText($spremenljivka['variable'])." & \multicolumn{5}{l|}{".$this->encodeText($spremenljivka['naslov'])."} ".$this->texNewLine;
+ if($spremTip==21){
+ $tex .= LatexDocument::encodeText($spremenljivka['variable'])." & ".LatexDocument::encodeText($spremenljivka['naslov'])." ".$this->texNewLine;
+ }else{
+ $tex .= LatexDocument::encodeText($spremenljivka['variable'])." & \multicolumn{5}{l|}{".LatexDocument::encodeText($spremenljivka['naslov'])."} ".$this->texNewLine;
+ }
}
@@ -1518,10 +1532,11 @@ class AnalizaSums extends LatexAnalysisElement{
}
//druga vrstica tabele z naslovi stolpcev
- $tex .= $this->tableHeader($export_format);
+ if($spremTip!=21){ //ce ni samo besedilo
+ $tex .= $this->tableHeader($export_format);
+ }
/*Naslovni vrstici tabele - konec*/
-
$_answersOther = array();
$_grids_count = count($spremenljivka['grids']);
if ($_grids_count > 0)
@@ -1539,58 +1554,55 @@ class AnalizaSums extends LatexAnalysisElement{
$maxAnswer = (SurveyDataSettingProfiles :: getSetting('numOpenAnswers') > 0) ? SurveyDataSettingProfiles :: getSetting('numOpenAnswers') : 30;
$counter = 0;
$_kumulativa = 0;
- //SurveyAnalysis::$_FREQUENCYS[$_sequence]
- if (count(SurveyAnalysis::$_FREQUENCYS[$_sequence]['valid'])> 0 ) {
+ $freq_seq = array_key_exists('valid', SurveyAnalysis::$_FREQUENCYS[$_sequence])?SurveyAnalysis::$_FREQUENCYS[$_sequence]:null;
+ if (is_countable($freq_seq)&&count($freq_seq)> 0 ) {
foreach (SurveyAnalysis::$_FREQUENCYS[$_sequence]['valid'] AS $vkey => $vAnswer) {
- if (/*$vAnswer['cnt'] > 0 &&*/ $counter < $maxAnswer) { # izpisujemo samo tiste ki nisno 0
+ if ($counter < $maxAnswer) { # izpisujemo samo tiste ki nisno 0
# ali prikažemo vse odgovore ali pa samo toliko koliko je nastavljeno v TEXT_ANSWER_LIMIT
$textAnswerExceed = ($counter >= TEXT_ANSWER_LIMIT && count(SurveyAnalysis::$_FREQUENCYS[$_sequence]['valid']) > TEXT_ANSWER_LIMIT+2) ? true : false; # ali začnemo skrivati tekstovne odgovore
$options['isTextAnswer']=true;
$options['textAnswerExceed'] = $textAnswerExceed;
- /*$counter = self::outputValidAnswerVertical($counter,$vkey,$vAnswer,$_sequence,$spid,$_kumulativa,$options);*/
- $tex .= self::outputValidAnswerVertical($counter,$vkey,$vAnswer,$_sequence,$spid,$_kumulativa,$options);
+ $tex .= self::outputValidAnswerVertical($counter,$vkey,$vAnswer,$_sequence,$spid,$_kumulativa,$options, $spremTip);
}
$counter++;
}
# izpišemo sumo veljavnih
- /*$counter = self::outputSumaValidAnswerVertical($counter,$_sequence,$spid,$options);*/
- $tex .= self::outputSumaValidAnswerVertical($counter,$_sequence,$spid,$options);
- }
- if (count(SurveyAnalysis::$_FREQUENCYS[$_sequence]['invalid'])> 0 ) {
- $_Z_MV = !$this->hideEmpty;
- if($_Z_MV){ //ce je potrebno izpisati tudi manjkajoce
- $tex .= $this->encodeText($lang['srv_anl_missing1']);
+ if($spremTip!=21){ //ce ni samo besedilo
+ $tex .= self::outputSumaValidAnswerVertical($counter,$_sequence,$spid,$options);
}
- foreach (SurveyAnalysis::$_FREQUENCYS[$_sequence]['invalid'] AS $ikey => $iAnswer) {
- if ($iAnswer['cnt'] > 0 ) { # izpisujemo samo tiste ki nisno 0
- /*$counter = self::outputInvalidAnswerVertical($counter,$ikey,$iAnswer,$_sequence,$spid,$options);*/
- $tex .= self::outputInvalidAnswerVertical($counter,$ikey,$iAnswer,$_sequence,$spid,$options);
+ }
+ if($spremTip!=21){ //ce ni samo besedilo
+ if (count(SurveyAnalysis::$_FREQUENCYS[$_sequence]['invalid'])> 0 ) {
+ $_Z_MV = !$this->hideEmpty;
+ if($_Z_MV){ //ce je potrebno izpisati tudi manjkajoce
+ $tex .= LatexDocument::encodeText($lang['srv_anl_missing1']);
}
+ foreach (SurveyAnalysis::$_FREQUENCYS[$_sequence]['invalid'] AS $ikey => $iAnswer) {
+ if ($iAnswer['cnt'] > 0 ) { # izpisujemo samo tiste ki nisno 0
+ $tex .= self::outputInvalidAnswerVertical($counter,$ikey,$iAnswer,$_sequence,$spid,$options);
+ }
+ }
+ # izpišemo sumo veljavnih
+ $tex .= self::outputSumaInvalidAnswerVertical($counter,$_sequence,$spid,$options);
}
- # izpišemo sumo veljavnih
- /*$counter = self::outputSumaInvalidAnswerVertical($counter,$_sequence,$spid,$options);*/
- $tex .= self::outputSumaInvalidAnswerVertical($counter,$_sequence,$spid,$options);
+ #izpišemo še skupno sumo
+ $tex .= self::outputSumaVertical($counter,$_sequence,$spid,$options);
}
- #izpišemo še skupno sumo
- /*$counter = self::outputSumaVertical($counter,$_sequence,$spid,$options);*/
- $tex .= self::outputSumaVertical($counter,$_sequence,$spid,$options);
} else {
$_answersOther[] = array('spid'=>$spid,'gid'=>$gid,'vid'=>$vid,'sequence'=>$_sequence);
}
}
}
//zaljucek latex tabele z obrobo za prvo tabelo
- $tex .= ($export_format == 'pdf' ? "\\end{tabularx}" : "\\end{tabular}");
+ $tex .= ($export_format == 'pdf' ? "\\end{xltabular}" : "\\end{tabular}");
//zaljucek latex tabele z obrobo za prvo tabelo - konec
-
+
# izpišemo še tekstovne odgovore za polja drugo
if (count($_answersOther) > 0 && self::$_FILTRED_OTHER) {
foreach ($_answersOther AS $oAnswers) {
- /*self::outputOtherAnswers($oAnswers);*/
$tex .= self::outputOtherAnswers($oAnswers, $parameterTabular, $export_format);
}
}
-
return $tex;
}
@@ -1616,7 +1628,7 @@ class AnalizaSums extends LatexAnalysisElement{
$_answers = SurveyAnalysis::getAnswers($spremenljivka,$num_show_records);
$_all_valid_answers_cnt = $_answers['validCnt'];
- $_valid_answers = $_answers['valid'];
+ $_valid_answers = isset($_answers['valid'])?$_answers['valid']:null;
$_answersOther = array();
@@ -1639,7 +1651,7 @@ class AnalizaSums extends LatexAnalysisElement{
$text[] = $_col['naslov'];
}
else {
- $_answersOther[] = array('spid'=>$spid,'gid'=>$gid,'vid'=>$vid,'sequence'=>$_sequence);
+ $_answersOther[] = array('spid'=>$spid,'gid'=>isset($gid)?$gid:0,'vid'=>isset($vid)?$vid:0,'sequence'=>$_sequence);
}
$count++;
@@ -1666,7 +1678,7 @@ class AnalizaSums extends LatexAnalysisElement{
/*Priprava parametrov za tabelo in ostala polja za nadaljnji izpis - konec*/
//zacetek latex tabele z obrobo za prvo tabelo
- $pdfTable = 'tabularx';
+ $pdfTable = 'xltabular';
$rtfTable = 'tabular';
$pdfTableWidth = 1;
$rtfTableWidth = 1;
@@ -1683,15 +1695,12 @@ class AnalizaSums extends LatexAnalysisElement{
/*prva vrstica*/
$steviloPodStolpcev1 = $steviloStolpcevParameterTabular - 1;
- //$tex .= $this->encodeText($spremenljivka['variable'])." & \multicolumn{".$steviloPodStolpcev1."}{l|}{".$this->encodeText($spremenljivka['naslov'])."} ".$this->texNewLine;
- //$tex .= $this->encodeText($spremenljivka['variable'])." & \multicolumn{".$steviloPodStolpcev1."}{X|}{".$this->encodeText($spremenljivka['naslov'])."} ".$this->texNewLine;
- //$tex .= $this->encodeText($spremenljivka['variable']).' & \multicolumn{'.$steviloPodStolpcev1.'}{>{\hsize=\dimexpr '.($steviloPodStolpcev1+1).'\hsize + '.($steviloPodStolpcev1+1).'\tabcolsep + \arrayrulewidth}X|}{'.$this->encodeText($spremenljivka['naslov']).'} '.$this->texNewLine;
- $dolzinaVprasanja = strlen($this->encodeText($spremenljivka['naslov']));
+ $dolzinaVprasanja = strlen(LatexDocument::encodeText($spremenljivka['naslov']));
//echo $dolzinaVprasanja."</br>";
if($dolzinaVprasanja > MEJA_DOLZINA_VPRASANJA){ //ce je dolzina vprasanja daljsa od ene vrstice v tabeli
- $tex .= $this->encodeText($spremenljivka['variable'])." & \multicolumn{".$steviloPodStolpcev1."}{X|}{".$this->encodeText($spremenljivka['naslov'])."} ".$this->texNewLine;
+ $tex .= LatexDocument::encodeText($spremenljivka['variable'])." & \multicolumn{".$steviloPodStolpcev1."}{p{16cm}|}{".LatexDocument::encodeText($spremenljivka['naslov'])."} ".$this->texNewLine;
}else{
- $tex .= $this->encodeText($spremenljivka['variable'])." & \multicolumn{".$steviloPodStolpcev1."}{l|}{".$this->encodeText($spremenljivka['naslov'])."} ".$this->texNewLine;
+ $tex .= LatexDocument::encodeText($spremenljivka['variable'])." & \multicolumn{".$steviloPodStolpcev1."}{l|}{".LatexDocument::encodeText($spremenljivka['naslov'])."} ".$this->texNewLine;
}
if($export_format != 'xls'){
@@ -1701,17 +1710,7 @@ class AnalizaSums extends LatexAnalysisElement{
if ($_grids_count > 0) {
$height = 0;
-/* // Testiramo visino vrstice glede na najdaljsi text
- foreach ($text AS $string){
- $singleWidth = ($count > 0) ? round(162 / $count): 162;
- //$height = ($this->getCellHeight($string, $singleWidth) > $height) ? $this->getCellHeight($string, $singleWidth) : $height;
- $height = 1;
- } */
-
- /*$this->pdf->MultiCell(18, $height, $this->encodeText(''), 1, 'C', 0, 0, 0 ,0, true);*/
-
- /*$this->dynamicCells($text, $count, 162, $height);*/
- /*$this->pdf->ln($height);*/
+
/*druga vrstica*/
$brezHline3 = 1;
$brezNoveVrstice3 = 1;
@@ -1743,7 +1742,7 @@ class AnalizaSums extends LatexAnalysisElement{
$_max_i = 0;
foreach ($grid['variables'] AS $vid => $variable ){
$_sequence = $variable['sequence']; # id kolone z podatki
- $_max_i = max($_max_i,min($num_show_records,SurveyAnalysis::$_FREQUENCYS[$_sequence]['validCnt']));
+ $_max_i = max($_max_i,min($num_show_records,(isset(SurveyAnalysis::$_FREQUENCYS[$_sequence]['validCnt'])?SurveyAnalysis::$_FREQUENCYS[$_sequence]['validCnt']:null)));
}
# za barvanje
@@ -1759,7 +1758,7 @@ class AnalizaSums extends LatexAnalysisElement{
# tabela z navedbami
$index=0;
# odvisno ali imamo odgovor
- if (count($_valid_answers) > 0) {
+ if (is_countable($_valid_answers) && count($_valid_answers) > 0) {
$text2 = '(';
foreach ($_valid_answers AS $answer) {
@@ -1771,7 +1770,7 @@ class AnalizaSums extends LatexAnalysisElement{
if($enota == 3)
$text2 .= $_ans."), (";
else
- $answers[$count][$index]='('.$this->encodeText($_ans).')';
+ $answers[$count][$index]='('.LatexDocument::encodeText($_ans).')';
}
$index++;
@@ -1790,40 +1789,38 @@ class AnalizaSums extends LatexAnalysisElement{
$last = $_max_i;
}
- if($enota != 3){
- for($i=0; $i<sizeof($answers[0]); $i++){
- $row = array();
- for($j=0; $j<$count; $j++){
- // Testiramo visino vrstice glede na najdaljsi text
- $singleWidth = ($count > 0) ? round(162 / $count): 162;
- //$height = ($this->getCellHeight($answers[$j][$i], $singleWidth) > $height) ? $this->getCellHeight($answers[$j][$i], $singleWidth) : $height;
- $height = 1;
- $row[$j] = $answers[$j][$i];
- }
-
-
- //$tex .= " & ".$this->dynamicCells($text, $count); //izpis celic z izracuni odgovorov v stolpcih (npr. Sploh ne velja, ...)
- $tex .= $this->sumLokacijaRowOutput($row, $count, $height, $grid['variable']);
- /*$this->sumLokacijaRowOutput($row, $count, $height, $grid['variable']);*/
-
- $tex .= $this->texNewLine; //nova vrstica
- if($export_format != 'xls'){
- $tex .= $this->horizontalLineTex; /*horizontalna crta*/
- }
- }
- }
- else{
- // Testiramo visino vrstice glede na najdaljsi text
- foreach ($text AS $string){
- $singleWidth = ($count > 0) ? round(162 / $count): 162;
- //$height = ($this->getCellHeight($string, $singleWidth) > $height) ? $this->getCellHeight($string, $singleWidth) : $height;
- $height = 1;
- }
-
- //$tex .= " & ".$this->dynamicCells($text, $count); //izpis celic z izracuni odgovorov v stolpcih (npr. Sploh ne velja, ...)
- $tex .= $this->sumLokacijaRowOutput($text, $count, $height, $grid['variable']);
- /*$this->sumLokacijaRowOutput($text, $count, $height, $grid['variable']);*/
- }
+ if($enota != 3){
+ for($i=0; $i<sizeof(isset($answers[0])?$answers[0]:array()); $i++){
+ $row = array();
+ for($j=0; $j<$count; $j++){
+ // Testiramo visino vrstice glede na najdaljsi text
+ $singleWidth = ($count > 0) ? round(162 / $count): 162;
+ //$height = ($this->getCellHeight($answers[$j][$i], $singleWidth) > $height) ? $this->getCellHeight($answers[$j][$i], $singleWidth) : $height;
+ $height = 1;
+ $row[$j] = $answers[$j][$i];
+ }
+
+
+ //$tex .= " & ".$this->dynamicCells($text, $count); //izpis celic z izracuni odgovorov v stolpcih (npr. Sploh ne velja, ...)
+ $tex .= $this->sumLokacijaRowOutput($row, $count, $height, $variable['variable']);
+
+ $tex .= $this->texNewLine; //nova vrstica
+ if($export_format != 'xls'){
+ $tex .= $this->horizontalLineTex; /*horizontalna crta*/
+ }
+ }
+ }
+ else{
+ // Testiramo visino vrstice glede na najdaljsi text
+ foreach ($text AS $string){
+ $singleWidth = ($count > 0) ? round(162 / $count): 162;
+ //$height = ($this->getCellHeight($string, $singleWidth) > $height) ? $this->getCellHeight($string, $singleWidth) : $height;
+ $height = 1;
+ }
+
+ //$tex .= " & ".$this->dynamicCells($text, $count); //izpis celic z izracuni odgovorov v stolpcih (npr. Sploh ne velja, ...)
+ $tex .= $this->sumLokacijaRowOutput($text, $count, $height, $variable['variable']);
+ }
/*zakljucek vrstice s podatki*/
/* $tex .= $this->texNewLine; //nova vrstica
$tex .= $this->horizontalLineTex; //horizontalna crta */
@@ -1832,7 +1829,7 @@ class AnalizaSums extends LatexAnalysisElement{
//zaljucek latex tabele z obrobo
- $tex .= ($export_format == 'pdf' ? "\\end{tabularx}" : "\\end{tabular}");
+ $tex .= ($export_format == 'pdf' ? "\\end{xltabular}" : "\\end{tabular}");
//zaljucek latex tabele z obrobo - konec
}
//echo "tex: ".$tex."</br>";
@@ -1847,10 +1844,10 @@ class AnalizaSums extends LatexAnalysisElement{
* @param type $height - izracunana najvisja visina celice v vrstici
* @param type $variable - array variabel/stolpcev
*/
- function sumLokacijaRowOutput($text='', $count, $height=null, $variable='') {
+ function sumLokacijaRowOutput($text='', $count=null, $height=null, $variable='') {
$texSumLokacijaRowOutput = '';
- $texSumLokacijaRowOutput .= " & ".$this->encodeText($variable);
-/* $this->pdf->MultiCell(18, $height, $this->encodeText($variable), 1, 'C', 0, 0, 0 ,0, true);
+ $texSumLokacijaRowOutput .= " & ".LatexDocument::encodeText($variable);
+/* $this->pdf->MultiCell(18, $height, LatexDocument::encodeText($variable), 1, 'C', 0, 0, 0 ,0, true);
$this->dynamicCells($text, $count, 162, $height);
$this->pdf->ln($height); */
$texSumLokacijaRowOutput .= $this->dynamicCells($text, $count);
@@ -1862,7 +1859,7 @@ class AnalizaSums extends LatexAnalysisElement{
*
* @param unknown_type $spid
*/
- function sumMultiText($spid=null, $_from, $export_format='') {
+ function sumMultiText($spid=null, $_from=null, $export_format='') {
//echo "sumMultiText </br>";
global $lang;
$tex = '';
@@ -1914,7 +1911,7 @@ class AnalizaSums extends LatexAnalysisElement{
$text[] = $_col['naslov'];
}
else {
- $_answersOther[] = array('spid'=>$spid,'gid'=>$gid,'vid'=>$vid,'sequence'=>$_sequence);
+ $_answersOther[] = array('spid'=>$spid,'gid'=>isset($gid)?$gid:0,'vid'=>isset($vid)?$vid:0,'sequence'=>$_sequence);
}
$count++;
@@ -1941,7 +1938,7 @@ class AnalizaSums extends LatexAnalysisElement{
//zacetek latex tabele z obrobo za prvo tabelo
- $pdfTable = 'tabularx';
+ $pdfTable = 'xltabular';
$rtfTable = 'tabular';
$pdfTableWidth = 1;
$rtfTableWidth = 1;
@@ -1956,16 +1953,17 @@ class AnalizaSums extends LatexAnalysisElement{
/*Naslovni vrstici tabele*/
//prva vrstica tabele
$steviloPodStolpcev1 = $steviloStolpcevParameterTabular - 1;
- //$tex .= $this->encodeText($spremenljivka['variable'])." & \multicolumn{".$steviloPodStolpcev1."}{l|}{".$this->encodeText($spremenljivka['naslov'])."} ".$this->texNewLine;
- //$tex .= $this->encodeText($spremenljivka['variable'])." & \multicolumn{".$steviloPodStolpcev1."}{X|}{".$this->encodeText($spremenljivka['naslov'])."} ".$this->texNewLine;
- //$tex .= $this->encodeText($spremenljivka['variable']).' & \multicolumn{'.$steviloPodStolpcev1.'}{>{\hsize=\dimexpr '.($steviloPodStolpcev1+1).'\hsize + '.($steviloPodStolpcev1+1).'\tabcolsep + \arrayrulewidth}X|}{'.$this->encodeText($spremenljivka['naslov']).'} '.$this->texNewLine;
+ //$tex .= LatexDocument::encodeText($spremenljivka['variable'])." & \multicolumn{".$steviloPodStolpcev1."}{l|}{".LatexDocument::encodeText($spremenljivka['naslov'])."} ".$this->texNewLine;
+ //$tex .= LatexDocument::encodeText($spremenljivka['variable'])." & \multicolumn{".$steviloPodStolpcev1."}{X|}{".LatexDocument::encodeText($spremenljivka['naslov'])."} ".$this->texNewLine;
+ //$tex .= LatexDocument::encodeText($spremenljivka['variable']).' & \multicolumn{'.$steviloPodStolpcev1.'}{>{\hsize=\dimexpr '.($steviloPodStolpcev1+1).'\hsize + '.($steviloPodStolpcev1+1).'\tabcolsep + \arrayrulewidth}X|}{'.LatexDocument::encodeText($spremenljivka['naslov']).'} '.$this->texNewLine;
- $dolzinaVprasanja = strlen($this->encodeText($spremenljivka['naslov']));
+ $dolzinaVprasanja = strlen(LatexDocument::encodeText($spremenljivka['naslov']));
//echo $dolzinaVprasanja."</br>";
if($dolzinaVprasanja > MEJA_DOLZINA_VPRASANJA){ //ce je dolzina vprasanja daljsa od ene vrstice v tabeli
- $tex .= $this->encodeText($spremenljivka['variable'])." & \multicolumn{".$steviloPodStolpcev1."}{X|}{".$this->encodeText($spremenljivka['naslov'])."} ".$this->texNewLine;
+ $tex .= LatexDocument::encodeText($spremenljivka['variable'])." & \multicolumn{".$steviloPodStolpcev1."}{X|}{".LatexDocument::encodeText($spremenljivka['naslov'])."} ".$this->texNewLine;
+ //$tex .= LatexDocument::encodeText($spremenljivka['variable'])." & \multicolumn{".$steviloPodStolpcev1."}{p{16cm}|}{".LatexDocument::encodeText($spremenljivka['naslov'])."} ".$this->texNewLine;
}else{
- $tex .= $this->encodeText($spremenljivka['variable'])." & \multicolumn{".$steviloPodStolpcev1."}{l|}{".$this->encodeText($spremenljivka['naslov'])."} ".$this->texNewLine;
+ $tex .= LatexDocument::encodeText($spremenljivka['variable'])." & \multicolumn{".$steviloPodStolpcev1."}{l|}{".LatexDocument::encodeText($spremenljivka['naslov'])."} ".$this->texNewLine;
}
@@ -1974,7 +1972,7 @@ class AnalizaSums extends LatexAnalysisElement{
}
//druga vrstica
- $tex .= " & ".$this->encodeText($lang['srv_analiza_opisne_subquestion1'])." & \multicolumn{".$count."}{c|}{".$this->encodeText($lang['srv_analiza_opisne_arguments'])."} ".$this->texNewLine;
+ $tex .= " & ".LatexDocument::encodeText($lang['srv_analiza_opisne_subquestion1'])." & \multicolumn{".$count."}{c|}{".LatexDocument::encodeText($lang['srv_analiza_opisne_arguments'])."} ".$this->texNewLine;
if($export_format != 'xls'){
$tex .= $this->horizontalLineTex; /*obroba*/
}
@@ -2021,7 +2019,7 @@ class AnalizaSums extends LatexAnalysisElement{
$_max_i = 0;
foreach ($grid['variables'] AS $vid => $variable ){
$_sequence = $variable['sequence']; # id kolone z podatki
- $_max_i = max($_max_i,min($num_show_records,SurveyAnalysis::$_FREQUENCYS[$_sequence]['validCnt']));
+ $_max_i = max($_max_i,min($num_show_records,(isset(SurveyAnalysis::$_FREQUENCYS[$_sequence]['validCnt'])?SurveyAnalysis::$_FREQUENCYS[$_sequence]['validCnt']:null)));
}
# za barvanje
@@ -2066,8 +2064,8 @@ class AnalizaSums extends LatexAnalysisElement{
$height = 1;
}
- $tex .= $this->encodeText($grid['variable']);
- $tex .= " & ".$this->encodeText($grid['naslov']);
+ $tex .= LatexDocument::encodeText(isset($grid['variable'])?$grid['variable']:'');
+ $tex .= " & ".LatexDocument::encodeText($grid['naslov']);
$tex .= " & ".$this->dynamicCells($text, $count); //izpis celic z izracuni odgovorov v stolpcih (npr. Sploh ne velja, ...)
@@ -2082,7 +2080,7 @@ class AnalizaSums extends LatexAnalysisElement{
/*izpis vrstic s podatki - konec*/
//zaljucek latex tabele z obrobo za drugo tabelo
- $tex .= ($export_format == 'pdf' ? "\\end{tabularx}" : "\\end{tabular}");
+ $tex .= ($export_format == 'pdf' ? "\\end{xltabular}" : "\\end{tabular}");
//zaljucek latex tabele z obrobo za drugo tabelo - konec
}
@@ -2123,7 +2121,7 @@ class AnalizaSums extends LatexAnalysisElement{
$text[] = $_col['naslov'];
}
else {
- $_answersOther[] = array('spid'=>$spid,'gid'=>$gid,'vid'=>$vid,'sequence'=>$_sequence);
+ $_answersOther[] = array('spid'=>$spid,'gid'=>isset($gid)?$gid:0,'vid'=>isset($vid)?$vid:0,'sequence'=>$_sequence);
}
$count++;
@@ -2149,7 +2147,7 @@ class AnalizaSums extends LatexAnalysisElement{
/*Priprava parametrov za tabelo in ostala polja za nadaljnji izpis - konec*/
//zacetek latex tabele z obrobo za prvo tabelo
- $pdfTable = 'tabularx';
+ $pdfTable = 'xltabular';
$rtfTable = 'tabular';
$pdfTableWidth = 1;
$rtfTableWidth = 1;
@@ -2164,16 +2162,16 @@ class AnalizaSums extends LatexAnalysisElement{
/*Naslovni vrstici tabele*/
//prva vrstica tabele
$steviloPodStolpcev1 = $steviloStolpcevParameterTabular - 1;
- //$tex .= $this->encodeText($spremenljivka['variable'])." & \multicolumn{".$steviloPodStolpcev1."}{l|}{".$this->encodeText($spremenljivka['naslov'])."} ".$this->texNewLine;
- //$tex .= $this->encodeText($spremenljivka['variable'])." & \multicolumn{".$steviloPodStolpcev1."}{X|}{".$this->encodeText($spremenljivka['naslov'])."} ".$this->texNewLine;
- //$tex .= $this->encodeText($spremenljivka['variable']).' & \multicolumn{'.$steviloPodStolpcev1.'}{>{\hsize=\dimexpr '.($steviloPodStolpcev1+1).'\hsize + '.($steviloPodStolpcev1+1).'\tabcolsep + \arrayrulewidth}X|}{'.$this->encodeText($spremenljivka['naslov']).'} '.$this->texNewLine;
+ //$tex .= LatexDocument::encodeText($spremenljivka['variable'])." & \multicolumn{".$steviloPodStolpcev1."}{l|}{".LatexDocument::encodeText($spremenljivka['naslov'])."} ".$this->texNewLine;
+ //$tex .= LatexDocument::encodeText($spremenljivka['variable'])." & \multicolumn{".$steviloPodStolpcev1."}{X|}{".LatexDocument::encodeText($spremenljivka['naslov'])."} ".$this->texNewLine;
+ //$tex .= LatexDocument::encodeText($spremenljivka['variable']).' & \multicolumn{'.$steviloPodStolpcev1.'}{>{\hsize=\dimexpr '.($steviloPodStolpcev1+1).'\hsize + '.($steviloPodStolpcev1+1).'\tabcolsep + \arrayrulewidth}X|}{'.LatexDocument::encodeText($spremenljivka['naslov']).'} '.$this->texNewLine;
- $dolzinaVprasanja = strlen($this->encodeText($spremenljivka['naslov']));
+ $dolzinaVprasanja = strlen(LatexDocument::encodeText($spremenljivka['naslov']));
//echo $dolzinaVprasanja."</br>";
if($dolzinaVprasanja > MEJA_DOLZINA_VPRASANJA){ //ce je dolzina vprasanja daljsa od ene vrstice v tabeli
- $tex .= $this->encodeText($spremenljivka['variable'])." & \multicolumn{".$steviloPodStolpcev1."}{X|}{".$this->encodeText($spremenljivka['naslov'])."} ".$this->texNewLine;
+ $tex .= LatexDocument::encodeText($spremenljivka['variable'])." & \multicolumn{".$steviloPodStolpcev1."}{X|}{".LatexDocument::encodeText($spremenljivka['naslov'])."} ".$this->texNewLine;
}else{
- $tex .= $this->encodeText($spremenljivka['variable'])." & \multicolumn{".$steviloPodStolpcev1."}{l|}{".$this->encodeText($spremenljivka['naslov'])."} ".$this->texNewLine;
+ $tex .= LatexDocument::encodeText($spremenljivka['variable'])." & \multicolumn{".$steviloPodStolpcev1."}{l|}{".LatexDocument::encodeText($spremenljivka['naslov'])."} ".$this->texNewLine;
}
if($export_format != 'xls'){
@@ -2181,7 +2179,7 @@ class AnalizaSums extends LatexAnalysisElement{
}
//druga vrstica
- $tex .= " & ".$this->encodeText($lang['srv_analiza_opisne_subquestion1'])." & \multicolumn{".$count."}{c|}{".$this->encodeText($lang['srv_analiza_sums_average'])."} ".$this->texNewLine;
+ $tex .= " & ".LatexDocument::encodeText($lang['srv_analiza_opisne_subquestion1'])." & \multicolumn{".$count."}{c|}{".LatexDocument::encodeText($lang['srv_analiza_sums_average'])."} ".$this->texNewLine;
if($export_format != 'xls'){
$tex .= $this->horizontalLineTex; /*obroba*/
}
@@ -2214,8 +2212,8 @@ class AnalizaSums extends LatexAnalysisElement{
foreach ($spremenljivka['grids'] AS $gid => $grid) {
$_variables_count = count($grid['variables']);
- $tex .= $this->encodeText($grid['variable']);
- $tex .= " & ".$this->encodeText($grid['naslov']);
+ $tex .= LatexDocument::encodeText($grid['variable']);
+ $tex .= " & ".LatexDocument::encodeText($grid['naslov']);
if ($_variables_count > 0) {
@@ -2225,7 +2223,7 @@ class AnalizaSums extends LatexAnalysisElement{
$_sequence = $variable['sequence']; # id kolone z podatki
if ($variable['other'] != true) {
# tabela z navedbami
- $text[] = self::formatNumber(SurveyAnalysis::$_FREQUENCYS[$_sequence]['average'],SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_AVERAGE'),'');
+ $text[] = self::formatNumber((isset(SurveyAnalysis::$_FREQUENCYS[$_sequence]['average'])?SurveyAnalysis::$_FREQUENCYS[$_sequence]['average']:null),SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_AVERAGE'),'');
$count++;
}
//$count++;
@@ -2241,7 +2239,7 @@ class AnalizaSums extends LatexAnalysisElement{
/*izpis vrstic s podatki - konec*/
//zaljucek latex tabele z obrobo za drugo tabelo
- $tex .= ($export_format == 'pdf' ? "\\end{tabularx}" : "\\end{tabular}");
+ $tex .= ($export_format == 'pdf' ? "\\end{xltabular}" : "\\end{tabular}");
//zaljucek latex tabele z obrobo za drugo tabelo - konec
}
@@ -2263,7 +2261,7 @@ class AnalizaSums extends LatexAnalysisElement{
# ugotovimo koliko imamo kolon
$gid=0;
- $_clmn_cnt = SurveyAnalysis::$_HEADERS[$spid]['grids'][$gid]['cnt_vars']-SurveyAnalysis::$_HEADERS[$spid]['grids'][$gid]['cnt_other'];
+ $_clmn_cnt = SurveyAnalysis::$_HEADERS[$spid]['grids'][$gid]['cnt_vars']-(isset(SurveyAnalysis::$_HEADERS[$spid]['grids'][$gid]['cnt_other'])?SurveyAnalysis::$_HEADERS[$spid]['grids'][$gid]['cnt_other']:null);
# tekst vprašanja
/*Priprava parametrov za tabelo in polja za 3. vrstico */
@@ -2304,7 +2302,7 @@ class AnalizaSums extends LatexAnalysisElement{
/*Priprava parametrov za tabelo in polja za 3. vrstico - konec*/
//zacetek latex tabele z obrobo za prvo tabelo
- $pdfTable = 'tabularx';
+ $pdfTable = 'xltabular';
$rtfTable = 'tabular';
$pdfTableWidth = 1;
$rtfTableWidth = 1;
@@ -2319,15 +2317,15 @@ class AnalizaSums extends LatexAnalysisElement{
/* prva vrstica */
$steviloPodStolpcev1 = $steviloStolpcevParameterTabular - 1;
- //$tex .= $this->encodeText($spremenljivka['variable'])." & \multicolumn{".$steviloPodStolpcev1."}{l|}{".$this->encodeText($spremenljivka['naslov'])."} ".$this->texNewLine;
- //$tex .= $this->encodeText($spremenljivka['variable'])." & \multicolumn{".$steviloPodStolpcev1."}{X|}{".$this->encodeText($spremenljivka['naslov'])."} ".$this->texNewLine;
- //$tex .= $this->encodeText($spremenljivka['variable']).' & \multicolumn{'.$steviloPodStolpcev1.'}{>{\hsize=\dimexpr '.($steviloPodStolpcev1+1).'\hsize + '.($steviloPodStolpcev1+1).'\tabcolsep + \arrayrulewidth}X|}{'.$this->encodeText($spremenljivka['naslov']).'} '.$this->texNewLine;
- $dolzinaVprasanja = strlen($this->encodeText($spremenljivka['naslov']));
+ //$tex .= LatexDocument::encodeText($spremenljivka['variable'])." & \multicolumn{".$steviloPodStolpcev1."}{l|}{".LatexDocument::encodeText($spremenljivka['naslov'])."} ".$this->texNewLine;
+ //$tex .= LatexDocument::encodeText($spremenljivka['variable'])." & \multicolumn{".$steviloPodStolpcev1."}{X|}{".LatexDocument::encodeText($spremenljivka['naslov'])."} ".$this->texNewLine;
+ //$tex .= LatexDocument::encodeText($spremenljivka['variable']).' & \multicolumn{'.$steviloPodStolpcev1.'}{>{\hsize=\dimexpr '.($steviloPodStolpcev1+1).'\hsize + '.($steviloPodStolpcev1+1).'\tabcolsep + \arrayrulewidth}X|}{'.LatexDocument::encodeText($spremenljivka['naslov']).'} '.$this->texNewLine;
+ $dolzinaVprasanja = strlen(LatexDocument::encodeText($spremenljivka['naslov']));
//echo $dolzinaVprasanja."</br>";
if($dolzinaVprasanja > MEJA_DOLZINA_VPRASANJA){ //ce je dolzina vprasanja daljsa od ene vrstice v tabeli
- $tex .= $this->encodeText($spremenljivka['variable'])." & \multicolumn{".$steviloPodStolpcev1."}{X|}{".$this->encodeText($spremenljivka['naslov'])."} ".$this->texNewLine;
+ $tex .= LatexDocument::encodeText($spremenljivka['variable'])." & \multicolumn{".$steviloPodStolpcev1."}{X|}{".LatexDocument::encodeText($spremenljivka['naslov'])."} ".$this->texNewLine;
}else{
- $tex .= $this->encodeText($spremenljivka['variable'])." & \multicolumn{".$steviloPodStolpcev1."}{l|}{".$this->encodeText($spremenljivka['naslov'])."} ".$this->texNewLine;
+ $tex .= LatexDocument::encodeText($spremenljivka['variable'])." & \multicolumn{".$steviloPodStolpcev1."}{l|}{".LatexDocument::encodeText($spremenljivka['naslov'])."} ".$this->texNewLine;
}
if($export_format != 'xls'){
@@ -2338,13 +2336,13 @@ class AnalizaSums extends LatexAnalysisElement{
/* druga vrstica*/
//$steviloPodStolpcev2 = count($spremenljivka['options']) + 1;
$steviloPodStolpcev2 = $count;
- $tex .= " & ".$this->encodeText($lang['srv_analiza_opisne_subquestion1'])." & \multicolumn{".$steviloPodStolpcev2."}{c|}{".$this->encodeText($lang['srv_analiza_opisne_answers'])."} ";
+ $tex .= " & ".LatexDocument::encodeText($lang['srv_analiza_opisne_subquestion1'])." & \multicolumn{".$steviloPodStolpcev2."}{c|}{".LatexDocument::encodeText($lang['srv_analiza_opisne_answers'])."} ";
- $tex .= " & ".$this->encodeText($lang['srv_analiza_opisne_valid']);
- $tex .= " & ".$this->encodeText($lang['srv_analiza_num_units']);
+ $tex .= " & ".LatexDocument::encodeText($lang['srv_analiza_opisne_valid']);
+ $tex .= " & ".LatexDocument::encodeText($lang['srv_analiza_num_units']);
$steviloPodStolpcev3 = $count+1;
- $tex .= " & \multicolumn{".$steviloPodStolpcev3."}{c|}{".$this->encodeText($lang['srv_analiza_opisne_arguments'])."} ";
+ $tex .= " & \multicolumn{".$steviloPodStolpcev3."}{c|}{".LatexDocument::encodeText($lang['srv_analiza_opisne_arguments'])."} ";
$tex .= $this->texNewLine; //nova vrstica
if($export_format != 'xls'){
@@ -2389,7 +2387,7 @@ class AnalizaSums extends LatexAnalysisElement{
}
$this->dynamicCells($text, $count, 44, $height); */
- $tex .= " & ".$this->encodeText($lang['srv_anl_suma1']); //Skupaj
+ $tex .= " & ".LatexDocument::encodeText($lang['srv_anl_suma1']); //Skupaj
$tex .= $this->texNewLine;
if($export_format != 'xls'){
@@ -2401,12 +2399,12 @@ class AnalizaSums extends LatexAnalysisElement{
foreach (SurveyAnalysis::$_HEADERS[$spid]['grids'] AS $gid => $grids) {
$_cnt = 0;
- $height = 1;//$height = $this->getCellHeight($this->encodeText($grids['naslov']), 18);
+ $height = 1;//$height = $this->getCellHeight(LatexDocument::encodeText($grids['naslov']), 18);
$height = ($height < 8 ? 8 : $height);
# vodoravna vrstice s podatki
- $tex .= $this->encodeText($grids['variable']);
- $tex .= " & ".$this->encodeText($grids['naslov']);
+ $tex .= LatexDocument::encodeText($grids['variable']);
+ $tex .= " & ".LatexDocument::encodeText($grids['naslov']);
$_arguments = 0;
@@ -2472,7 +2470,7 @@ class AnalizaSums extends LatexAnalysisElement{
/*vrstice s podatki - konec*/
/*zaljucek latex tabele z obrobo za prvo tabelo*/
- $tex .= ($export_format == 'pdf' ? "\\end{tabularx}" : "\\end{tabular}");
+ $tex .= ($export_format == 'pdf' ? "\\end{xltabular}" : "\\end{tabular}");
/*zaljucek latex tabele z obrobo za prvo tabelo - konec*/
# izpišemo še tekstovne odgovore za polja drugo
@@ -2494,10 +2492,11 @@ class AnalizaSums extends LatexAnalysisElement{
*/
function outputGridLabelVertical($gid=null, $grid=null, $vid=null, $variable=null, $spid=null, $_options=array()) {
//echo "outputGridLabelVertical </br>";
+ $counter = 0;
$text = array();
- $text[] = $this->encodeText($variable['variable']);
- $text[] = $this->encodeText(($grid['naslov'] != '' ? $grid['naslov']. '&nbsp;-&nbsp;' : '').$variable['naslov']);
+ $text[] = LatexDocument::encodeText($variable['variable']);
+ $text[] = LatexDocument::encodeText(($grid['naslov'] != '' ? $grid['naslov']. '&nbsp;-&nbsp;' : '').$variable['naslov']);
$text[] = '';
$text[] = '';
@@ -2548,7 +2547,7 @@ class AnalizaSums extends LatexAnalysisElement{
if (count($grid['variables']) > 0 )
foreach ($grid['variables'] AS $vid => $variable ){
$_sequence = $variable['sequence']; # id kolone z podatki
- $only_valid += (int)SurveyAnalysis::$_FREQUENCYS[$_sequence]['validCnt'];
+ $only_valid += (int)(isset(SurveyAnalysis::$_FREQUENCYS[$_sequence]['validCnt'])?SurveyAnalysis::$_FREQUENCYS[$_sequence]['validCnt']:null);
}
}
}
@@ -2602,14 +2601,13 @@ class AnalizaSums extends LatexAnalysisElement{
//$parameterTabular .= ($export_format == 'pdf' ? 'X|' : 'l|');
}else{
$parameterTabular .= ($export_format == 'pdf' ? '>{\hsize='.$sirinaOstalihStolpcev.'\hsize \centering\arraybackslash}X|' : 'c|'); /*sirina ostalih je odvisna od njihovega stevila, da se sirine razporedijo po celotni sirini tabele*/
- //$parameterTabular .= ($export_format == 'pdf' ? 'X|' : 'c|'); /*sirina ostalih je odvisna od njihovega stevila, da se sirine razporedijo po celotni sirini tabele*/
}
}
/*Priprava parametrov za tabelo in ostala polja za nadaljnji izpis - konec*/
//zacetek latex tabele z obrobo za prvo tabelo
- $pdfTable = 'tabularx';
+ $pdfTable = 'xltabular';
$rtfTable = 'tabular';
$pdfTableWidth = 1;
$rtfTableWidth = 1;
@@ -2624,15 +2622,11 @@ class AnalizaSums extends LatexAnalysisElement{
/*Naslovni vrstici tabele*/
//prva vrstica tabele
$steviloPodStolpcev1 = $steviloStolpcevParameterTabular - 1;
- //$tex .= $this->encodeText($spremenljivka['variable'])." & \multicolumn{".$steviloPodStolpcev1."}{l|}{".$this->encodeText($spremenljivka['naslov'])."} ".$this->texNewLine;
- //$tex .= $this->encodeText($spremenljivka['variable'])." & \multicolumn{".$steviloPodStolpcev1."}{X|}{".$this->encodeText($spremenljivka['naslov'])."} ".$this->texNewLine;
- //$tex .= $this->encodeText($spremenljivka['variable']).' & \multicolumn{'.$steviloPodStolpcev1.'}{>{\hsize=\dimexpr '.($steviloPodStolpcev1+1).'\hsize + '.($steviloPodStolpcev1+1).'\tabcolsep + \arrayrulewidth}X|}{'.$this->encodeText($spremenljivka['naslov']).'} '.$this->texNewLine;
- $dolzinaVprasanja = strlen($this->encodeText($spremenljivka['naslov']));
- //echo $dolzinaVprasanja."</br>";
+ $dolzinaVprasanja = strlen(LatexDocument::encodeText($spremenljivka['naslov']));
if($dolzinaVprasanja > MEJA_DOLZINA_VPRASANJA){ //ce je dolzina vprasanja daljsa od ene vrstice v tabeli
- $tex .= $this->encodeText($spremenljivka['variable'])." & \multicolumn{".$steviloPodStolpcev1."}{X|}{".$this->encodeText($spremenljivka['naslov'])."} ".$this->texNewLine;
+ $tex .= LatexDocument::encodeText($spremenljivka['variable'])." & \multicolumn{".$steviloPodStolpcev1."}{X|}{".LatexDocument::encodeText($spremenljivka['naslov'])."} ".$this->texNewLine;
}else{
- $tex .= $this->encodeText($spremenljivka['variable'])." & \multicolumn{".$steviloPodStolpcev1."}{l|}{".$this->encodeText($spremenljivka['naslov'])."} ".$this->texNewLine;
+ $tex .= LatexDocument::encodeText($spremenljivka['variable'])." & \multicolumn{".$steviloPodStolpcev1."}{l|}{".LatexDocument::encodeText($spremenljivka['naslov'])."} ".$this->texNewLine;
}
@@ -2659,7 +2653,7 @@ class AnalizaSums extends LatexAnalysisElement{
/*Konec naslovnih vrstic*/
//tretja vrstica
- $tex .= " \multicolumn{".$steviloStolpcevParameterTabular."}{|c|}{".$this->encodeText($lang['srv_analiza_heatmap_clicked_coords'])."} ".$this->texNewLine;
+ $tex .= " \multicolumn{".$steviloStolpcevParameterTabular."}{|c|}{".LatexDocument::encodeText($lang['srv_analiza_heatmap_clicked_coords'])."} ".$this->texNewLine;
if($export_format != 'xls'){
$tex .= $this->horizontalLineTex; /*obroba*/
}
@@ -2670,13 +2664,13 @@ class AnalizaSums extends LatexAnalysisElement{
//cetrta vrstica
$cetrtaVrstica = array();
- $cetrtaVrstica[] = $this->encodeText($lang['coordinates']);
- $cetrtaVrstica[] = $this->encodeText($lang['srv_analiza_opisne_valid_heatmap']);
- $cetrtaVrstica[] = $this->encodeText($lang['srv_analiza_num_units_valid_heatmap']);
- $cetrtaVrstica[] = $this->encodeText($lang['srv_means_label']);
- $cetrtaVrstica[] = $this->encodeText($lang['srv_analiza_opisne_odklon']);
- $cetrtaVrstica[] = $this->encodeText($lang['srv_analiza_opisne_min']);
- $cetrtaVrstica[] = $this->encodeText($lang['srv_analiza_opisne_max']);
+ $cetrtaVrstica[] = LatexDocument::encodeText($lang['coordinates']);
+ $cetrtaVrstica[] = LatexDocument::encodeText($lang['srv_analiza_opisne_valid_heatmap']);
+ $cetrtaVrstica[] = LatexDocument::encodeText($lang['srv_analiza_num_units_valid_heatmap']);
+ $cetrtaVrstica[] = LatexDocument::encodeText($lang['srv_means_label']);
+ $cetrtaVrstica[] = LatexDocument::encodeText($lang['srv_analiza_opisne_odklon']);
+ $cetrtaVrstica[] = LatexDocument::encodeText($lang['srv_analiza_opisne_min']);
+ $cetrtaVrstica[] = LatexDocument::encodeText($lang['srv_analiza_opisne_max']);
$tex .= $this->tableRow($cetrtaVrstica, $brezHline);
//cetrta vrstica - konec
@@ -2684,24 +2678,24 @@ class AnalizaSums extends LatexAnalysisElement{
//peta vrstica x
$petaVrstica = array();
$petaVrstica[] = 'x';
- $petaVrstica[] = $this->encodeText($validHeatmapRegion);
- $petaVrstica[] = $this->encodeText($ustrezniHeatmapRegion);
- $petaVrstica[] = $this->encodeText($povprecjeHeatmapClicksX);
- $petaVrstica[] = $this->encodeText($stdevHeatmapClicksX);
- $petaVrstica[] = $this->encodeText($minHeatmapClicksX);
- $petaVrstica[] = $this->encodeText($maxHeatmapClicksX);
+ $petaVrstica[] = LatexDocument::encodeText($validHeatmapRegion);
+ $petaVrstica[] = LatexDocument::encodeText($ustrezniHeatmapRegion);
+ $petaVrstica[] = LatexDocument::encodeText($povprecjeHeatmapClicksX);
+ $petaVrstica[] = LatexDocument::encodeText($stdevHeatmapClicksX);
+ $petaVrstica[] = LatexDocument::encodeText($minHeatmapClicksX);
+ $petaVrstica[] = LatexDocument::encodeText($maxHeatmapClicksX);
$tex .= $this->tableRow($petaVrstica, $brezHline);
//peta vrstica x - konec
//sesta vrstica y
$sestaVrstica = array();
$sestaVrstica[] = 'y';
- $sestaVrstica[] = $this->encodeText($validHeatmapRegion);
- $sestaVrstica[] = $this->encodeText($ustrezniHeatmapRegion);
- $sestaVrstica[] = $this->encodeText($povprecjeHeatmapClicksY);
- $sestaVrstica[] = $this->encodeText($stdevHeatmapClicksY);
- $sestaVrstica[] = $this->encodeText($minHeatmapClicksY);
- $sestaVrstica[] = $this->encodeText($maxHeatmapClicksY);
+ $sestaVrstica[] = LatexDocument::encodeText($validHeatmapRegion);
+ $sestaVrstica[] = LatexDocument::encodeText($ustrezniHeatmapRegion);
+ $sestaVrstica[] = LatexDocument::encodeText($povprecjeHeatmapClicksY);
+ $sestaVrstica[] = LatexDocument::encodeText($stdevHeatmapClicksY);
+ $sestaVrstica[] = LatexDocument::encodeText($minHeatmapClicksY);
+ $sestaVrstica[] = LatexDocument::encodeText($maxHeatmapClicksY);
$tex .= $this->tableRow($sestaVrstica, $brezHline);
//sesta vrstica y - konec
//vrstici s podatki za x in y koordinati - konec
@@ -2712,7 +2706,7 @@ class AnalizaSums extends LatexAnalysisElement{
if($RegionPresent){ //ce imamo obmocja
//7. vrstica - naslovna za obmocja
- $tex .= " \multicolumn{".$steviloStolpcevParameterTabular."}{|c|}{".$this->encodeText($lang['srv_analiza_heatmap_clicked_regions'])."} ".$this->texNewLine;
+ $tex .= " \multicolumn{".$steviloStolpcevParameterTabular."}{|c|}{".LatexDocument::encodeText($lang['srv_analiza_heatmap_clicked_regions'])."} ".$this->texNewLine;
if($export_format != 'xls'){
$tex .= $this->horizontalLineTex; /*obroba*/
}
@@ -2720,13 +2714,13 @@ class AnalizaSums extends LatexAnalysisElement{
//8. vrstica
$osmaVrstica = array();
- $osmaVrstica[] = $this->encodeText($lang['srv_analiza_opisne_frequency_heatmap']);//od tretjega stolpca dalje, ker prva dva sta za naslov Obmocja kot multicolumn
- $osmaVrstica[] = $this->encodeText($lang['srv_analiza_opisne_valid_heatmap']);
- $osmaVrstica[] = $this->encodeText('% - '.$lang['srv_analiza_opisne_valid_heatmap']);
- $osmaVrstica[] = $this->encodeText($lang['srv_analiza_num_units_valid_heatmap']);
- $osmaVrstica[] = $this->encodeText('% - '.$lang['srv_analiza_num_units_valid_heatmap']);
+ $osmaVrstica[] = LatexDocument::encodeText($lang['srv_analiza_opisne_frequency_heatmap']);//od tretjega stolpca dalje, ker prva dva sta za naslov Obmocja kot multicolumn
+ $osmaVrstica[] = LatexDocument::encodeText($lang['srv_analiza_opisne_valid_heatmap']);
+ $osmaVrstica[] = LatexDocument::encodeText('% - '.$lang['srv_analiza_opisne_valid_heatmap']);
+ $osmaVrstica[] = LatexDocument::encodeText($lang['srv_analiza_num_units_valid_heatmap']);
+ $osmaVrstica[] = LatexDocument::encodeText('% - '.$lang['srv_analiza_num_units_valid_heatmap']);
- $tex .= " \multicolumn{2}{|c|}{".$this->encodeText($lang['srv_hot_spot_regions_menu'])."} ";
+ $tex .= " \multicolumn{2}{|c|}{".LatexDocument::encodeText($lang['srv_hot_spot_regions_menu'])."} ";
$tex .= $this->tableRow($osmaVrstica, 0, 0, 1);
//echo $tex;
//8. vrstica - konec
@@ -2739,58 +2733,45 @@ class AnalizaSums extends LatexAnalysisElement{
if ($_grids_count > 0) {
$_row = $spremenljivka['grids'][0];
$indeks = 0;
- //$veljavnaSkupnaFreq = 0;
if (count($_row['variables'])>0){
foreach ($_row['variables'] AS $rid => $_col ){
$_sequence = $_col['sequence']; # id kolone z podatki
if ($_col['other'] != true) {
if($indeks != 0){
- //echo "_col: ".strip_tags ($_col['naslov'])."</br>";
//od 9. vrstice dalje, kjer so po vrsticah obmocja in njihovi podatki
$devetaVrstica = array();
//1. stolpcev z imenom obmocja
- //echo $_col['naslov'];
- //$devetaVrstica[] = $this->encodeText($_col['naslov']);
- $devetaVrstica[] = " \multicolumn{2}{|c|}{".$this->encodeText($_col['naslov'])."} ";
- //$tex .= " \multicolumn{2}{|c|}{".$this->encodeText($_col['naslov'])."} ";
+ $devetaVrstica[] = " \multicolumn{2}{|c|}{".LatexDocument::encodeText($_col['naslov'])."} ";
//1. stolpcev z imenom obmocja - konec
//2. stolpec - Frekvenca
$freqHeatmapRegion = SurveyAnalysis::freqHeatmapRegion($spremenljivka['grids'], $spid, $_valid_answers, $indeks, $export);
- $veljavnaSkupnaFreq = $veljavnaSkupnaFreq + $freqHeatmapRegion;
- //echo '<td class="anl_bl anl_br anl_bb anl_ac">'.$freqHeatmapRegion.'</td>';
- //$devetaVrstica[] = $this->encodeText($freqHeatmapRegion);
+ $veljavnaSkupnaFreq = isset($veljavnaSkupnaFreq)?$veljavnaSkupnaFreq:0 + $freqHeatmapRegion;
$devetaVrstica[] = $freqHeatmapRegion;
//2. stolpec - Frekvenca - konec
//3. stolpec - Veljavni
- //$validHeatmapRegion = self::validHeatmapRegion($spremenljivka['grids'], $spid, $_valid_answers);
- //echo '<td class="anl_bl anl_br anl_bb anl_ac">'.$validHeatmapRegion.'</td>';
- $devetaVrstica[] = $this->encodeText($validHeatmapRegion);
+ $devetaVrstica[] = LatexDocument::encodeText($validHeatmapRegion);
//3. stolpec - Veljavni - konec
//4. stolpec - % Veljavni
$_procentValidHeatmapRegion = ($validHeatmapRegion > 0 ) ? 100*$freqHeatmapRegion / $validHeatmapRegion : 0;
$_procentValidHeatmapRegion = self::formatNumber($_procentValidHeatmapRegion, SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_PERCENT'),'%');
- //echo '<td class="anl_bl anl_br anl_bb anl_ac">'.$_procentValidHeatmapRegion.'</td>';
- $devetaVrstica[] = $this->encodeText($_procentValidHeatmapRegion);
+ $devetaVrstica[] = LatexDocument::encodeText($_procentValidHeatmapRegion);
//4. stolpec - % Veljavni - konec
//5. stolpec - Ustrezni
$ustrezniHeatmapRegion = SurveyAnalysis::ustrezniHeatmapRegion($spid, $_valid_answers, $_sequence); //vsi mozni kliki
- //echo '<td class="anl_bl anl_br anl_bb anl_ac">'.$ustrezniHeatmapRegion.'</td>';
- $devetaVrstica[] = $this->encodeText($ustrezniHeatmapRegion);
+ $devetaVrstica[] = LatexDocument::encodeText($ustrezniHeatmapRegion);
//5. stolpec - Ustrezni - konec
//6. stolpec - % Ustrezni
$_procentUstrezniHeatmapRegion = ($ustrezniHeatmapRegion > 0 ) ? 100*$freqHeatmapRegion / $ustrezniHeatmapRegion : 0;
$_procentUstrezniHeatmapRegion = self::formatNumber($_procentUstrezniHeatmapRegion, SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_PERCENT'),'%');
- //echo '<td class="anl_bl anl_br anl_bb anl_ac">'.$_procentUstrezniHeatmapRegion.'</td>';
- $devetaVrstica[] = $this->encodeText($_procentUstrezniHeatmapRegion);
+ $devetaVrstica[] = LatexDocument::encodeText($_procentUstrezniHeatmapRegion);
//6. stolpec - % Ustrezni - konec
$tex .= $this->tableRow($devetaVrstica, $brezHline);
- //echo $tex;
//od 9. vrstice dalje, kjer so po vrsticah obmocja in njihovi podatki - konec
//*********** Izris veljavnih in manjkajocih vrednosti
@@ -2798,14 +2779,10 @@ class AnalizaSums extends LatexAnalysisElement{
$options['isTextAnswer'] = false;
$manjkajoci = $ustrezniHeatmapRegion - $validHeatmapRegion;
- //10. vrstica
- //$validHeatmapRegion
- //echo $validHeatmapRegion;
- //echo "validHeatmapRegion: ".$validHeatmapRegion."</br>";
- //$counter = SurveyAnalysis::outputSumaValidAnswerHeatmap($counter,$_sequence,$spid,$options, $validHeatmapRegion);
+ //10. vrstica
$desetaVrstica = array();
- $desetaVrstica[] = $this->encodeText($lang['srv_analiza_opisne_valid']);
- $desetaVrstica[] = $this->encodeText($lang['srv_analiza_manjkajocevrednosti']);
+ $desetaVrstica[] = LatexDocument::encodeText($lang['srv_analiza_opisne_valid']);
+ $desetaVrstica[] = LatexDocument::encodeText($lang['srv_analiza_manjkajocevrednosti']);
$desetaVrstica[] = $validHeatmapRegion;
$desetaVrstica[] = " \multicolumn{4}{|c|}{ } ";
$tex .= $this->tableRow($desetaVrstica, $brezHline);
@@ -2813,8 +2790,8 @@ class AnalizaSums extends LatexAnalysisElement{
//11. vrstica
$enajstaVrstica = array();
- $enajstaVrstica[] = $this->encodeText($lang['srv_anl_missing1']);
- $enajstaVrstica[] = $this->encodeText($lang['srv_analiza_manjkajocevrednosti']);
+ $enajstaVrstica[] = LatexDocument::encodeText($lang['srv_anl_missing1']);
+ $enajstaVrstica[] = LatexDocument::encodeText($lang['srv_analiza_manjkajocevrednosti']);
$enajstaVrstica[] = $manjkajoci;
$enajstaVrstica[] = " \multicolumn{4}{|c|}{ } ";
$tex .= $this->tableRow($enajstaVrstica, $brezHline);
@@ -2822,30 +2799,12 @@ class AnalizaSums extends LatexAnalysisElement{
//12. vrstica
$dvanajstaVrstica = array();
- $dvanajstaVrstica[] = " \multicolumn{2}{|c|}{".$this->encodeText($lang['srv_anl_suma_valid'])." } ";
+ $dvanajstaVrstica[] = " \multicolumn{2}{|c|}{".LatexDocument::encodeText($lang['srv_anl_suma_valid'])." } ";
$dvanajstaVrstica[] = $ustrezniHeatmapRegion;
$dvanajstaVrstica[] = " \multicolumn{4}{|c|}{ } ";
$tex .= $this->tableRow($dvanajstaVrstica, $brezHline);
//12. vrstica - konec
-/* if (count(SurveyAnalysis::$_FREQUENCYS[$_sequence]['invalid'])> 0 ) {
- foreach (SurveyAnalysis::$_FREQUENCYS[$_sequence]['invalid'] AS $ikey => $iAnswer) {
- if ($iAnswer['cnt'] > 0 ) { # izpisujemo samo tiste ki niso 0
- //$counter = SurveyAnalysis::outputInvalidAnswerHeatmap($counter,$ikey,$iAnswer,$_sequence,$spid,$options, $manjkajoci);
- //$_percent = (SurveyAnalysis::$_FREQUENCYS[$_sequence]['allCnt'] > 0 ) ? 100*$iAnswer['cnt'] / SurveyAnalysis::$_FREQUENCYS[$_sequence]['allCnt'] : 0;
- $_invalid = (SurveyAnalysis::$_FREQUENCYS[$_sequence]['invalidCnt'] > 0 ) ? 100*$iAnswer['cnt'] / SurveyAnalysis::$_FREQUENCYS[$_sequence]['invalidCnt'] : 0;
- echo "_invalid: ".$_invalid."</br>";
- //echo "_percent: ".$_percent."</br>";
- }
- }
- # izpišemo sumo neveljavnih
- //$counter = SurveyAnalysis::outputSumaInvalidAnswerHeatmap($counter,$_sequence,$spid,$options, $manjkajoci);
- echo "manjkajoci: ".$manjkajoci."</br>";
- } */
- #izpišemo še skupno sumo
- //$counter = SurveyAnalysis::outputSumaHeatmap($counter,$_sequence,$spid,$options, $ustrezniHeatmapRegion);
- //$ustrezniHeatmapRegion
- //echo "ustrezniHeatmapRegion: ".$ustrezniHeatmapRegion."</br>";
$veljavnaSkupnaFreq = 0;
}
//*********** Izris veljavnih in manjkajocih vrednosti - konec
@@ -2871,7 +2830,7 @@ class AnalizaSums extends LatexAnalysisElement{
//zaljucek latex tabele z obrobo za drugo tabelo
- $tex .= ($export_format == 'pdf' ? "\\end{tabularx}" : "\\end{tabular}");
+ $tex .= ($export_format == 'pdf' ? "\\end{xltabular}" : "\\end{tabular}");
//zaljucek latex tabele z obrobo za drugo tabelo - konec
/* if (count($spremenljivka['grids']) > 0) {
@@ -2892,31 +2851,31 @@ class AnalizaSums extends LatexAnalysisElement{
if($arrayText[0] == '')
$arrayText[0] = '';
- /*$linecount = $this->pdf->getNumLines($this->encodeText($arrayText[1]), 30);
+ /*$linecount = $this->pdf->getNumLines(LatexDocument::encodeText($arrayText[1]), 30);
$linecount == 1 ? $height = 1 : $height = 4.7 + ($linecount-1)*3.3;*/
$text = array();
for($i=0; $i<$count-1; $i++){
//for($i=0; $i<$count; $i++){
if($arrayText[$i] == '')
$arrayText[$i] = '';
- /*$this->pdf->MultiCell($singleWidth, $height, $this->encodeText($arrayText[$i]), 1, 'C', 0, 0, 0 ,0, true);*/
+ /*$this->pdf->MultiCell($singleWidth, $height, LatexDocument::encodeText($arrayText[$i]), 1, 'C', 0, 0, 0 ,0, true);*/
- /*$texDynamicCells .= $this->encodeText($arrayText[$i]);*/
- $text[$i] = $this->encodeText($arrayText[$i]);
+ /*$texDynamicCells .= LatexDocument::encodeText($arrayText[$i]);*/
+ $text[$i] = LatexDocument::encodeText($arrayText[$i]);
}
//zadnje polje izrisemo druge sirine ker se drugace zaradi zaokrozevanja tabela porusi
/*$lastWidth = ($lastWidth < 4) ? 4 : $lastWidth;*/
if($count > 0){
- /*$this->pdf->MultiCell($lastWidth, $height, $this->encodeText($arrayText[$count-1]), 1, 'C', 0, 0, 0 ,0, true);*/
+ /*$this->pdf->MultiCell($lastWidth, $height, LatexDocument::encodeText($arrayText[$count-1]), 1, 'C', 0, 0, 0 ,0, true);*/
- /*$texDynamicCells .= $this->encodeText($arrayText[$count-1]);*/
- $text[$count-1] = $this->encodeText($arrayText[$count-1]);
+ /*$texDynamicCells .= LatexDocument::encodeText($arrayText[$count-1]);*/
+ $text[$count-1] = LatexDocument::encodeText($arrayText[$count-1]);
}else{
- /*$this->pdf->MultiCell($lastWidth, $height, $this->encodeText(''), 1, 'C', 0, 0, 0 ,0, true);*/
+ /*$this->pdf->MultiCell($lastWidth, $height, LatexDocument::encodeText(''), 1, 'C', 0, 0, 0 ,0, true);*/
- /*$texDynamicCells .= $this->encodeText('');*/
- $text[$count-1] = $this->encodeText('');
+ /*$texDynamicCells .= LatexDocument::encodeText('');*/
+ $text[$count-1] = LatexDocument::encodeText('');
}
$brezHline = 1;
@@ -2929,7 +2888,7 @@ class AnalizaSums extends LatexAnalysisElement{
function getCellHeight($string='', $width=null){
// Star nacin
- //$linecount = $this->pdf->getNumLines($this->encodeText($string), $width);
+ //$linecount = $this->pdf->getNumLines(LatexDocument::encodeText($string), $width);
//$height = ( $linecount == 1 ? 4.7 : (4.7 + ($linecount-1)*3.5) );
$this->pdf->startTransaction();
@@ -2945,6 +2904,7 @@ class AnalizaSums extends LatexAnalysisElement{
static function HeatmapRegionPresence($spremenljivkaGrids=null, $spid=null, $_valid_answers=null){
$HeatmapRegionPresence = false;
+ $num_show_records = SurveyAnalysis::getNumRecords();
foreach ($spremenljivkaGrids AS $gid => $grid){
$_variables_count = count($grid['variables']);
if ($_variables_count > 0){
diff --git a/admin/survey/export/latexclasses/Analize/AnalizaTTest.php b/admin/survey/export/latexclasses/Analize/AnalizaTTest.php
index a0f832b..8e1bb58 100644
--- a/admin/survey/export/latexclasses/Analize/AnalizaTTest.php
+++ b/admin/survey/export/latexclasses/Analize/AnalizaTTest.php
@@ -2,41 +2,41 @@
global $site_path;
- include_once('../../function.php');
- include_once('../survey/definition.php');
+/* include_once('../../function.php');
+ include_once('../survey/definition.php'); */
- define("ALLOW_HIDE_ZERRO_REGULAR", false); // omogočimo delovanje prikazovanja/skrivanja ničelnih vnosti za navadne odgovore
- define("ALLOW_HIDE_ZERRO_MISSING", true); // omogočimo delovanje prikazovanja/skrivanja ničelnih vnosti za missinge
+ if(!defined("ALLOW_HIDE_ZERRO_REGULAR"))define("ALLOW_HIDE_ZERRO_REGULAR", false); // omogočimo delovanje prikazovanja/skrivanja ničelnih vnosti za navadne odgovore
+ if(!defined("ALLOW_HIDE_ZERRO_MISSING"))define("ALLOW_HIDE_ZERRO_MISSING", true); // omogočimo delovanje prikazovanja/skrivanja ničelnih vnosti za missinge
- define("NUM_DIGIT_AVERAGE", 2); // stevilo digitalnih mest za povprecje
- define("NUM_DIGIT_DEVIATION", 2); // stevilo digitalnih mest za povprecje
-
- define("M_ANALIZA_DESCRIPTOR", "descriptor");
- define("M_ANALIZA_FREQUENCY", "frequency");
-
- define("FNT_FREESERIF", "freeserif");
- define("FNT_FREESANS", "freesans");
- define("FNT_HELVETICA", "helvetica");
-
- define("FNT_MAIN_TEXT", FNT_FREESANS);
- define("FNT_QUESTION_TEXT", FNT_FREESANS);
- define("FNT_HEADER_TEXT", FNT_FREESANS);
-
- define("FNT_MAIN_SIZE", 10);
- define("FNT_QUESTION_SIZE", 9);
- define("FNT_HEADER_SIZE", 10);
-
- define("RADIO_BTN_SIZE", 3);
- define("CHCK_BTN_SIZE", 3);
- define("LINE_BREAK", 6);
-
- define ('PDF_MARGIN_HEADER', 8);
- define ('PDF_MARGIN_FOOTER', 12);
- define ('PDF_MARGIN_TOP', 18);
- define ('PDF_MARGIN_BOTTOM', 18);
- define ('PDF_MARGIN_LEFT', 15);
- define ('PDF_MARGIN_RIGHT', 15);
+ if(!defined("NUM_DIGIT_AVERAGE"))define("NUM_DIGIT_AVERAGE", 2); // stevilo digitalnih mest za povprecje
+ if(!defined("NUM_DIGIT_DEVIATION"))define("NUM_DIGIT_DEVIATION", 2); // stevilo digitalnih mest za povprecje
+
+ if(!defined("M_ANALIZA_DESCRIPTOR"))define("M_ANALIZA_DESCRIPTOR", "descriptor");
+ if(!defined("M_ANALIZA_FREQUENCY"))define("M_ANALIZA_FREQUENCY", "frequency");
+
+ if(!defined("FNT_FREESERIF"))define("FNT_FREESERIF", "freeserif");
+ if(!defined("FNT_FREESANS"))define("FNT_FREESANS", "freesans");
+ if(!defined("FNT_HELVETICA"))define("FNT_HELVETICA", "helvetica");
+
+ if(!defined("FNT_MAIN_TEXT"))define("FNT_MAIN_TEXT", FNT_FREESANS);
+ if(!defined("FNT_QUESTION_TEXT"))define("FNT_QUESTION_TEXT", FNT_FREESANS);
+ if(!defined("FNT_HEADER_TEXT"))define("FNT_HEADER_TEXT", FNT_FREESANS);
+
+ if(!defined("FNT_MAIN_SIZE"))define("FNT_MAIN_SIZE", 10);
+ if(!defined("FNT_QUESTION_SIZE"))define("FNT_QUESTION_SIZE", 9);
+ if(!defined("FNT_HEADER_SIZE"))define("FNT_HEADER_SIZE", 10);
+
+ if(!defined("RADIO_BTN_SIZE"))define("RADIO_BTN_SIZE", 3);
+ if(!defined("CHCK_BTN_SIZE"))define("CHCK_BTN_SIZE", 3);
+ if(!defined("LINE_BREAK"))define("LINE_BREAK", 6);
+
+ if(!defined("PDF_MARGIN_HEADER"))define ('PDF_MARGIN_HEADER', 8);
+ if(!defined("PDF_MARGIN_FOOTER"))define ('PDF_MARGIN_FOOTER', 12);
+ if(!defined("PDF_MARGIN_TOP"))define ('PDF_MARGIN_TOP', 18);
+ if(!defined("PDF_MARGIN_BOTTOM"))define ('PDF_MARGIN_BOTTOM', 18);
+ if(!defined("PDF_MARGIN_LEFT"))define ('PDF_MARGIN_LEFT', 15);
+ if(!defined("PDF_MARGIN_RIGHT"))define ('PDF_MARGIN_RIGHT', 15);
/** Class za generacijo izvoza v Latex
@@ -76,8 +76,6 @@ class AnalizaTTest extends LatexAnalysisElement{
{
$this->anketa['id'] = $anketa;
$this->anketa['podstran'] = $podstran;
- // create new PDF document
- //$this->pdf = new enka_TCPDF('L', PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
}
else
{
@@ -106,12 +104,7 @@ class AnalizaTTest extends LatexAnalysisElement{
{
return $this->pi['canCreate'];
}
- function getFile($fileName=null)
- {
- //Close and output PDF document
- ob_end_clean();
- $this->pdf->Output($fileName, 'I');
- }
+
function init()
@@ -125,35 +118,7 @@ class AnalizaTTest extends LatexAnalysisElement{
$language_meta['a_meta_language'] = 'sl';
$language_meta['w_page'] = $lang['page'];
- //set some language-dependent strings
- $this->pdf->setLanguageArray($language_meta);
-
- //set margins
- $this->pdf->setPrintHeaderFirstPage(true);
- $this->pdf->setPrintFooterFirstPage(true);
- $this->pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
- $this->pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
- $this->pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
-
- // set header and footer fonts
- $this->pdf->setHeaderFont(Array(FNT_HEADER_TEXT, "I", FNT_HEADER_SIZE));
- $this->pdf->setFooterFont(Array(FNT_HEADER_TEXT, 'I', FNT_HEADER_SIZE));
-
-
- // set document information
- $this->pdf->SetAuthor('An Order Form');
- $this->pdf->SetTitle('An Order');
- $this->pdf->SetSubject('An Order');
-
- // set default header data
- $this->pdf->SetHeaderData(null, null, "www.1ka.si", $this->encodeText(SurveyInfo::getInstance()->getSurveyAkronim()));
- //set auto page breaks
- $this->pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
-
- $this->pdf->SetFont(FNT_MAIN_TEXT, '', FNT_MAIN_SIZE);
- //set image scale factor
- $this->pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
return true;
}
@@ -210,7 +175,7 @@ class AnalizaTTest extends LatexAnalysisElement{
//Priprava parametrov za tabelo - konec
//zacetek latex tabele z obrobo za prvo tabelo
- $pdfTable = 'tabularx';
+ $pdfTable = 'xltabular';
$rtfTable = 'tabular';
$pdfTableWidth = 1;
$rtfTableWidth = 1;
@@ -239,8 +204,8 @@ class AnalizaTTest extends LatexAnalysisElement{
$poravnava = "c";
- $tabela .= " & \multicolumn{".$steviloOstalihStolpcev."}{".$poravnava."|}{".$this->returnBold($this->encodeText($sprLabel1))."} ".$this->texNewLine;
- //$tabela .= ' & \multicolumn{'.$steviloOstalihStolpcev.'}{>{\hsize=\dimexpr '.($steviloOstalihStolpcev).'\hsize + '.($steviloOstalihStolpcev).'\tabcolsep + \arrayrulewidth}X|}{'.$this->returnBold($this->encodeText($sprLabel1)).'} '.$this->texNewLine;
+ $tabela .= " & \multicolumn{".$steviloOstalihStolpcev."}{".$poravnava."|}{".$this->returnBold(LatexDocument::encodeText($sprLabel1))."} ".$this->texNewLine;
+ //$tabela .= ' & \multicolumn{'.$steviloOstalihStolpcev.'}{>{\hsize=\dimexpr '.($steviloOstalihStolpcev).'\hsize + '.($steviloOstalihStolpcev).'\tabcolsep + \arrayrulewidth}X|}{'.$this->returnBold(LatexDocument::encodeText($sprLabel1)).'} '.$this->texNewLine;
// prva vrstica - konec
// druga vrstica
@@ -248,7 +213,7 @@ class AnalizaTTest extends LatexAnalysisElement{
$tabela .= "\\cline{2-".$steviloStolpcevParameterTabular."} "; //horizontalna vrstica od 2 do zadnje celice
}
$druga = array();
- $druga[] = $this->returnBold($this->encodeText($sprLabel2));
+ $druga[] = $this->returnBold(LatexDocument::encodeText($sprLabel2));
$druga[] = 'n';
$druga[] = 'x';
$druga[] = 's$^2$';
@@ -269,7 +234,7 @@ class AnalizaTTest extends LatexAnalysisElement{
//tretja vrstica
$tretja = array();
- $tretja[] = $this->encodeText($label1); //1. stolpec
+ $tretja[] = LatexDocument::encodeText($label1); //1. stolpec
$tretja[] = $this->formatNumber($ttest[1]['n'], 0);
$tretja[] = $this->formatNumber($ttest[1]['x'], 3);
$tretja[] = $this->formatNumber($ttest[1]['s2'], 3);
@@ -285,9 +250,9 @@ class AnalizaTTest extends LatexAnalysisElement{
//cetrta vrstica
$cetrta = array();
if($export_format != 'xls'){
- $cetrta[] = '\cline{1-'.$zadnjiStolpecDvojnihVrstic.'} '.$this->encodeText($label2); //1. stolpec, //crta samo do dolocenega stolpca
+ $cetrta[] = '\cline{1-'.$zadnjiStolpecDvojnihVrstic.'} '.LatexDocument::encodeText($label2); //1. stolpec, //crta samo do dolocenega stolpca
}else{
- $cetrta[] = $this->encodeText($label2); //1. stolpec, //crta samo do dolocenega stolpca
+ $cetrta[] = LatexDocument::encodeText($label2); //1. stolpec, //crta samo do dolocenega stolpca
}
$cetrta[] = $this->formatNumber($ttest[2]['n'], 0);
$cetrta[] = $this->formatNumber($ttest[2]['x'], 3);
@@ -304,7 +269,7 @@ class AnalizaTTest extends LatexAnalysisElement{
// vrstici s podatki - konec
//zaljucek latex tabele z obrobo za prvo tabelo
- $tabela .= ($export_format == 'pdf' ? "\\end{tabularx}" : "\\end{tabular}");
+ $tabela .= ($export_format == 'pdf' ? "\\end{xltabular}" : "\\end{tabular}");
//zaljucek latex tabele z obrobo za prvo tabelo - konec
}
@@ -341,9 +306,9 @@ class AnalizaTTest extends LatexAnalysisElement{
if($creport==false){
// Naslov posameznega grafa
$title = $lang['srv_chart_ttest_title'].':'.$this->texNewLine;
- $title .= $this->encodeText($this->ttestVars[0]);
- $title .= $this->encodeText('/');
- $title .= $this->encodeText($this->ttestVars[1]);
+ $title .= LatexDocument::encodeText($this->ttestVars[0]);
+ $title .= LatexDocument::encodeText('/');
+ $title .= LatexDocument::encodeText($this->ttestVars[1]);
$boldedTitle = $this->returnBold($title).$this->texNewLine; //vrni boldan naslov in skoci v novo vrstico
}else{
$boldedTitle = '';
@@ -375,11 +340,6 @@ class AnalizaTTest extends LatexAnalysisElement{
return $text;
}
- function drawLine()
- {
- $cy = $this->pdf->getY();
- $this->pdf->Line(15, $cy , 195, $cy , $this->currentStyle);
- }
function setUserId($usrId=null) {$this->anketa['uid'] = $usrId;}
function getUserId() {return ($this->anketa['uid'])?$this->anketa['uid']:false;}
@@ -394,20 +354,7 @@ class AnalizaTTest extends LatexAnalysisElement{
return $result;
}
-
- function getCellHeight($string='', $width=null){
-
- $this->pdf->startTransaction();
- // get the number of lines calling you method
- $linecount = $this->pdf->MultiCell($width, 0, $string, 0, 'L', 0, 0, '', '', true, 0, false, true, 0);
- // restore previous object
- $this->pdf = $this->pdf->rollbackTransaction();
-
- $height = ($linecount <= 1) ? 4.7 : $linecount * ($this->pdf->getFontSize() * $this->pdf->getCellHeightRatio()) + 2;
- return $height;
- }
-
}
?> \ No newline at end of file