mirror of
https://github.com/ACSPRI/queXS
synced 2024-04-02 12:12:16 +00:00
Fixes Bug lp:141380 System sort process fails when quotas enabled and limesurvey instrument de-activated
This commit is contained in:
@@ -291,6 +291,16 @@ function limesurvey_quota_replicate_completions($lime_sid,$questionnaire_id,$sam
|
||||
{
|
||||
global $db;
|
||||
|
||||
$sql = "SELECT COUNT(*)
|
||||
FROM information_schema.tables
|
||||
WHERE table_schema = 'quexs'
|
||||
AND table_name = '" . LIME_PREFIX . "survey_$lime_sid'";
|
||||
|
||||
$rs = $db->GetOne($sql);
|
||||
|
||||
if ($rs != 1)
|
||||
return false;
|
||||
|
||||
$sql = "SELECT count(*) as c
|
||||
FROM " . LIME_PREFIX . "survey_$lime_sid as s
|
||||
JOIN `case` as c ON (c.questionnaire_id = '$questionnaire_id')
|
||||
@@ -390,6 +400,16 @@ function limesurvey_quota_completions($lime_sgqa,$lime_sid,$questionnaire_id,$sa
|
||||
{
|
||||
global $db;
|
||||
|
||||
$sql = "SELECT COUNT(*)
|
||||
FROM information_schema.tables
|
||||
WHERE table_schema = 'quexs'
|
||||
AND table_name = '" . LIME_PREFIX . "survey_$lime_sid'";
|
||||
|
||||
$rs = $db->GetOne($sql);
|
||||
|
||||
if ($rs != 1)
|
||||
return false;
|
||||
|
||||
$sql = "SELECT count(*) as c
|
||||
FROM " . LIME_PREFIX . "survey_$lime_sid as s
|
||||
JOIN `case` as c ON (c.questionnaire_id = '$questionnaire_id')
|
||||
|
||||
Reference in New Issue
Block a user