mirror of
https://github.com/ACSPRI/queXS
synced 2024-04-02 12:12:16 +00:00
Bug fixes from Alex - thank you
This commit is contained in:
@@ -82,7 +82,7 @@ if ($operator_id)
|
|||||||
{
|
{
|
||||||
if (isset($_GET['questionnaire_id'])) $qid = $_GET['questionnaire_id'];
|
if (isset($_GET['questionnaire_id'])) $qid = $_GET['questionnaire_id'];
|
||||||
if (isset($_GET['sample_import_id'])) $sid = $_GET['sample_import_id'];
|
if (isset($_GET['sample_import_id'])) $sid = $_GET['sample_import_id'];
|
||||||
$sql = "SELECT DATE_FORMAT(CONVERT_TZ(c.start,'UTC',op.Time_zone_name),'".DATE_FORMAT."') as start_date, DATE_FORMAT(CONVERT_TZ(c.start,'UTC',op.Time_zone_name),'".TIME_FORMAT."') as start_time, DATE_FORMAT(CONVERT_TZ(c.end,'UTC',op.Time_zone_name),'".TIME_FORMAT."') as end, o.description as descr, (CONCAT(r.firstName,' ',r.lastName)) as firstName, opp.firstName as opname,
|
$sql = "SELECT DATE_FORMAT(CONVERT_TZ(c.start,'UTC',op.Time_zone_name),'".DATE_FORMAT."') as start_date, DATE_FORMAT(CONVERT_TZ(c.start,'UTC',op.Time_zone_name),'".TIME_FORMAT."') as start_time, DATE_FORMAT(CONVERT_TZ(c.end,'UTC',op.Time_zone_name),'".TIME_FORMAT."') as end, o.description as descr, (CONCAT(r.firstName,' ',r.lastName)) as firstName, CONCAT(opp.firstName, ' ', opp.lastName) as opname,
|
||||||
(SELECT GROUP_CONCAT(cn1.note SEPARATOR '</br>¶ ' ) FROM `case_note` as cn1 WHERE c.case_id = cn1.case_id GROUP BY cn1.case_id)as casenotes,";
|
(SELECT GROUP_CONCAT(cn1.note SEPARATOR '</br>¶ ' ) FROM `case_note` as cn1 WHERE c.case_id = cn1.case_id GROUP BY cn1.case_id)as casenotes,";
|
||||||
|
|
||||||
if (isset($_GET['csv'])) $sql .= " c.case_id ";
|
if (isset($_GET['csv'])) $sql .= " c.case_id ";
|
||||||
|
|||||||
@@ -110,8 +110,7 @@ function case_status_report($questionnaire_id = false, $sample_id = false, $outc
|
|||||||
LEFT JOIN outcome as co ON (co.outcome_id = ca.outcome_id)
|
LEFT JOIN outcome as co ON (co.outcome_id = ca.outcome_id)
|
||||||
LEFT JOIN case_queue as cq ON (cq.case_id = c.case_id)
|
LEFT JOIN case_queue as cq ON (cq.case_id = c.case_id)
|
||||||
LEFT JOIN operator as oq ON (cq.operator_id = oq.operator_id)
|
LEFT JOIN operator as oq ON (cq.operator_id = oq.operator_id)
|
||||||
LEFT JOIN (questionnaire_sample_quota as qsq) on (s.import_id = qsq.sample_import_id and c.questionnaire_id = qsq.questionnaire_id)
|
LEFT JOIN (questionnaire_sample_quota as qsq, questionnaire_sample_quota_row as qsqr) on (s.import_id = qsq.sample_import_id and c.questionnaire_id = qsq.questionnaire_id and s.import_id = qsqr.sample_import_id and c.questionnaire_id = qsqr.questionnaire_id)
|
||||||
LEFT JOIN (questionnaire_sample_quota_row as qsqr) on (s.import_id = qsqr.sample_import_id and c.questionnaire_id = qsqr.questionnaire_id)
|
|
||||||
WHERE c.current_operator_id IS NULL $q $o
|
WHERE c.current_operator_id IS NULL $q $o
|
||||||
AND (qsq.quota_reached IS NULL OR qsq.quota_reached != 1 )
|
AND (qsq.quota_reached IS NULL OR qsq.quota_reached != 1 )
|
||||||
AND (qsqr.quota_reached IS NULL OR qsqr.quota_reached != 1)
|
AND (qsqr.quota_reached IS NULL OR qsqr.quota_reached != 1)
|
||||||
|
|||||||
@@ -149,6 +149,7 @@ if (isset($_GET['key']) || isset($_GET['sample']))
|
|||||||
}
|
}
|
||||||
if (isset($_GET['sample']))
|
if (isset($_GET['sample']))
|
||||||
{
|
{
|
||||||
|
$l['description'] = T_($l['description']);
|
||||||
echo "," . str_replace(","," ",$l['description']) . "," .$l['callattempts']."," .$l['calls']."," .$l['casenotes'].",".$l['interviewtimec'].",".$l['interviewtimel'].",".$l['lastnumber'].",".$l['lastcallstart'].",".$l['operatoru'].",".$l['shiftr'].",". $l['aapor_id'];
|
echo "," . str_replace(","," ",$l['description']) . "," .$l['callattempts']."," .$l['calls']."," .$l['casenotes'].",".$l['interviewtimec'].",".$l['interviewtimel'].",".$l['lastnumber'].",".$l['lastcallstart'].",".$l['operatoru'].",".$l['shiftr'].",". $l['aapor_id'];
|
||||||
}
|
}
|
||||||
echo "\n";
|
echo "\n";
|
||||||
@@ -201,7 +202,7 @@ xhtml_head(T_("Data output"),true,array("../include/bootstrap/css/bootstrap.min.
|
|||||||
print "<div class='form-group clearfix'><h3 class='col-sm-4 text-right'>" . T_("Please select a questionnaire") . ": </h3>";
|
print "<div class='form-group clearfix'><h3 class='col-sm-4 text-right'>" . T_("Please select a questionnaire") . ": </h3>";
|
||||||
$questionnaire_id = false;
|
$questionnaire_id = false;
|
||||||
if (isset($_GET['questionnaire_id'])) $questionnaire_id = bigintval($_GET['questionnaire_id']);
|
if (isset($_GET['questionnaire_id'])) $questionnaire_id = bigintval($_GET['questionnaire_id']);
|
||||||
display_questionnaire_chooser($questionnaire_id,false,"form-inline col-sm-3 pull-left", "form-control");
|
display_questionnaire_chooser($questionnaire_id,false,"form-inline col-lg-4 pull-left", "form-control");
|
||||||
|
|
||||||
if ($questionnaire_id)
|
if ($questionnaire_id)
|
||||||
{
|
{
|
||||||
@@ -217,7 +218,7 @@ if ($questionnaire_id)
|
|||||||
print "<div class='form-group clearfix'><h3 class='col-sm-4 text-right'>" . T_("Please select a sample") . ": </h3>";
|
print "<div class='form-group clearfix'><h3 class='col-sm-4 text-right'>" . T_("Please select a sample") . ": </h3>";
|
||||||
$sample_import_id = false;
|
$sample_import_id = false;
|
||||||
if (isset($_GET['sample_import_id'])) $sample_import_id = bigintval($_GET['sample_import_id']);
|
if (isset($_GET['sample_import_id'])) $sample_import_id = bigintval($_GET['sample_import_id']);
|
||||||
display_sample_chooser($questionnaire_id,$sample_import_id,false,"form-inline col-sm-3 pull-left", "form-control");
|
display_sample_chooser($questionnaire_id,$sample_import_id,false,"form-inline col-lg-4 pull-left", "form-control");
|
||||||
|
|
||||||
if ($sample_import_id)
|
if ($sample_import_id)
|
||||||
{
|
{
|
||||||
@@ -231,7 +232,7 @@ if ($questionnaire_id)
|
|||||||
//download a key file linking the caseid to the sample
|
//download a key file linking the caseid to the sample
|
||||||
print "<div class='form-group '><h3 class='col-sm-4 text-right'>" . T_("Download key file: select sample var") . ": </h3>";
|
print "<div class='form-group '><h3 class='col-sm-4 text-right'>" . T_("Download key file: select sample var") . ": </h3>";
|
||||||
|
|
||||||
display_chooser($rs,"sample_var","sample_var",true,"questionnaire_id=$questionnaire_id&sample_import_id=$sample_import_id",true,true,false,true,"form-inline col-sm-3 pull-left");
|
display_chooser($rs,"sample_var","sample_var",true,"questionnaire_id=$questionnaire_id&sample_import_id=$sample_import_id",true,true,false,true,"form-inline col-lg-4 pull-left");
|
||||||
|
|
||||||
print "</div><div class=' col-sm-4'>";
|
print "</div><div class=' col-sm-4'>";
|
||||||
|
|
||||||
|
|||||||
@@ -301,12 +301,11 @@ else {
|
|||||||
JOIN (`case` as c, respondent as r, questionnaire as q, operator as oo, call_attempt as cc, `sample` as s, sample_import as si) on (c.sample_id = s.sample_id and a.case_id = c.case_id and a.respondent_id = r.respondent_id and q.questionnaire_id = c.questionnaire_id and a.call_attempt_id = cc.call_attempt_id and cc.operator_id = oo.operator_id and si.sample_import_id = s.import_id)
|
JOIN (`case` as c, respondent as r, questionnaire as q, operator as oo, call_attempt as cc, `sample` as s, sample_import as si) on (c.sample_id = s.sample_id and a.case_id = c.case_id and a.respondent_id = r.respondent_id and q.questionnaire_id = c.questionnaire_id and a.call_attempt_id = cc.call_attempt_id and cc.operator_id = oo.operator_id and si.sample_import_id = s.import_id)
|
||||||
LEFT JOIN (`call` as ca, outcome as ou, operator as ooo) ON (ca.call_id = a.completed_call_id and ou.outcome_id = ca.outcome_id and ca.operator_id = ooo.operator_id)
|
LEFT JOIN (`call` as ca, outcome as ou, operator as ooo) ON (ca.call_id = a.completed_call_id and ou.outcome_id = ca.outcome_id and ca.operator_id = ooo.operator_id)
|
||||||
LEFT JOIN operator AS ao ON ao.operator_id = a.require_operator_id
|
LEFT JOIN operator AS ao ON ao.operator_id = a.require_operator_id
|
||||||
LEFT JOIN (questionnaire_sample_quota as qsq) on (s.import_id = qsq.sample_import_id and c.questionnaire_id = qsq.questionnaire_id)
|
LEFT JOIN (questionnaire_sample_quota as qsq, questionnaire_sample_quota_row as qsqr) on (s.import_id = qsq.sample_import_id and c.questionnaire_id = qsq.questionnaire_id and s.import_id = qsqr.sample_import_id and c.questionnaire_id = qsqr.questionnaire_id)
|
||||||
LEFT JOIN (questionnaire_sample_quota_row as qsqr) on (s.import_id = qsqr.sample_import_id and c.questionnaire_id = qsqr.questionnaire_id)
|
WHERE q.enabled=1 AND si.enabled=1 AND a.end >= CONVERT_TZ(NOW(),'System','UTC') AND c.current_outcome_id IN (19,20,21,22)
|
||||||
WHERE q.enabled=1 AND si.enabled=1 AND a.end >= CONVERT_TZ(NOW(),'System','UTC') AND c.current_outcome_id !=10
|
|
||||||
AND (qsq.quota_reached IS NULL OR qsq.quota_reached != 1)
|
AND (qsq.quota_reached IS NULL OR qsq.quota_reached != 1)
|
||||||
AND (qsqr.quota_reached IS NULL OR qsqr.quota_reached != 1)
|
AND (qsqr.quota_reached IS NULL OR qsqr.quota_reached != 1)
|
||||||
ORDER BY a.start ASC";
|
GROUP BY c.case_id ORDER BY a.start ASC";
|
||||||
|
|
||||||
$rs = $db->GetAll($sql);
|
$rs = $db->GetAll($sql);
|
||||||
if (!empty($rs)) {
|
if (!empty($rs)) {
|
||||||
@@ -324,9 +323,8 @@ else {
|
|||||||
FROM appointment as a
|
FROM appointment as a
|
||||||
JOIN (`case` as c, respondent as r, questionnaire as q, `sample` as s, sample_import as si) on (a.case_id = c.case_id and a.respondent_id = r.respondent_id and q.questionnaire_id = c.questionnaire_id and s.sample_id = c.sample_id and s.import_id= si.sample_import_id)
|
JOIN (`case` as c, respondent as r, questionnaire as q, `sample` as s, sample_import as si) on (a.case_id = c.case_id and a.respondent_id = r.respondent_id and q.questionnaire_id = c.questionnaire_id and s.sample_id = c.sample_id and s.import_id= si.sample_import_id)
|
||||||
LEFT JOIN (`call` as ca) ON (ca.call_id = a.completed_call_id)
|
LEFT JOIN (`call` as ca) ON (ca.call_id = a.completed_call_id)
|
||||||
LEFT JOIN (questionnaire_sample_quota as qsq) on (s.import_id = qsq.sample_import_id and c.questionnaire_id = qsq.questionnaire_id)
|
LEFT JOIN (questionnaire_sample_quota as qsq, questionnaire_sample_quota_row as qsqr) on (s.import_id = qsq.sample_import_id and c.questionnaire_id = qsq.questionnaire_id and s.import_id = qsqr.sample_import_id and c.questionnaire_id = qsqr.questionnaire_id)
|
||||||
LEFT JOIN (questionnaire_sample_quota_row as qsqr) on (s.import_id = qsqr.sample_import_id and c.questionnaire_id = qsqr.questionnaire_id)
|
WHERE q.enabled=1 AND si.enabled=1 AND a.end < CONVERT_TZ(NOW(),'System','UTC') AND a.completed_call_id IS NULL AND c.current_outcome_id IN (19,20,21,22)
|
||||||
WHERE q.enabled=1 AND si.enabled=1 AND a.end < CONVERT_TZ(NOW(),'System','UTC') AND a.completed_call_id IS NULL AND c.current_outcome_id !=10
|
|
||||||
AND (qsq.quota_reached IS NULL OR qsq.quota_reached != 1 )
|
AND (qsq.quota_reached IS NULL OR qsq.quota_reached != 1 )
|
||||||
AND (qsqr.quota_reached IS NULL OR qsqr.quota_reached != 1)
|
AND (qsqr.quota_reached IS NULL OR qsqr.quota_reached != 1)
|
||||||
GROUP BY c.case_id
|
GROUP BY c.case_id
|
||||||
|
|||||||
@@ -250,7 +250,7 @@ else
|
|||||||
|
|
||||||
if (!empty($rs))
|
if (!empty($rs))
|
||||||
{
|
{
|
||||||
$sql = "SELECT o.operator_id as value, o.firstName as description
|
$sql = "SELECT o.operator_id as value, CONCAT(o.firstName,' ',o.lastname) as description
|
||||||
FROM `operator` as o
|
FROM `operator` as o
|
||||||
LEFT JOIN `extension` as e ON (e.current_operator_id = o.operator_id)
|
LEFT JOIN `extension` as e ON (e.current_operator_id = o.operator_id)
|
||||||
WHERE e.extension_id IS NULL";
|
WHERE e.extension_id IS NULL";
|
||||||
|
|||||||
@@ -309,7 +309,7 @@ if ($questionnaire_id != false)
|
|||||||
AND s.enabled = 1";
|
AND s.enabled = 1";
|
||||||
$s = $db->GetAll($sql);
|
$s = $db->GetAll($sql);
|
||||||
if (!empty($s)){
|
if (!empty($s)){
|
||||||
print "<h3 class='form-inline pull-left'>   " . T_("Sample") . ": </h3>";
|
print "<h3 class='form-inline pull-left'> " . T_("Sample") . ": </h3>";
|
||||||
|
|
||||||
display_chooser($s,"sample","sample_import_id",true,"questionnaire_id=$questionnaire_id",true,true,false,true,"pull-left");
|
display_chooser($s,"sample","sample_import_id",true,"questionnaire_id=$questionnaire_id",true,true,false,true,"pull-left");
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -107,12 +107,12 @@ xhtml_head(T_("Search the sample"),true,$css,$js_head);
|
|||||||
echo "<a href='' onclick='history.back();return false;' class='btn btn-default pull-left' ><i class='fa fa-chevron-left text-primary'></i> " . T_("Go back") . "</a>";
|
echo "<a href='' onclick='history.back();return false;' class='btn btn-default pull-left' ><i class='fa fa-chevron-left text-primary'></i> " . T_("Go back") . "</a>";
|
||||||
|
|
||||||
$sql = "SELECT sample_import_id as value,description, CASE WHEN sample_import_id = '$sample_import_id' THEN 'selected=\'selected\'' ELSE '' END AS selected
|
$sql = "SELECT sample_import_id as value,description, CASE WHEN sample_import_id = '$sample_import_id' THEN 'selected=\'selected\'' ELSE '' END AS selected
|
||||||
FROM sample_import";
|
FROM sample_import ORDER BY description ASC";
|
||||||
$r = $db->GetAll($sql);
|
$r = $db->GetAll($sql);
|
||||||
|
|
||||||
if(!empty($r))
|
if(!empty($r))
|
||||||
|
|
||||||
print "<div class=' form-inline form-group col-md-6'><h4 class='control-label form-group col-sm-6 text-right'>" . T_("Select sample ") . " </h4>";
|
print "<div class=' form-inline form-group col-md-10'><h4 class='control-label form-group col-md-4 text-right'>" . T_("Select sample ") . "</h4>";
|
||||||
display_chooser($r,"sample_import_id","sample_import_id",true,false,true,false);
|
display_chooser($r,"sample_import_id","sample_import_id",true,false,true,false);
|
||||||
|
|
||||||
print "</div>";
|
print "</div>";
|
||||||
|
|||||||
@@ -137,8 +137,7 @@ xhtml_head(T_("Assign outcomes to cases"),true,$css,$js_head);
|
|||||||
<?php
|
<?php
|
||||||
$sql = "SELECT c.case_id as value, c.case_id as description, CASE WHEN c.case_id = '$case_id' THEN 'selected=\'selected\'' ELSE '' END AS selected
|
$sql = "SELECT c.case_id as value, c.case_id as description, CASE WHEN c.case_id = '$case_id' THEN 'selected=\'selected\'' ELSE '' END AS selected
|
||||||
FROM `case` AS c, `outcome` AS o, `questionnaire` AS q, `sample` AS s, `sample_import` AS si
|
FROM `case` AS c, `outcome` AS o, `questionnaire` AS q, `sample` AS s, `sample_import` AS si
|
||||||
LEFT JOIN (questionnaire_sample_quota as qsq) on (si.sample_import_id = qsq.sample_import_id)
|
LEFT JOIN (questionnaire_sample_quota as qsq, questionnaire_sample_quota_row as qsqr) on (si.sample_import_id = qsq.sample_import_id and si.sample_import_id = qsqr.sample_import_id)
|
||||||
LEFT JOIN (questionnaire_sample_quota_row as qsqr) on (si.sample_import_id = qsqr.sample_import_id)
|
|
||||||
WHERE c.current_outcome_id = o.outcome_id
|
WHERE c.current_outcome_id = o.outcome_id
|
||||||
AND q.questionnaire_id = c.questionnaire_id
|
AND q.questionnaire_id = c.questionnaire_id
|
||||||
AND s.sample_id = c.sample_id
|
AND s.sample_id = c.sample_id
|
||||||
|
|||||||
2
call.php
2
call.php
@@ -132,7 +132,7 @@ function display_outcomes($contacted,$ca,$case_id)
|
|||||||
WHERE outcome_type_id != '5'
|
WHERE outcome_type_id != '5'
|
||||||
$ctd
|
$ctd
|
||||||
AND outcome_id IN ($outcomes)
|
AND outcome_id IN ($outcomes)
|
||||||
AND outcome_id NOT IN(10,42,43,44,45)"; //don't show completed if not, hide max calls as the supposed to be automatic or admin
|
AND outcome_id NOT IN(10,32,42,43,44,45)"; //don't show completed if not, Lime_Quota_full if not, hide max calls as they supposed to be automatic or admin-privileged
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$rs = $db->GetAll($sql);
|
$rs = $db->GetAll($sql);
|
||||||
|
|||||||
@@ -131,7 +131,9 @@ function display_outcomes($contacted,$ca,$case_id)
|
|||||||
$sql = "SELECT outcome_id,description,contacted
|
$sql = "SELECT outcome_id,description,contacted
|
||||||
FROM outcome
|
FROM outcome
|
||||||
WHERE contacted = '$contacted'
|
WHERE contacted = '$contacted'
|
||||||
AND outcome_id NOT IN(5,10,19,21,40,41,42,43,44,45)";
|
AND outcome_type_id != '5'
|
||||||
|
AND outcome_id IN ($outcomes)
|
||||||
|
AND outcome_id NOT IN(10,32,42,43,44,45)"; //don't show completed if not, Lime_Quota_full if not, hide max calls as they supposed to be automatic or admin-privileged
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$rs = $db->GetAll($sql);
|
$rs = $db->GetAll($sql);
|
||||||
@@ -267,7 +269,7 @@ if (isset($_POST['submit']))
|
|||||||
$newtext = T_("Start REC");
|
$newtext = T_("Start REC");
|
||||||
$js = "js/window_interface2.js";
|
$js = "js/window_interface2.js";
|
||||||
if (browser_ie()) $js = "js/window_ie6_interface2.js";
|
if (browser_ie()) $js = "js/window_ie6_interface2.js";
|
||||||
xhtml_head(T_("Call"),true,array("css/call.css"),array($js),"parent.closePopup();'");
|
xhtml_head(T_("Call"),true,array("css/call.css"),array($js),"onload='parent.closePopup();'");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -118,8 +118,7 @@ function display_sample_chooser($questionnaire_id, $sample_import_id = false, $d
|
|||||||
if (!$disabled) $s = " AND si.enabled = 1 "; else $s = "";
|
if (!$disabled) $s = " AND si.enabled = 1 "; else $s = "";
|
||||||
|
|
||||||
if ($quota_reached){
|
if ($quota_reached){
|
||||||
$qr = " LEFT JOIN (questionnaire_sample_quota as qsq) on (si.sample_import_id = qsq.sample_import_id)
|
$qr = " LEFT JOIN (questionnaire_sample_quota as qsq, questionnaire_sample_quota_row as qsqr) on (si.sample_import_id = qsq.sample_import_id and si.sample_import_id = qsqr.sample_import_id)";
|
||||||
LEFT JOIN (questionnaire_sample_quota_row as qsqr) on (si.sample_import_id = qsqr.sample_import_id)";
|
|
||||||
$qrq = " AND (qsq.quota_reached IS NULL OR qsq.quota_reached != 1 )
|
$qrq = " AND (qsq.quota_reached IS NULL OR qsq.quota_reached != 1 )
|
||||||
AND (qsqr.quota_reached IS NULL OR qsqr.quota_reached != 1)";
|
AND (qsqr.quota_reached IS NULL OR qsqr.quota_reached != 1)";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -57,9 +57,9 @@ function sRandomChars($length = 15,$pattern="23456789abcdefghijkmnpqrstuvwxyz")
|
|||||||
for($i=0;$i<$length;$i++)
|
for($i=0;$i<$length;$i++)
|
||||||
{
|
{
|
||||||
if(isset($key))
|
if(isset($key))
|
||||||
$key .= $pattern{mt_rand(0,$patternlength)};
|
$key .= $pattern{mt_rand(0,$patternlength)};
|
||||||
else
|
else
|
||||||
$key = $pattern{mt_rand(0,$patternlength)};
|
$key = $pattern{mt_rand(0,$patternlength)};
|
||||||
}
|
}
|
||||||
return $key;
|
return $key;
|
||||||
}
|
}
|
||||||
@@ -354,19 +354,19 @@ function add_case($sample_id,$questionnaire_id,$operator_id = "NULL",$testing =
|
|||||||
{
|
{
|
||||||
global $db;
|
global $db;
|
||||||
|
|
||||||
$ttries = 0;
|
$ttries = 0;
|
||||||
|
|
||||||
do {
|
do {
|
||||||
$token = sRandomChars();
|
$token = sRandomChars();
|
||||||
|
|
||||||
$sql = "SELECT count(*) as c
|
$sql = "SELECT count(*) as c
|
||||||
FROM `case`
|
FROM `case`
|
||||||
WHERE token = '$token'";
|
WHERE token = '$token'";
|
||||||
|
|
||||||
$ttries++;
|
$ttries++;
|
||||||
} while ($db->GetOne($sql) > 0 && $ttries < 10);
|
} while ($db->GetOne($sql) > 0 && $ttries < 10);
|
||||||
|
|
||||||
|
|
||||||
$sql = "INSERT INTO `case` (case_id, sample_id, questionnaire_id, last_call_id, current_operator_id, current_call_id, current_outcome_id,token)
|
$sql = "INSERT INTO `case` (case_id, sample_id, questionnaire_id, last_call_id, current_operator_id, current_call_id, current_outcome_id,token)
|
||||||
VALUES (NULL, $sample_id, $questionnaire_id, NULL, $operator_id, NULL, '$current_outcome_id','$token')";
|
VALUES (NULL, $sample_id, $questionnaire_id, NULL, $operator_id, NULL, '$current_outcome_id','$token')";
|
||||||
|
|
||||||
@@ -727,7 +727,7 @@ function get_case_id($operator_id, $create = false)
|
|||||||
}
|
}
|
||||||
$r2 = $db->GetRow($sql);
|
$r2 = $db->GetRow($sql);
|
||||||
|
|
||||||
|
|
||||||
if (empty($r2))
|
if (empty($r2))
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|||||||
@@ -671,7 +671,7 @@ for ($i=0; $i<$fieldcount; $i++)
|
|||||||
}
|
}
|
||||||
elseif (substr($fieldinfo,0,10)=="attribute_")
|
elseif (substr($fieldinfo,0,10)=="attribute_")
|
||||||
{
|
{
|
||||||
if ($type == "csv") {$firstline .= CSVEscape($fieldinfo)."$separator";}
|
if ($type == "csv") {$firstline .= "\"".$attributeFieldAndNames[$fieldinfo] ."\"$separator";}
|
||||||
else {$firstline .= $attributeFieldAndNames[$fieldinfo]."$separator";}
|
else {$firstline .= $attributeFieldAndNames[$fieldinfo]."$separator";}
|
||||||
}
|
}
|
||||||
elseif ($fieldinfo == "id")
|
elseif ($fieldinfo == "id")
|
||||||
@@ -838,7 +838,7 @@ if ($answers == "short") //Nice and easy. Just dump the data straight
|
|||||||
$rowcounter=0;
|
$rowcounter=0;
|
||||||
while ($drow = $dresult->FetchRow())
|
while ($drow = $dresult->FetchRow())
|
||||||
{
|
{
|
||||||
$drow=array_map('strip_tags_full',$drow);
|
$drow=array_map('strip_tags_full',$drow); if (isset($drow['caseoutcome'])) $drow['caseoutcome'] = T_($drow['caseoutcome']);
|
||||||
if($convertyto1 == "Y")
|
if($convertyto1 == "Y")
|
||||||
//Converts "Y" to "1" in export
|
//Converts "Y" to "1" in export
|
||||||
{
|
{
|
||||||
|
|||||||
BIN
include/limesurvey/templates/quexs/print_img_checkbox.png
Normal file
BIN
include/limesurvey/templates/quexs/print_img_checkbox.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 105 B |
BIN
include/limesurvey/templates/quexs/print_img_radio.png
Normal file
BIN
include/limesurvey/templates/quexs/print_img_radio.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 170 B |
Binary file not shown.
Reference in New Issue
Block a user