mirror of
https://github.com/ACSPRI/queXS
synced 2024-04-02 12:12:16 +00:00
Merging the Limesurvey 1.91+ branch of queXS in to the trunk
This commit is contained in:
@@ -66,6 +66,7 @@ $sql = "SELECT ca1 AS callattempts, COUNT( ca1 ) AS sample
|
||||
|
||||
xhtml_table($db->GetAll($sql),array("sample","callattempts"),array(T_("Number of cases"),T_("Call attempts made")),"tclass",false,array("sample"));
|
||||
|
||||
print "<h2>" . T_("Please select a questionnaire") . "</h2>";
|
||||
$questionnaire_id = false;
|
||||
if (isset($_GET['questionnaire_id'])) $questionnaire_id = bigintval($_GET['questionnaire_id']);
|
||||
display_questionnaire_chooser($questionnaire_id);
|
||||
@@ -79,52 +80,66 @@ if ($questionnaire_id)
|
||||
GROUP BY call_attempt.case_id) AS t1
|
||||
GROUP BY ca1";
|
||||
|
||||
print "<h2>" . T_("This project") . "</h2>";
|
||||
xhtml_table($db->GetAll($sql),array("sample","callattempts"),array(T_("Number of cases"),T_("Call attempts made")),"tclass",false,array("sample"));
|
||||
$cal = $db->GetAll($sql);
|
||||
|
||||
$sample_import_id = false;
|
||||
if (isset($_GET['sample_import_id'])) $sample_import_id = bigintval($_GET['sample_import_id']);
|
||||
display_sample_chooser($questionnaire_id,$sample_import_id);
|
||||
|
||||
if ($sample_import_id)
|
||||
if (!empty($cal))
|
||||
{
|
||||
$sql = "SELECT ca1 AS callattempts, COUNT( ca1 ) AS sample
|
||||
FROM ( SELECT count( call_attempt.call_attempt_id ) AS ca1
|
||||
FROM call_attempt
|
||||
JOIN `case` ON (`case`.case_id = call_attempt.case_id AND `case`.questionnaire_id = '$questionnaire_id')
|
||||
JOIN sample ON (sample.sample_id = `case`.sample_id AND sample.import_id = '$sample_import_id')
|
||||
GROUP BY call_attempt.case_id) AS t1
|
||||
GROUP BY ca1";
|
||||
|
||||
print "<h2>" . T_("This sample") . "</h2>";
|
||||
xhtml_table($db->GetAll($sql),array("sample","callattempts"),array(T_("Number of cases"),T_("Call attempts made")),"tclass",false,array("sample"));
|
||||
xhtml_table($cal,array("sample","callattempts"),array(T_("Number of cases"),T_("Call attempts made")),"tclass",false,array("sample"));
|
||||
|
||||
print "<h2>" . T_("Please select a sample") . "</h2>";
|
||||
$sample_import_id = false;
|
||||
if (isset($_GET['sample_import_id'])) $sample_import_id = bigintval($_GET['sample_import_id']);
|
||||
display_sample_chooser($questionnaire_id,$sample_import_id);
|
||||
|
||||
$questionnaire_sample_quota_row_id = false;
|
||||
if (isset($_GET['questionnaire_sample_quota_row_id'])) $questionnaire_sample_quota_row_id = bigintval($_GET['questionnaire_sample_quota_row_id']);
|
||||
display_quota_chooser($questionnaire_id,$sample_import_id,$questionnaire_sample_quota_row_id);
|
||||
|
||||
if ($questionnaire_sample_quota_row_id)
|
||||
if ($sample_import_id)
|
||||
{
|
||||
$sql = "SELECT ca1 AS callattempts, COUNT( ca1 ) AS sample
|
||||
FROM ( SELECT count( call_attempt.call_attempt_id ) AS ca1
|
||||
FROM call_attempt
|
||||
JOIN `case` ON (`case`.case_id = call_attempt.case_id AND `case`.questionnaire_id = '$questionnaire_id')
|
||||
JOIN sample ON (sample.sample_id = `case`.sample_id AND sample.import_id = '$sample_import_id')
|
||||
JOIN questionnaire_sample_quota_row as q ON (q.questionnaire_sample_quota_row_id = '$questionnaire_sample_quota_row_id')
|
||||
JOIN sample_var ON (sample_var.sample_id = `case`.sample_id AND sample_var.var LIKE q.exclude_var AND sample_var.val LIKE q.exclude_val)
|
||||
GROUP BY call_attempt.case_id) AS t1
|
||||
GROUP BY ca1";
|
||||
|
||||
print "<h2>" . T_("This quota") . "</h2>";
|
||||
xhtml_table($db->GetAll($sql),array("sample","callattempts"),array(T_("Number of cases"),T_("Call attempts made")),"tclass",false,array("sample"));
|
||||
$cal = $db->GetAll($sql);
|
||||
|
||||
if (!empty($cal))
|
||||
{
|
||||
xhtml_table($cal,array("sample","callattempts"),array(T_("Number of cases"),T_("Call attempts made")),"tclass",false,array("sample"));
|
||||
|
||||
$questionnaire_sample_quota_row_id = false;
|
||||
if (isset($_GET['questionnaire_sample_quota_row_id'])) $questionnaire_sample_quota_row_id = bigintval($_GET['questionnaire_sample_quota_row_id']);
|
||||
print "<h2>" . T_("Please select a quota") . "</h2>";
|
||||
display_quota_chooser($questionnaire_id,$sample_import_id,$questionnaire_sample_quota_row_id);
|
||||
|
||||
if ($questionnaire_sample_quota_row_id)
|
||||
{
|
||||
$sql = "SELECT ca1 AS callattempts, COUNT( ca1 ) AS sample
|
||||
FROM ( SELECT count( call_attempt.call_attempt_id ) AS ca1
|
||||
FROM call_attempt
|
||||
JOIN `case` ON (`case`.case_id = call_attempt.case_id AND `case`.questionnaire_id = '$questionnaire_id')
|
||||
JOIN sample ON (sample.sample_id = `case`.sample_id AND sample.import_id = '$sample_import_id')
|
||||
JOIN questionnaire_sample_quota_row as q ON (q.questionnaire_sample_quota_row_id = '$questionnaire_sample_quota_row_id')
|
||||
JOIN sample_var ON (sample_var.sample_id = `case`.sample_id AND sample_var.var LIKE q.exclude_var AND sample_var.val LIKE q.exclude_val)
|
||||
GROUP BY call_attempt.case_id) AS t1
|
||||
GROUP BY ca1";
|
||||
|
||||
$cal = $db->GetAll($sql);
|
||||
if (empty($cal))
|
||||
print "<p>" . T_("No calls for this quota") . "</p>";
|
||||
else
|
||||
xhtml_table($cal,array("sample","callattempts"),array(T_("Number of cases"),T_("Call attempts made")),"tclass",false,array("sample"));
|
||||
}
|
||||
}
|
||||
else
|
||||
print "<p>" . T_("No calls for this sample") . "</p>";
|
||||
}
|
||||
}
|
||||
else
|
||||
print "<p>" . T_("No calls for this questionnaire") . "</p>";
|
||||
}
|
||||
|
||||
xhtml_foot();
|
||||
|
||||
|
||||
|
||||
?>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user