diff --git a/admin/survey/export/latexclasses/Vprasanja/BesediloLatex.php b/admin/survey/export/latexclasses/Vprasanja/BesediloLatex.php index 01675df88..8fa629641 100644 --- a/admin/survey/export/latexclasses/Vprasanja/BesediloLatex.php +++ b/admin/survey/export/latexclasses/Vprasanja/BesediloLatex.php @@ -409,6 +409,7 @@ class BesediloLatex extends LatexSurveyElement //if($podatekVBazi==1&&$export_data_type==2){ //ce je podatek v bazi in je izpis skrcen if($podatekVBazi==1){ //ce je podatek v bazi if($export_data_type==2 || $steviloOken == 1){ //ce je izpis skrcen ali je stevilo oken 1 + $tex .= " \ "; //da ni tezave z "there is no line here to end" $tex .= $texNewLine; $tex .= $texNewLine; } diff --git a/admin/survey/export/latexclasses/Vprasanja/RadioCheckboxSelectLatex.php b/admin/survey/export/latexclasses/Vprasanja/RadioCheckboxSelectLatex.php index 52ce327a7..98708757d 100644 --- a/admin/survey/export/latexclasses/Vprasanja/RadioCheckboxSelectLatex.php +++ b/admin/survey/export/latexclasses/Vprasanja/RadioCheckboxSelectLatex.php @@ -250,8 +250,16 @@ class RadioCheckboxSelectLatex extends LatexSurveyElement //pregled vseh moznih vrednosti (kategorij) po $sqlVrednosti while ($rowVrednost = mysqli_fetch_assoc($sqlVrednosti)){ - $prop['full'] = ( isset($userAnswer[$rowVrednost['id']]) ); - $stringTitle = ((( $rowVrednost['naslov'] ) ? $rowVrednost['naslov'] : ( ( $rowVrednost['naslov2'] ) ? $rowVrednost['naslov2'] : $rowVrednost['variable'] ) )); + $prop['full'] = ( isset($userAnswer[$rowVrednost['id']]) ); + + if($this->language!=''){ //ce je prevod ankete + $rowl = $this->srv_language_vrednost($rowVrednost['id']); //pridobi prevod naslova v ustreznem jeziku + $stringTitle = ((( $rowl['naslov'] ) ? $rowl['naslov'] : ( ( $rowl['naslov2'] ) ? $rowl['naslov2'] : $rowl['variable'] ) )); //prevod naslova v ustreznem jeziku + }else{ + $stringTitle = ((( $rowVrednost['naslov'] ) ? $rowVrednost['naslov'] : ( ( $rowVrednost['naslov2'] ) ? $rowVrednost['naslov2'] : $rowVrednost['variable'] ) )); + } + + if ( $spremenljivke['tip'] == 1 || $spremenljivke['tip'] == 3 ){ $symbol = $this->getAnswerSymbol($export_format, $fillablePdf, $spremenljivke['tip'], $spremenljivke['grids'], 0, $this->userAnswer[$rowVrednost['id']], $spremenljivke['orientation'], $indeksZaWhile, $vizualnaSkalaNumber); //$tex .= '{\ChoiceMenu[radio,radiosymbol=\ding{108},name=myGroupOfRadiobuttons]{}{='.$stringTitle.'}}'.$stringTitle.' '.$this->texNewLine; diff --git a/admin/survey/export/latexclasses/class.LatexSurvey.php b/admin/survey/export/latexclasses/class.LatexSurvey.php index 43e28801e..f78008649 100644 --- a/admin/survey/export/latexclasses/class.LatexSurvey.php +++ b/admin/survey/export/latexclasses/class.LatexSurvey.php @@ -207,9 +207,15 @@ class LatexSurvey{ if( ($surveyExpanded != 0 || $this->type != 1) && $this->showIntro == 1 ){ if ( SurveyInfo::getInstance()->getSurveyShowIntro() ) { - $intro = (SurveyInfo::getInstance()->getSurveyIntro() == '') ? $lang['srv_intro'] : SurveyInfo::getInstance()->getSurveyIntro(); + if($this->language!=-1){ //ce je prevod ankete + $spr_id_uvod = -1; + $sqll = sisplet_query("SELECT naslov, info FROM srv_language_spremenljivka WHERE ank_id='".$this->anketa."' AND spr_id='".$spr_id_uvod."' AND lang_id='".$this->language."'"); + $rowl = mysqli_fetch_array($sqll); //pridobi prevod uvoda v ustreznem jeziku + $intro = $rowl['naslov']; //prevod uvoda v ustreznem jeziku + }else{ + $intro = (SurveyInfo::getInstance()->getSurveyIntro() == '') ? $lang['srv_intro'] : SurveyInfo::getInstance()->getSurveyIntro(); + } - //$tex .= $intro; $tex .= $this->encodeTextHere($intro); $tex .= $this->texNewLine; $tex .= $this->texNewLine; @@ -1326,7 +1332,7 @@ class LatexSurvey{ if($numOfUl!=0 && $posLi !== false){ //ce imamo ul in li $divider = ' '; }else{ - $divider = ' \\\\ '; + $divider = ' \\ \\\\ '; } //$text = str_replace('
',' ', $text); //$text = str_replace('
',' \break ', $text);
diff --git a/admin/survey/export/latexclasses/class.LatexSurveyElement.php b/admin/survey/export/latexclasses/class.LatexSurveyElement.php
index 03ca4bbb8..ad8a55c5f 100644
--- a/admin/survey/export/latexclasses/class.LatexSurveyElement.php
+++ b/admin/survey/export/latexclasses/class.LatexSurveyElement.php
@@ -837,6 +837,8 @@ class LatexSurveyElement{
$posLi = strpos($text, $findLi);
$posPar = strpos($text, $findPar);
+ //echo "pozicija paragrafa: $posPar ";
+
//ureditev izrisa slike
if($posImg !== false){
$numOfImgs = substr_count($text, $findImg); //stevilo '',$divider, $text);
- }else{
+ }else{
$text = str_replace('
',' ', $text); } } @@ -971,6 +973,15 @@ class LatexSurveyElement{ $text = substr_replace($text, $this->texNewLine, MAX_STRING_LENGTH, 0); //dodaj na ustrezni dolzini besedila prehod v novo vrstico } //priprava izpisa zelo dolgega besedila brez presledkov - konec + //echo "text potem: ".$text.""; + + + //RESEVANJE BESEDILA V CIRILICI + $contains_cyrillic = (bool) preg_match('/[\p{Cyrillic}]/u', $text); //ali je v besedilu cirilica? + if($contains_cyrillic){ // ce je cirilica v besedilu + $text = '\foreignlanguage{russian}{'.$text.'}'; + } + //RESEVANJE BESEDILA V CIRILICI - konec if($pos === false && $posImg === false) { //v tekstu ni br in img