diff options
Diffstat (limited to '')
-rw-r--r-- | admin/survey/export/latexclasses/Analize/AnalizaSums.php | 748 |
1 files changed, 354 insertions, 394 deletions
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']. ' - ' : '').$variable['naslov']);
+ $text[] = LatexDocument::encodeText($variable['variable']);
+ $text[] = LatexDocument::encodeText(($grid['naslov'] != '' ? $grid['naslov']. ' - ' : '').$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){
|