mirror of
https://github.com/ACSPRI/queXS
synced 2024-04-02 12:12:16 +00:00
merged changes from main rev 445
This commit is contained in:
@@ -293,7 +293,7 @@ function limesurvey_quota_replicate_completions($lime_sid,$questionnaire_id,$sam
|
||||
|
||||
$sql = "SELECT COUNT(*)
|
||||
FROM information_schema.tables
|
||||
WHERE table_schema = '".DB_NAME."'
|
||||
WHERE table_schema = 'quexs'
|
||||
AND table_name = '" . LIME_PREFIX . "survey_$lime_sid'";
|
||||
|
||||
$rs = $db->GetOne($sql);
|
||||
@@ -402,7 +402,7 @@ function limesurvey_quota_completions($lime_sgqa,$lime_sid,$questionnaire_id,$sa
|
||||
|
||||
$sql = "SELECT COUNT(*)
|
||||
FROM information_schema.tables
|
||||
WHERE table_schema = '".DB_NAME."'
|
||||
WHERE table_schema = 'quexs'
|
||||
AND table_name = '" . LIME_PREFIX . "survey_$lime_sid'";
|
||||
|
||||
$rs = $db->GetOne($sql);
|
||||
@@ -432,18 +432,18 @@ function limesurvey_quota_completions($lime_sgqa,$lime_sid,$questionnaire_id,$sa
|
||||
* Based on GetQuotaInformation() from common.php in Limesurvey
|
||||
*
|
||||
* @param int $lime_quota_id The quota id to get information on
|
||||
* @param string $baselang The base language for getting information from questions
|
||||
* @return array An array containing the question information for comparison
|
||||
*/
|
||||
function get_limesurvey_quota_info($lime_quota_id)
|
||||
function get_limesurvey_quota_info($lime_quota_id,$baselang = DEFAULT_LOCALE)
|
||||
{
|
||||
global $db;
|
||||
|
||||
$ret = array();
|
||||
|
||||
$sql = "SELECT q.*,s.language
|
||||
FROM ".LIME_PREFIX."quota_members as q, ".LIME_PREFIX."surveys as s
|
||||
WHERE q.quota_id='$lime_quota_id'
|
||||
AND s.sid = q.sid";
|
||||
$sql = "SELECT *
|
||||
FROM ".LIME_PREFIX."quota_members
|
||||
WHERE quota_id='$lime_quota_id'";
|
||||
|
||||
$rs = $db->GetAll($sql);
|
||||
|
||||
@@ -451,12 +451,11 @@ function get_limesurvey_quota_info($lime_quota_id)
|
||||
{
|
||||
$lime_qid = $quota_entry['qid'];
|
||||
$surveyid = $quota_entry['sid'];
|
||||
$language = $quota_entry['language'];
|
||||
|
||||
$sql = "SELECT type, title,gid
|
||||
FROM ".LIME_PREFIX."questions
|
||||
WHERE qid='$lime_qid'
|
||||
AND language='$language'";
|
||||
AND language='$baselang'";
|
||||
|
||||
$qtype = $db->GetRow($sql);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user