mirror of
https://github.com/ACSPRI/queXS
synced 2024-04-02 12:12:16 +00:00
remove LIME from quotarow: more testing req
This commit is contained in:
@@ -435,15 +435,11 @@ if ($questionnaire_id != false)
|
|||||||
if (isset($_GET['sgqa']))
|
if (isset($_GET['sgqa']))
|
||||||
$ssgqa = $db->qstr($_GET['sgqa']);
|
$ssgqa = $db->qstr($_GET['sgqa']);
|
||||||
|
|
||||||
//select question + corrected question order as in questionnaire with subquestions
|
include_once("../functions/functions.limesurvey.php");
|
||||||
$sql = "SELECT CONCAT( lq.sid, 'X', lq.gid, 'X', CASE WHEN lq.parent_qid = 0 THEN lq.qid ELSE CONCAT(lq.parent_qid, lq.title) END) as value, CONCAT( lq.sid, 'X', lq.gid, 'X', CASE WHEN lq.parent_qid = 0 THEN lq.qid ELSE CONCAT(lq.parent_qid, lq.title) END, ' -> ' , CASE WHEN lq.parent_qid = 0 THEN lq.question ELSE CONCAT(lq2.question, ' : ', lq.question) END) as description, CASE WHEN $ssgqa LIKE CONCAT( lq.sid, 'X', lq.gid, 'X', CASE WHEN lq.parent_qid = 0 THEN lq.qid ELSE CONCAT(lq.parent_qid, lq.title) END) THEN 'selected=\'selected\'' ELSE '' END AS selected
|
|
||||||
FROM `" . LIME_PREFIX . "questions` AS lq
|
|
||||||
LEFT JOIN `" . LIME_PREFIX . "questions` AS lq2 ON ( lq2.qid = lq.parent_qid )
|
|
||||||
JOIN `" . LIME_PREFIX . "groups` as g ON (g.gid = lq.gid)
|
|
||||||
WHERE lq.sid = '$lime_sid'
|
|
||||||
ORDER BY CASE WHEN lq2.question_order IS NULL THEN lq.question_order ELSE lq2.question_order + (lq.question_order / 1000) END ASC";
|
|
||||||
|
|
||||||
$rsgqa = $db->GetAll($sql);
|
$rsgqa = lime_list_questions($questionnaire_id);
|
||||||
|
//TODO: check output matches
|
||||||
|
var_dump($rsgqa); die();
|
||||||
|
|
||||||
if (!empty($rsgqa))
|
if (!empty($rsgqa))
|
||||||
{
|
{
|
||||||
@@ -471,10 +467,10 @@ if ($questionnaire_id != false)
|
|||||||
$qid = explode("X", $sgqa);
|
$qid = explode("X", $sgqa);
|
||||||
$qid = $qid[2];
|
$qid = $qid[2];
|
||||||
|
|
||||||
$sql = "SELECT CONCAT('<b class=\'fa\'> ', l.code , '</b>')as code, l.answer as title
|
|
||||||
FROM `" . LIME_PREFIX . "answers` as l
|
$rsc = lime_list_answeroptions($questionnaire_id,$sgqa);
|
||||||
WHERE l.qid = '$qid'";
|
//TODO: check output matches
|
||||||
$rsc = $db->GetAll($sql);
|
var_dump($rsc); die();
|
||||||
}
|
}
|
||||||
if (!isset($rsc) || empty($rsc))
|
if (!isset($rsc) || empty($rsc))
|
||||||
print "<h4 class= 'alert alert-info'>" . T_("No labels defined for this question") ."</h4>";
|
print "<h4 class= 'alert alert-info'>" . T_("No labels defined for this question") ."</h4>";
|
||||||
|
|||||||
Reference in New Issue
Block a user