Latex za izvoze: V primeru, da je izbran razsirjen izpis se vneseno besedilo pri kategoriji Drugo ne izpise v PDF/rtf
This commit is contained in:
parent
7622baca7f
commit
c4529db2cd
@ -286,9 +286,23 @@ class RadioCheckboxSelectLatex extends LatexSurveyElement
|
||||
}
|
||||
|
||||
if($spremenljivke['orientation']==1&&$spremenljivke['tip'] != 3){ //navpicno
|
||||
$tex .= $symbol.' '.$this->encodeText($stringTitle, $rowVrednost['id']).' '.$texNewLine;
|
||||
//$tex .= $symbol.' '.$this->encodeText($stringTitle, $rowVrednost['id']).' '.$texNewLine;
|
||||
$tex .= $symbol.' '.$this->encodeText($stringTitle, $rowVrednost['id']).' ';
|
||||
//$test = $symbol.' '.$this->encodeText($stringTitle, $rowVrednost['id']).' '.$texNewLine;
|
||||
//echo "tukaj! $test </br>";
|
||||
//echo "tukaj! $test </br>";
|
||||
if($rowVrednost['other'] == 1){ //ce je odgovor Drugo:, izpisi se tabelo za drugo
|
||||
$tex .= '\begin{tabular}{c} '; //izris s tabelo brez obrob
|
||||
if(isset($this->userAnswer[$rowVrednost['id']])){
|
||||
$sqlOtheText1 = "SELECT * FROM srv_data_text".$db_table." WHERE spr_id='".$spremenljivke['id']."' AND vre_id='".$rowVrednost['id']."' AND usr_id=".$usr_id;
|
||||
$sqlOtherText = sisplet_query($sqlOtheText1);
|
||||
$row4 = mysqli_fetch_assoc($sqlOtherText);
|
||||
$tex .= '\fbox{\parbox{0.2\textwidth}{ '.$row4['text'].' }} ';
|
||||
}else{
|
||||
$tex .= '\fbox{\parbox{0.2\textwidth}{ \hphantom{\hspace{0.2\textwidth}} }} ';
|
||||
}
|
||||
$tex .= ' \end{tabular}'; //za zakljuciti izris odgovorov v tabeli
|
||||
}
|
||||
$tex .= $texNewLine;
|
||||
}elseif($spremenljivke['orientation']==7){ //navpicno - tekst levo
|
||||
$text = $this->encodeText($stringTitle, $rowVrednost['id']).' & '.$symbol.' '.$texNewLine;
|
||||
$textLength = strlen($text);
|
||||
@ -296,18 +310,75 @@ class RadioCheckboxSelectLatex extends LatexSurveyElement
|
||||
$tex .= '\vspace{2 mm}';
|
||||
$tex .= '\parbox{'.LINE_BREAK_AT.'}{'.$this->encodeText($stringTitle, $rowVrednost['id']).'} & '.$symbol.' '.$texNewLine; //tekst odgovora razbij pri LINE_BREAK_AT (5 cm) in zraven dodaj ustrezni simbol
|
||||
}else{
|
||||
$tex .= $text;
|
||||
}
|
||||
$tex .= $this->encodeText($stringTitle, $rowVrednost['id']).' & ';
|
||||
if($rowVrednost['other'] == 1){ //ce je odgovor Drugo:, izpisi se tabelo za drugo
|
||||
$tex .= '\begin{tabular}{c} '; //izris s tabelo brez obrob
|
||||
if(isset($this->userAnswer[$rowVrednost['id']])){
|
||||
$sqlOtheText1 = "SELECT * FROM srv_data_text".$db_table." WHERE spr_id='".$spremenljivke['id']."' AND vre_id='".$rowVrednost['id']."' AND usr_id=".$usr_id;
|
||||
$sqlOtherText = sisplet_query($sqlOtheText1);
|
||||
$row4 = mysqli_fetch_assoc($sqlOtherText);
|
||||
$tex .= '\fbox{\parbox{0.2\textwidth}{ '.$row4['text'].' }} ';
|
||||
}else{
|
||||
$tex .= '\fbox{\parbox{0.2\textwidth}{ \hphantom{\hspace{0.2\textwidth}} }} ';
|
||||
}
|
||||
$tex .= ' \end{tabular}'; //za zakljuciti izris odgovorov v tabeli
|
||||
}
|
||||
$tex .= $symbol.' '.$texNewLine;
|
||||
}
|
||||
//echo $tex."</br>";
|
||||
}elseif($spremenljivke['orientation']==0){ //vodoravno ob vprasanju
|
||||
$tex .= ' '.$symbol.' '.$this->encodeText($stringTitle, $rowVrednost['id']).' ';
|
||||
if($rowVrednost['other'] == 1){ //ce je odgovor Drugo:, izpisi se tabelo za drugo
|
||||
$tex .= '\begin{tabular}{c} '; //izris s tabelo brez obrob
|
||||
if(isset($this->userAnswer[$rowVrednost['id']])){
|
||||
$sqlOtheText1 = "SELECT * FROM srv_data_text".$db_table." WHERE spr_id='".$spremenljivke['id']."' AND vre_id='".$rowVrednost['id']."' AND usr_id=".$usr_id;
|
||||
$sqlOtherText = sisplet_query($sqlOtheText1);
|
||||
$row4 = mysqli_fetch_assoc($sqlOtherText);
|
||||
$tex .= '\fbox{\parbox{0.2\textwidth}{ '.$row4['text'].' }} ';
|
||||
}else{
|
||||
$tex .= '\fbox{\parbox{0.2\textwidth}{ \hphantom{\hspace{0.2\textwidth}} }} ';
|
||||
}
|
||||
$tex .= ' \end{tabular}'; //za zakljuciti izris odgovorov v tabeli
|
||||
}
|
||||
}elseif($spremenljivke['orientation']==2){ //vodoravno pod vprasanjem
|
||||
$tex .= ' '.$symbol.' '.$this->encodeText($stringTitle, $rowVrednost['id']).' ';
|
||||
if($rowVrednost['other'] == 1){ //ce je odgovor Drugo:, izpisi se tabelo za drugo
|
||||
$tex .= '\begin{tabular}{c} '; //izris s tabelo brez obrob
|
||||
if(isset($this->userAnswer[$rowVrednost['id']])){
|
||||
$sqlOtheText1 = "SELECT * FROM srv_data_text".$db_table." WHERE spr_id='".$spremenljivke['id']."' AND vre_id='".$rowVrednost['id']."' AND usr_id=".$usr_id;
|
||||
$sqlOtherText = sisplet_query($sqlOtheText1);
|
||||
$row4 = mysqli_fetch_assoc($sqlOtherText);
|
||||
$tex .= '\fbox{\parbox{0.2\textwidth}{ '.$row4['text'].' }} ';
|
||||
}else{
|
||||
$tex .= '\fbox{\parbox{0.2\textwidth}{ \hphantom{\hspace{0.2\textwidth}} }} ';
|
||||
}
|
||||
$tex .= ' \end{tabular}'; //za zakljuciti izris odgovorov v tabeli
|
||||
}
|
||||
}elseif(($spremenljivke['tip'] == 3&&$spremenljivke['orientation']==1)||$spremenljivke['orientation']==6){ //roleta ali izberite s seznama
|
||||
if($export_data_type==1&&isset($this->userAnswer[$rowVrednost['id']])){ //ce je dolg izvoz in je podatek za odgovor
|
||||
$tex .= ' \textbf{'.$this->encodeText($stringTitle, $rowVrednost['id']).'} '.$texNewLine;
|
||||
//$tex .= ' \textbf{'.$this->encodeText($stringTitle, $rowVrednost['id']).'} '.$texNewLine;
|
||||
$tex .= ' \textbf{'.$this->encodeText($stringTitle, $rowVrednost['id']).' ';
|
||||
}else{
|
||||
$tex .= $this->encodeText($stringTitle, $rowVrednost['id']).' '.$texNewLine;
|
||||
}
|
||||
//$tex .= $this->encodeText($stringTitle, $rowVrednost['id']).' '.$texNewLine;
|
||||
$tex .= $this->encodeText($stringTitle, $rowVrednost['id']).' ';
|
||||
}
|
||||
if($rowVrednost['other'] == 1){ //ce je odgovor Drugo:, izpisi se tabelo za drugo
|
||||
$tex .= '\begin{tabular}{c} '; //izris s tabelo brez obrob
|
||||
if(isset($this->userAnswer[$rowVrednost['id']])){
|
||||
$sqlOtheText1 = "SELECT * FROM srv_data_text".$db_table." WHERE spr_id='".$spremenljivke['id']."' AND vre_id='".$rowVrednost['id']."' AND usr_id=".$usr_id;
|
||||
$sqlOtherText = sisplet_query($sqlOtheText1);
|
||||
$row4 = mysqli_fetch_assoc($sqlOtherText);
|
||||
$tex .= '\fbox{\parbox{0.2\textwidth}{ '.$row4['text'].' }} ';
|
||||
}else{
|
||||
$tex .= '\fbox{\parbox{0.2\textwidth}{ \hphantom{\hspace{0.2\textwidth}} }} ';
|
||||
}
|
||||
$tex .= ' \end{tabular}'; //za zakljuciti izris odgovorov v tabeli
|
||||
if($export_data_type==1&&isset($this->userAnswer[$rowVrednost['id']])){ //ce je dolg izvoz in je podatek za odgovor
|
||||
$tex .= '}';
|
||||
}
|
||||
|
||||
}
|
||||
$tex .= $texNewLine;
|
||||
}elseif($spremenljivke['orientation']==8){ //povleci-spusti
|
||||
|
||||
if(isset($this->userAnswer[$rowVrednost['id']])){
|
||||
|
Loading…
x
Reference in New Issue
Block a user