Latex za izvoze: IZVOZ-57: Slike v anketi: ureditev odvecnih prelomov

This commit is contained in:
patrik2020 2020-10-06 11:18:51 +02:00
parent 06cb69c3ba
commit dec0d9c568
2 changed files with 35 additions and 39 deletions

View File

@ -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;

View File

@ -206,7 +206,7 @@ class LatexSurveyElement{
//echo "naslov: ".$text."</br>";
//$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