2
0
mirror of https://github.com/ACSPRI/queXS synced 2024-04-02 12:12:16 +00:00

Default to selected mode of delivery if no token in queXS to determine mode of delivery

This commit is contained in:
Adam Zammit
2017-01-10 10:41:05 +11:00
parent 0c56dc78c0
commit 2b6ce2ae1b
2 changed files with 10 additions and 4 deletions

View File

@@ -21,7 +21,9 @@ include_once("quexs.php"); //queXS funcitons
$LEMdebugLevel=0; // LEM_DEBUG_TIMING; // (LEM_DEBUG_TIMING + LEM_DEBUG_VALIDATION_SUMMARY + LEM_DEBUG_VALIDATION_DETAIL); $LEMdebugLevel=0; // LEM_DEBUG_TIMING; // (LEM_DEBUG_TIMING + LEM_DEBUG_VALIDATION_SUMMARY + LEM_DEBUG_VALIDATION_DETAIL);
$LEMskipReprocessing=false; // true if used GetLastMoveResult to avoid generation of unneeded extra JavaScript $LEMskipReprocessing=false; // true if used GetLastMoveResult to avoid generation of unneeded extra JavaScript
if ($interviewer) $surveyMode=quexs_get_survey_mode($clienttoken);
if ($interviewer || $surveyMode === false)
{ {
switch ($thissurvey['format']) switch ($thissurvey['format'])
{ {
@@ -37,8 +39,6 @@ if ($interviewer)
break; break;
} }
} }
else
$surveyMode=quexs_get_survey_mode($clienttoken);
$radix=getRadixPointData($thissurvey['surveyls_numberformat']); $radix=getRadixPointData($thissurvey['surveyls_numberformat']);
$radix = $radix['seperator']; $radix = $radix['seperator'];

View File

@@ -109,7 +109,13 @@ function quexs_get_survey_mode($clienttoken)
WHERE q.questionnaire_id = c.questionnaire_id WHERE q.questionnaire_id = c.questionnaire_id
AND c.token = '$clienttoken'"; AND c.token = '$clienttoken'";
return $db->GetOne($sql); $md = $db->GetOne($sql);
if (empty($md)) {
return false;
} else {
return $md;
}
} }