Skip to content

Commit

Permalink
Fixed issue: #09780 queXML export fails
Browse files Browse the repository at this point in the history
  • Loading branch information
adamzammit committed Jul 17, 2015
1 parent ce0bb95 commit e919ff8
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions application/helpers/export_helper.php
Expand Up @@ -904,7 +904,7 @@ function QueXMLCreateFixed($qid,$rotate=false,$labels=true,$scale=0,$other=false
global $dom;

global $quexmllang;
$qlang = new limesurvey_lang($quexmllang);
App()->setLanguage($quexmllang);

if ($labels)
$Query = "SELECT * FROM {{labels}} WHERE lid = $labels AND language='$quexmllang' ORDER BY sortorder ASC";
Expand Down Expand Up @@ -944,7 +944,7 @@ function QueXMLCreateFixed($qid,$rotate=false,$labels=true,$scale=0,$other=false
{
$category = $dom->createElement("category");

$label = $dom->createElement("label",quexml_get_lengthth($qid,"other_replace_text",$qlang->gT("Other")));
$label = $dom->createElement("label",quexml_get_lengthth($qid,"other_replace_text",gT("Other")));

$value= $dom->createElement("value",'-oth-');

Expand All @@ -953,7 +953,7 @@ function QueXMLCreateFixed($qid,$rotate=false,$labels=true,$scale=0,$other=false

$contingentQuestion = $dom->createElement("contingentQuestion");
$length = $dom->createElement("length",24);
$text = $dom->createElement("text",quexml_get_lengthth($qid,"other_replace_text",$qlang->gT("Other")));
$text = $dom->createElement("text",quexml_get_lengthth($qid,"other_replace_text",gT("Other")));

$contingentQuestion->appendChild($text);
$contingentQuestion->appendChild($length);
Expand Down Expand Up @@ -999,7 +999,7 @@ function quexml_create_multi(&$question,$qid,$varname,$scale_id = false,$free =
global $dom;
global $quexmllang ;
global $iSurveyID;
$qlang = new limesurvey_lang($quexmllang);
App()->setLanguage($quexmllang);


$Query = "SELECT * FROM {{questions}} WHERE parent_qid = $qid AND language='$quexmllang' ";
Expand Down Expand Up @@ -1052,7 +1052,7 @@ function quexml_create_multi(&$question,$qid,$varname,$scale_id = false,$free =
$fixed = $dom->createElement("fixed");
$category = $dom->createElement("category");

$label = $dom->createElement("label",quexml_get_lengthth($qid,"other_replace_text",$qlang->gT("Other")));
$label = $dom->createElement("label",quexml_get_lengthth($qid,"other_replace_text",gT("Other")));

$value= $dom->createElement("value",1);

Expand All @@ -1067,7 +1067,7 @@ function quexml_create_multi(&$question,$qid,$varname,$scale_id = false,$free =

$contingentQuestion = $dom->createElement("contingentQuestion");
$length = $dom->createElement("length",24);
$text = $dom->createElement("text",quexml_get_lengthth($qid,"other_replace_text",$qlang->gT("Other")));
$text = $dom->createElement("text",quexml_get_lengthth($qid,"other_replace_text",gT("Other")));

$contingentQuestion->appendChild($text);
$contingentQuestion->appendChild($length);
Expand Down Expand Up @@ -1123,7 +1123,7 @@ function quexml_export($surveyi, $quexmllan)
$quexmllang = $quexmllan;
$iSurveyID = $surveyi;

$qlang = new limesurvey_lang($quexmllang);
App()->setLanguage($quexmllang);

$dom = new DOMDocument('1.0','UTF-8');

Expand Down Expand Up @@ -1284,7 +1284,7 @@ function quexml_export($surveyi, $quexmllan)
{
$directive = $dom->createElement("directive");
$position = $dom->createElement("position","before");
$text = $dom->createElement("text", '['.$qlang->gT('Only answer the following question if:')." ".QueXMLCleanup($RowQ['printable_help'])."]");
$text = $dom->createElement("text", '['.gT('Only answer the following question if:')." ".QueXMLCleanup($RowQ['printable_help'])."]");
$administration = $dom->createElement("administration","self");
$directive->appendChild($position);
$directive->appendChild($text);
Expand Down Expand Up @@ -1377,11 +1377,11 @@ function quexml_export($surveyi, $quexmllan)
$question->appendChild($response);
break;
case "Y": //YES/NO radio-buttons
$response->appendChild(QueXMLFixedArray(array($qlang->gT("Yes") => 'Y',$qlang->gT("No") => 'N')));
$response->appendChild(QueXMLFixedArray(array(gT("Yes") => 'Y',gT("No") => 'N')));
$question->appendChild($response);
break;
case "G": //GENDER drop-down list
$response->appendChild(QueXMLFixedArray(array($qlang->gT("Female") => 'F',$qlang->gT("Male") => 'M')));
$response->appendChild(QueXMLFixedArray(array(gT("Female") => 'F',gT("Male") => 'M')));
$question->appendChild($response);
break;
case "A": //ARRAY (5 POINT CHOICE) radio-buttons
Expand All @@ -1396,12 +1396,12 @@ function quexml_export($surveyi, $quexmllan)
break;
case "C": //ARRAY (YES/UNCERTAIN/NO) radio-buttons
quexml_create_subQuestions($question,$qid,$sgq);
$response->appendChild(QueXMLFixedArray(array($qlang->gT("Yes") => 'Y',$qlang->gT("Uncertain") => 'U',$qlang->gT("No") => 'N')));
$response->appendChild(QueXMLFixedArray(array(gT("Yes") => 'Y',gT("Uncertain") => 'U',gT("No") => 'N')));
$question->appendChild($response);
break;
case "E": //ARRAY (Increase/Same/Decrease) radio-buttons
quexml_create_subQuestions($question,$qid,$sgq);
$response->appendChild(QueXMLFixedArray(array($qlang->gT("Increase") => 'I',$qlang->gT("Same") => 'S',$qlang->gT("Decrease") => 'D')));
$response->appendChild(QueXMLFixedArray(array(gT("Increase") => 'I',gT("Same") => 'S',gT("Decrease") => 'D')));
$question->appendChild($response);
break;
case "F": //ARRAY (Flexible) - Row Format
Expand Down

0 comments on commit e919ff8

Please sign in to comment.