Skip to content

Commit

Permalink
Fixed issue #15001: Values Labels for single-answer questions are mis…
Browse files Browse the repository at this point in the history
…sing in SPSS export
  • Loading branch information
c-schmitz committed Jun 28, 2019
1 parent a63296e commit c72d2e0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions application/helpers/export_helper.php
Expand Up @@ -247,7 +247,7 @@ function SPSSExportData($iSurveyID, $iLength, $na = '', $q = '\'', $header = fal
*/
function SPSSGetValues($field = array(), $qidattributes = null, $language)
{
$language = sanitize_paranoid_string($language);
$language = sanitize_languagecode($language);

$length_vallabel = 120; // Constant ?
if (!isset($field['LStype']) || empty($field['LStype'])) {
Expand Down Expand Up @@ -1143,7 +1143,7 @@ function quexml_create_multi(&$question, $qid, $varname, $iResponseID, $fieldmap
global $iSurveyID;
App()->setLanguage($quexmllang);

$quexmllang = sanitize_paranoid_string($quexmllang);
$quexmllang = sanitize_languagecode($quexmllang);
$scale_id = sanitize_paranoid_string($scale_id);

$Query = "SELECT * FROM {{questions}} WHERE parent_qid = $qid AND language='$quexmllang' ";
Expand Down Expand Up @@ -1268,7 +1268,7 @@ function quexml_create_subQuestions(&$question, $qid, $varname, $iResponseID, $f
global $quexmllang;
global $iSurveyID;

$quexmllang = sanitize_paranoid_string($quexmllang);
$quexmllang = sanitize_languagecode($quexmllang);
$qid = sanitize_paranoid_string($qid);
if ($use_answers) {
$Query = "SELECT qid, answer as question, code as title, sortorder as aid FROM {{answers}} WHERE qid = $qid AND language='$quexmllang' ORDER BY sortorder ASC";
Expand Down

0 comments on commit c72d2e0

Please sign in to comment.