diff --git a/admin/survey/export/latexclasses/Vprasanja/DatumLatex.php b/admin/survey/export/latexclasses/Vprasanja/DatumLatex.php index e659044e6..f252f7fc2 100644 --- a/admin/survey/export/latexclasses/Vprasanja/DatumLatex.php +++ b/admin/survey/export/latexclasses/Vprasanja/DatumLatex.php @@ -77,10 +77,36 @@ class DatumLatex extends LatexSurveyElement $besedilo .= '}'; //ureditev besedila odgovora respondenta v doloceno barvo - konec - //$answerTextBox = $this->LatexTextBox($export_format, $textboxHeight, $textboxWidth, $userAnswer['text'], $textboxAllignment, $noBorders); - $answerTextBox = $this->LatexTextBox($export_format, $textboxHeight, $textboxWidth, $besedilo, $textboxAllignment, $noBorders); - - + if($userAnswer['text']==''){ //ce ni izpisa odgovorov respondentov, priprava izpis s tabelo + $answerTextBox = $this->LatexTextBox($export_format, $textboxHeight, $textboxWidth, $besedilo, $textboxAllignment, $noBorders); + + //parametri tabele + //$parameterTabular = 'l'; + if($export_format == 'pdf'){ //ce je pdf + $parameterTabular = 'X'; + }else{ //ce je rtf + $parameterTabular = 'l'; + } + + //IZRIS + #ZACETEK TABELE + //zacetek tabele + $tex .= $this->StartLatexTable($export_format, $parameterTabular, 'tabularx', 'tabular', 1, 1); + + $tex .= $answerTextBox; //izris znotraj tabele + + //zakljucek tabele + $tex .= $this->EndLatexTable($export_format, 'tabularx', 'tabular'); + #KONEC TABELE + $tex .= $this->texBigSkip; + }else{ //ce je izpis odgovorov respondentov + $tex .= $this->texNewLine; + $tex .= $besedilo; + //$tex .= " \ "; //da ni tezave z "there is no line here to end" + $tex .= $texNewLine; + $tex .= $texNewLine; + } + //priprava missing-ov //pregled vseh moznih vrednosti (kategorij) po $sqlVrednosti while ($rowVrednost = mysqli_fetch_assoc($sqlVrednosti)){ @@ -95,46 +121,17 @@ class DatumLatex extends LatexSurveyElement $symbol = $this->getAnswerSymbol($export_format, $fillablePdf, $spremenljivke['tip'], $spremenljivke['grids'], 0, 0); //poberi simbol checkbox za other in missing moznosti odgovora //priprava missing-ov - konec - //parametri tabele - //$parameterTabular = 'l'; - if($export_format == 'pdf'){ //ce je pdf - $parameterTabular = 'X'; - }else{ //ce je rtf - $parameterTabular = 'l'; - } - - //IZRIS - #ZACETEK TABELE - //zacetek tabele - $tex .= $this->StartLatexTable($export_format, $parameterTabular, 'tabularx', 'tabular', 1, 1); - - $tex .= $answerTextBox; //izris znotraj tabele - - //zakljucek tabele - $tex .= $this->EndLatexTable($export_format, 'tabularx', 'tabular'); - #KONEC TABELE - - $tex .= ' \vspace{0.3cm} '; //prostor med okvirjem in missing - // Izris polj drugo - ne vem... if (count($array_others) > 0) { + $tex .= ' \vspace{0.3cm} '; //prostor med okvirjem in missing $tex .= $texNewLine; foreach ($array_others AS $oKey => $other) { $tex .= $symbol.' '.$other['naslov'].' '; $tex .= $texNewLine; } + $tex .= $texNewLine; } -/* $tex .= $texNewLine; - $tex .= $texNewLine; */ - $tex .= $this->texBigSkip; - - if($export_format == 'pdf'){ //ce je pdf - $tex .= '\\end{absolutelynopagebreak}'; //zakljucimo environment, da med vprasanji ne bo prelomov strani - }else{ //ce je rtf - - } - //IZRIS - KONEC return $tex; diff --git a/admin/survey/export/latexclasses/class.LatexSurveyElement.php b/admin/survey/export/latexclasses/class.LatexSurveyElement.php index 7e741403b..224375aad 100644 --- a/admin/survey/export/latexclasses/class.LatexSurveyElement.php +++ b/admin/survey/export/latexclasses/class.LatexSurveyElement.php @@ -206,7 +206,7 @@ class LatexSurveyElement{ //echo "naslov: ".$text."
"; //$tex = $text." ".$texNewLine; - if( !in_array($spremenljivke['tip'], array(1, 2, 3, 4, 7, 6, 16, 19, 20, 21, 17, 18, 24, 26, 27)) ){ //ce ni radio, check, roleta, stevilo, multigrid radio, checkbox, besedilo, stevilo, razvrscanje, vsota ali kombinirana tabela, lokacija, ali heatmap + if( !in_array($spremenljivke['tip'], array(1, 2, 3, 4, 7, 8, 6, 16, 19, 20, 21, 17, 18, 24, 26, 27)) ){ //ce ni radio, check, roleta, stevilo, datum, multigrid radio, checkbox, besedilo, stevilo, razvrscanje, vsota ali kombinirana tabela, lokacija, ali heatmap $tex .= ($this->export_format == 'pdf' ? '\\begin{absolutelynopagebreak} \\noindent ' : ' '); //ce je pdf uredimo, da med vprasanji ne bo prelomov strani } @@ -283,9 +283,8 @@ class LatexSurveyElement{ if($spremenljivke['info'] != ''){ $tex .= $this->texNewLine; $tex .= '\vspace{2 mm}'; - //$tex .= ' {\indent \\footnotesize '.$this->encodeText($spremenljivke['info']).'}'; //$tex .= ' {\noindent \\footnotesize '.$this->encodeText($spremenljivke['info']).'}'; - $tex .= ' \noindent \\footnotesize '.$this->encodeText($spremenljivke['info']).' '; + $tex .= ' \noindent \\footnotesize '.$this->encodeText($spremenljivke['info']).' \\normalsize '; } if( !in_array($spremenljivke['tip'], array(4, 6, 16, 19, 20, 21, 7, 8, 18)) ){ //ce ni multigrid radio, checkbox, besedilo, stevilo, datum ali vsota ki ne potrebujejo prazne vrstice zaradi uporabe tabele @@ -346,7 +345,7 @@ class LatexSurveyElement{ $tex .= $this->texNewLine; $tex .= '\vspace{2 mm}'; //$tex .= ' {\indent \\footnotesize '.$this->encodeText($spremenljivke['info']).'} '; - $tex .= ' {\noindent \\footnotesize '.$this->encodeText($spremenljivke['info']).'} '; + $tex .= ' {\noindent \\footnotesize '.$this->encodeText($spremenljivke['info']).' \\normalsize } '; } if($export_subtype=='q_data'||$export_subtype=='q_data_all'){ //ce je izpis odgovorov