mirror of
https://github.com/ACSPRI/queXS
synced 2024-04-02 12:12:16 +00:00
updated to rev523 (release1.14)
This commit is contained in:
15
CHANGELOG
15
CHANGELOG
@@ -1,9 +1,19 @@
|
||||
queXS 1.14.0 - Changes since 1.13.1
|
||||
|
||||
New feature: Session based authentication instead of web server authentication
|
||||
New feature: Ordering of sample files on an overall and by questionnaire level to determine which numbers will be drawn first
|
||||
New feature: Client panel now displays basic summary stats
|
||||
New feature: Can add custom outcome codes and assign a subset of outcomes to questionnaires
|
||||
New feature: Added skeletonquest Limesurvey theme for self completion (mobile friendly)
|
||||
|
||||
Bug fix: lp:1510368 Lime quota with more than one option in list doesn't display in queXS quota report
|
||||
Bug fix: lp:1510369 When survey completed as "Self completed online", quotas based on either sample or data inputs, are not counted as completed
|
||||
Fixed Bug: Web first case generation failing with some insert strings
|
||||
Fixed bug: Error inserting case due to token random generation collision
|
||||
|
||||
Changes for session authentication:
|
||||
|
||||
queXS now uses the Limesurvey session based authentication system to authenticate all users.
|
||||
Sessions are stored in the lime_sessions table and are managed by adodb.
|
||||
|
||||
If this is a fresh install - you can ignore the notes below. Otherwise - please read through
|
||||
the following for converting from directory based authentication to session based authentication.
|
||||
@@ -63,6 +73,9 @@ ALTER TABLE `outcome` ADD `default` TINYINT(1) UNSIGNED NOT NULL DEFAULT '1' COM
|
||||
/* -- define and set mandatory(constant) outcome_id's --*/
|
||||
UPDATE `outcome` SET `permanent` = '1' WHERE `outcome`.`outcome_id` IN (1,2,3,7,9,10,14,17,18,19) ;
|
||||
|
||||
/* -- set AUTO_INCREMENT to 100 @ `outcome` to reserve some id's -- */
|
||||
ALTER TABLE `outcome` AUTO_INCREMENT = 100;
|
||||
|
||||
/* -- add `outcomes` parameter , define default list of outcome_ID's to be enabled for new questionnaries --*/
|
||||
ALTER TABLE `questionnaire` ADD `outcomes` VARCHAR(256) NULL DEFAULT '1,2,3,7,9,10,14,17,18,19' COMMENT 'Comma-separated string of outcomes defined for the questionnaire' AFTER `enabled`;
|
||||
|
||||
|
||||
@@ -45,11 +45,12 @@ $js_foot = array(
|
||||
"../js/custom.js"
|
||||
);
|
||||
|
||||
global $db;
|
||||
|
||||
global $db;
|
||||
|
||||
if (isset($_POST['default']) && isset($_POST['save'])){
|
||||
|
||||
$db->StartTrans();
|
||||
|
||||
$sql = "UPDATE `outcome` as o
|
||||
SET `default` = 0
|
||||
WHERE o.permanent != 1";
|
||||
@@ -66,25 +67,27 @@ if (isset($_POST['default']) && isset($_POST['save'])){
|
||||
SET `default` = 1
|
||||
WHERE o.permanent != 1
|
||||
AND o.outcome_id IN ($sel)";
|
||||
|
||||
$db->Execute($sql);
|
||||
$db->Execute($sql);
|
||||
}
|
||||
if(!empty($_POST['delay']) && $_SESSION['user'] === "admin" ){
|
||||
|
||||
foreach($_POST['delay'] as $n => $val)
|
||||
{
|
||||
$sql = "UPDATE `outcome`SET default_delay_minutes = $val WHERE outcome_id = $n";
|
||||
$db->Execute($sql);
|
||||
}
|
||||
foreach($_POST['delay'] as $n => $val) {
|
||||
$db->Execute("UPDATE `outcome`SET default_delay_minutes = $val WHERE outcome_id = $n");
|
||||
}
|
||||
}
|
||||
if(!empty($_POST['delete']) && $_SESSION['user'] === "admin" ){
|
||||
foreach($_POST['delete'] as $n => $val) {
|
||||
$db->Execute("DELETE FROM `outcome` WHERE outcome_id = $n AND outcome_id >= 100");
|
||||
}
|
||||
}
|
||||
|
||||
$_GET['default'] = $_POST['default'];
|
||||
if($db->CompleteTrans()) $msg_ok = T_("Default outcomes updated"); else $msg_err = T_("Default outcomes NOT updated");
|
||||
|
||||
$_GET['default'] = $_POST['default'];
|
||||
unset($_POST['default']);
|
||||
unset($_POST['save']);
|
||||
}
|
||||
|
||||
if (isset($_POST['qid']) && isset($_POST['save'])){
|
||||
if (isset($_POST['qid']) && $_POST['qid'] > 0 && isset($_POST['save'])){
|
||||
|
||||
//get id's for 'permanent' outcomes
|
||||
$sql = "SELECT o.outcome_id
|
||||
@@ -112,39 +115,98 @@ if (isset($_POST['qid']) && isset($_POST['save'])){
|
||||
$sql = "UPDATE questionnaire
|
||||
SET outcomes = '$sel'
|
||||
WHERE questionnaire_id = $qid";
|
||||
|
||||
$db->Execute($sql);
|
||||
if ($db->Execute($sql)) $msg_ok = T_("Questionnaire outcomes saved"); else $msg_err = T_("Error:") . " " . T("Questionnaire outcomes not saved");
|
||||
|
||||
$_GET['qid'] = $_POST['qid'];
|
||||
|
||||
unset($_POST['qid']);
|
||||
unset($_POST['save']);
|
||||
}
|
||||
|
||||
if ($_SESSION['user'] === "admin" && isset($_POST['addoutcome']) && isset($_POST['save'])){
|
||||
if (isset($_POST['description']) && !empty($_POST['description']) && intval($_POST['outcome_type_id']) > 0 ) {
|
||||
$desc = $_POST['description'];
|
||||
$outcome_type_id = intval($_POST['outcome_type_id']);
|
||||
if (isset($_POST['default_delay_minutes'])) $ddm = $_POST['default_delay_minutes']; else $ddm = 0;
|
||||
if (isset($_POST['contacted'])) $contacted = 1; else $contacted = 0;
|
||||
if (isset($_POST['tryanother'])) $tryanother = 1; else $tryanother = 0;
|
||||
if (isset($_POST['tryagain'])) $tryagain = 1; else $tryagain = 0;
|
||||
if (isset($_POST['eligible'])) $eligible = 1; else $eligible = 0;
|
||||
if (isset($_POST['require_note'])) $require_note = 1; else $require_note = 0;
|
||||
if (isset($_POST['calc'])) $calc = $_POST['calc']; else $calc = "";
|
||||
if (isset($_POST['aapor_id'])) $aapor_id = $_POST['aapor_id']; else $aapor_id = "";
|
||||
if (isset($_POST['default_o'])) $def = 1; else $def = 0;
|
||||
if (isset($_POST['permanent'])) $perm = 1; else $perm = 0;
|
||||
|
||||
$sql = "INSERT INTO `outcome` VALUES ('NULL','$aapor_id','$desc','$ddm','$outcome_type_id','$tryanother','$contacted','$tryagain','$eligible','$require_note','$calc','$def','$perm')";
|
||||
if ($db->Execute($sql)) {
|
||||
$msg_ok = T_("Custom outcome") . " <b>" . $desc . "</b> " . T_("saved");
|
||||
}
|
||||
else $msg_err = T_("Error:") . " " . T_("New outcome not saved");
|
||||
}
|
||||
else {
|
||||
if (empty($_POST['description'])) $ms = T_("Description");
|
||||
if ($_POST['outcome_type_id'] <= 0) $ms = T_("Outcome type");
|
||||
$msg_err = T_("Error:") . " " . $ms . " " . T_("is not set");
|
||||
$_GET['addoutcome'] = $_POST['addoutcome'];
|
||||
}
|
||||
|
||||
if (isset($_POST['h']) && isset($_POST['v'])) {$h = $_POST['h']; $_GET[$h] = $_POST['v'];}
|
||||
unset($_POST['addoutcome']);
|
||||
unset($_POST['save']);
|
||||
}
|
||||
|
||||
|
||||
/*select outcomes list*/
|
||||
|
||||
if (isset($_GET['default'])) { $title = T_("Set default outcomes"); }
|
||||
else if (isset($_GET['qid'])){ $title = T_("Set questionnaire outcomes"); $qid = intval($_GET['qid']); }
|
||||
if (isset($_GET['default'])) $title = T_("Set default outcomes");
|
||||
else if (isset($_GET['qid'])) $title = T_("Set questionnaire outcomes");
|
||||
else if (isset($_GET['addoutcome'])) $title = T_("ADD custom outcome");
|
||||
else die();
|
||||
|
||||
xhtml_head($title,true,$css,$js_head);
|
||||
|
||||
|
||||
/* to add customm outcome*/
|
||||
if ($_SESSION['user'] === "admin" && isset($_GET['addoutcome'])){
|
||||
|
||||
$rs[] = ["description" => "<label class='text-capitalize' style='width:20em;' >" . T_("Outcome description") . "</label>", "value" => "<input name='description' type='text' class='form-control' required size=60 maxlength=60 />"];
|
||||
$sql = "SELECT outcome_type_id as value,description FROM `outcome_type`";
|
||||
$ot = $db->GetAll($sql); translate_array($ot, array("description"));
|
||||
$select = display_chooser($ot,"outcome_type_id","outcome_type_id",true,false,false,true,false,false);
|
||||
$rs[] = ["description" => "<label>" . T_("Outcome type") . "</label>", "value" => "{$select}"];
|
||||
$rs[] = ["description" => "<label>" . T_("Default delay, minutes") . "</label>", "value" => "<input name='default_delay_minutes' type='number' min='0' max='600000' size=8 class='form-control' style='width:8em;' />"];
|
||||
$rs[] = ["description" => "<label>" . T_("Contacted") . " ?</label>", "value" => "<input name='contacted' type='checkbox' data-toggle=\"toggle\" data-on=" . T_("Yes") . " data-off=" . T_("No") . " />"];
|
||||
$rs[] = ["description" => "<label>" . T_("Try another number") . " ?</label>", "value" => "<input name='tryanother' type='checkbox' data-toggle=\"toggle\" data-on=" . T_("Yes") . " data-off=" . T_("No") . " />"];
|
||||
$rs[] = ["description" => "<label>" . T_("Try again") . " ?</label>", "value" => "<input name='tryagain' type='checkbox' data-toggle=\"toggle\" data-on=" . T_("Yes") . " data-off=" . T_("No") . " />"];
|
||||
$rs[] = ["description" => "<label>" . T_("Eligible") . " ?</label>", "value" => "<input name='eligible' type='checkbox' data-toggle=\"toggle\" data-on=" . T_("Yes") . " data-off=" . T_("No") . " />"];
|
||||
$rs[] = ["description" => "<label>" . T_("Require note") . " ?</label>", "value" => "<input name='require_note' type='checkbox' data-toggle=\"toggle\" data-on=" . T_("Yes") . " data-off=" . T_("No") . " />"];
|
||||
$rs[] = ["description" => "<label>" . T_("Calculation") . "</label>", "value" => "<input name='calc' type='text' class='form-control' size=10 style='width:8em;' maxlength=10 />"];
|
||||
$rs[] = ["description" => "<label>" . T_("AAPOR code") . "</label>", "value" => "<input name='aapor_id' type='text' class='form-control' size=10 style='width:8em;' maxlength=10 />"];
|
||||
$rs[] = ["description" => "<label>" . T_("Default outcome") . " ?</label>", "value" => "<input name='default_o' type='checkbox' data-toggle=\"toggle\" data-on=" . T_("Yes") . " data-off=" . T_("No") . " />"];
|
||||
$rs[] = ["description" => "<label>" . T_("Permanent outcome") . " ?</label>", "value" => "<input name='permanent' type='checkbox' data-toggle=\"toggle\" data-on=" . T_("Yes") . " data-off=" . T_("No") . " />"];
|
||||
|
||||
$hid = "addoutcome"; $value = "newoutcome"; $h = $_GET['h']; $v = $_GET['v'];
|
||||
$row = array("description","value");
|
||||
$hdr = array(T_("Description"),T_("Value"));
|
||||
$sbtn = T_("Save custom Outcome");
|
||||
$class = "table-hover table-condensed";
|
||||
}
|
||||
|
||||
/* for questionnire outcomes */
|
||||
if (isset($_GET['qid'])) {
|
||||
|
||||
$qid = intval($_GET['qid']);
|
||||
if($qid == 0) $qid = false;
|
||||
|
||||
print "<h3 class='form-inline pull-left'>" . T_("Questionnaire") . ": </h3>";
|
||||
print "<div class='form-group'><h3 class='form-inline text-right col-lg-4'>" . T_("Questionnaire") . ": </h3>";
|
||||
|
||||
$sql = "SELECT questionnaire_id as value,description, CASE WHEN questionnaire_id = '$qid' THEN 'selected=\'selected\'' ELSE '' END AS selected
|
||||
FROM questionnaire
|
||||
WHERE enabled = 1";
|
||||
display_chooser($db->GetAll($sql),"questionnaire","qid", true,false,true,true,false,true,"form-inline pull-left ");
|
||||
display_chooser($db->GetAll($sql),"questionnaire","qid",true,false,true,true,false,true,"form-inline");
|
||||
print "</div>";
|
||||
|
||||
|
||||
if ($qid != false)
|
||||
if ($qid != 0)
|
||||
{
|
||||
$qd = $db->GetRow("SELECT outcomes, self_complete, referral FROM `questionnaire` WHERE questionnaire_id = $qid");
|
||||
|
||||
@@ -164,13 +226,11 @@ if (isset($_GET['qid'])) {
|
||||
$do[] = $val;
|
||||
}
|
||||
}
|
||||
|
||||
$qoutc = implode($do,",");
|
||||
|
||||
$sql = "UPDATE questionnaire
|
||||
SET outcomes = '$qoutc'
|
||||
WHERE questionnaire_id = $qid";
|
||||
|
||||
$db->Execute($sql);
|
||||
}
|
||||
|
||||
@@ -186,11 +246,12 @@ if (isset($_GET['qid'])) {
|
||||
ORDER BY `o`.`outcome_id` ASC";
|
||||
|
||||
$rs = $db->GetAll($sql);
|
||||
|
||||
$hid = "qid"; $value = $qid; $h = "qid"; $v = $qid;
|
||||
$row = array("outcome_id","description","type","select");
|
||||
$hdr = array(T_("Outcome ID"),T_("Description"),T_("Outcome type"),T_("Select"));
|
||||
$hid = "qid";
|
||||
$value = "$qid";
|
||||
$hdr = array(T_("Outcome ID"),T_("Description"),T_("Outcome type"),T_("Select")." ?");
|
||||
$abtn = T_("Add custom Outcome");
|
||||
$sbtn = T_("Save questionnaire outcomes");
|
||||
$class = "tclass";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -199,29 +260,33 @@ if (isset($_GET['default'])) {
|
||||
|
||||
/* allow delay edit only to superadmins (currenlty admin) */
|
||||
if ($_SESSION['user'] === "admin"){
|
||||
$delay = "CONCAT('<input type=\'number\' name=\"delay[', o.outcome_id ,']\" class=\'form-control text-right\' style=\'width:7em;\' max=50000 min=0 required value=\'', o.default_delay_minutes ,'\' />') ";
|
||||
$delay = "CONCAT('<input type=\'number\' name=\"delay[', o.outcome_id ,']\" class=\'form-control text-right\' style=\'width:6em;\' max=50000 min=0 required value=\'', o.default_delay_minutes ,'\' />') ";
|
||||
$delete = "CASE WHEN o.outcome_id >= 100 THEN CONCAT('<input type=\'checkbox\' class=\' \' data-onstyle=\"danger\" title=\'".TQ_("Delete outcome")." ?\' name=\"delete[', o.outcome_id ,']\" data-toggle=\"toggle\" data-size=\"small\" data-style=\"center-block\" data-on=".TQ_("Yes")." data-off=".TQ_("No")." data-width=\"60\" />') ELSE '' END as `delete`,";
|
||||
}
|
||||
else {
|
||||
$delay = "CONCAT('<span class=\'pull-right\' >', o.default_delay_minutes ,' </span>')";
|
||||
$delete = "";
|
||||
}
|
||||
$sql = "SELECT o.*, ot.description as type, $delay as `delay`,
|
||||
CONCAT('<h4> <span class=\"label label-', CASE WHEN o.tryanother = 1 THEN 'primary\">" . T_("Yes") . "' ELSE 'default\">" . T_("No") . "' END , '</span></h4>') as tryanother,
|
||||
CONCAT('<h4> <span class=\"label label-', CASE WHEN o.tryagain = 1 THEN 'primary\">" . T_("Yes") . "' ELSE 'default\">" . T_("No") . "' END , '</span></h4>') as tryagain,
|
||||
CONCAT('<h4> <span class=\"label label-', CASE WHEN o.contacted = 1 THEN 'primary\">" . T_("Yes") . "' ELSE 'default\">" . T_("No") . "' END , '</span></h4>') as contacted,
|
||||
CONCAT('<h4> <span class=\"label label-', CASE WHEN o.eligible = 1 THEN 'primary\">" . T_("Yes") . "' ELSE 'default\">" . T_("No") . "' END , '</span></h4>') as eligible,
|
||||
CONCAT('<h4> <span class=\"label label-', CASE WHEN o.require_note = 1 THEN 'primary\">" . T_("Yes") . "' ELSE 'default\">" . T_("No") . "' END , '</span></h4>') as require_note,
|
||||
CONCAT('<input type=\'checkbox\' ', CASE WHEN o.default = 1 THEN 'checked=\"checked\"' ELSE '' END ,' ', CASE WHEN o.permanent = 1 THEN 'disabled=\"disabled\" data-onstyle=\"success\"' ELSE '' END ,' name=\"select[]\" value=\'',o.outcome_id,'\' data-toggle=\"toggle\" data-size=\"small\" data-style=\"center-block\" data-on=" . TQ_("Yes") . " data-off=" . TQ_("No") . " data-width=\"70\" />') as `select`
|
||||
$sql = "SELECT o.*, ot.description as type, $delay as `delay`, $delete
|
||||
CONCAT('<h4> <span class=\"label label-', CASE WHEN o.tryanother = 1 THEN 'primary\">".T_("Yes")."' ELSE 'default\">".T_("No")."' END , '</span></h4>') as tryanother,
|
||||
CONCAT('<h4> <span class=\"label label-', CASE WHEN o.tryagain = 1 THEN 'primary\">" . T_("Yes")."' ELSE 'default\">".T_("No")."' END , '</span></h4>') as tryagain,
|
||||
CONCAT('<h4> <span class=\"label label-', CASE WHEN o.contacted = 1 THEN 'primary\">" . T_("Yes")."' ELSE 'default\">".T_("No")."' END , '</span></h4>') as contacted,
|
||||
CONCAT('<h4> <span class=\"label label-', CASE WHEN o.eligible = 1 THEN 'primary\">".T_("Yes")."' ELSE 'default\">".T_("No")."' END , '</span></h4>') as eligible,
|
||||
CONCAT('<h4> <span class=\"label label-', CASE WHEN o.require_note = 1 THEN 'primary\">".T_("Yes")."' ELSE 'default\">".T_("No")."' END , '</span></h4>') as require_note,
|
||||
CONCAT('<input type=\'checkbox\' ', CASE WHEN o.default = 1 THEN 'checked=\"checked\"' ELSE '' END ,' ', CASE WHEN o.permanent = 1 THEN 'disabled=\"disabled\" data-onstyle=\"success\"' ELSE '' END ,' name=\"select[]\" value=\'',o.outcome_id,'\' data-toggle=\"toggle\" data-size=\"small\" data-style=\"center-block\" data-on=".TQ_("Yes")." data-off=".TQ_("No")." data-width=\"70\" />') as `select`
|
||||
from `outcome` as o, `outcome_type` as ot
|
||||
WHERE o.outcome_type_id = ot.outcome_type_id
|
||||
WHERE o.outcome_type_id = ot.outcome_type_id
|
||||
ORDER BY `o`.`outcome_id` ASC";
|
||||
|
||||
$rs = $db->GetAll($sql);
|
||||
|
||||
$row = array("outcome_id","description","select","type","delay","contacted","tryanother","tryagain","eligible","require_note");
|
||||
$hdr = array(T_("Outcome ID"),T_("Description"),T_("Default"),T_("Outcome type"),T_("Delay, min"),T_("Contacted"),T_("Try another"),T_("Try again"),T_("Eligible"),T_("Require note"));
|
||||
|
||||
$hid = "default";
|
||||
$value = "";
|
||||
$hdr = array(T_("Outcome ID"),T_("Description"),T_("Set default")." ?",T_("Outcome type"),T_("Delay, min"),T_("Contacted")." ?",T_("Try another")." ?",T_("Try again")." ?",T_("Eligible")." ?",T_("Require note")." ?");
|
||||
if ($_SESSION['user'] === "admin"){ $row[] = "delete"; $hdr[] = T_("Delete")." ?";}
|
||||
$hid = "default"; $value = ""; $h = "default"; $v = "";
|
||||
$abtn = T_("Add custom Outcome");
|
||||
$sbtn = T_("Update default outcomes");
|
||||
$class = "tclass";
|
||||
|
||||
}
|
||||
|
||||
@@ -237,31 +302,38 @@ if (isset($rs) && !empty($rs)){
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (isset($msg_ok)) print "<div class='alert alert-success'>" . $msg_ok . "</div>";
|
||||
if (isset($msg_err)) print "<div class='alert alert-danger'>" . $msg_err . "</div>";
|
||||
|
||||
?>
|
||||
|
||||
<form enctype="multipart/form-data" action="?" method="post" class="form-horizontal col-lg-12" >
|
||||
|
||||
<?php xhtml_table($rs,$row,$hdr); ?>
|
||||
|
||||
<input type='hidden' name='<?php echo $hid; ?>' value='<?php echo $value;?>' /> </br>
|
||||
<?php xhtml_table($rs,$row,$hdr,$class); ?>
|
||||
<input type='hidden' name='h' value='<?php echo $h; ?>' />
|
||||
<input type='hidden' name='v' value='<?php echo $v; ?>' />
|
||||
<input type='hidden' name='<?php echo $hid; ?>' value='<?php echo $value; ?>' /> </br>
|
||||
|
||||
<div class="row form-group">
|
||||
<div class="col-sm-4 ">
|
||||
<a href="questionnairelist.php" class="btn btn-default pull-right" ><i class="fa fa-list text-primary"></i> <?php echo T_("Cancel");?></a>
|
||||
<div class="col-lg-3">
|
||||
<a href="set_outcomes.php?<?php echo $h;?>=<?php echo $v;?>" class="btn btn-default" ><i class="fa fa-undo fa-lg text-primary"></i> <?php echo T_("Reset");?></a>
|
||||
</div>
|
||||
<div class="col-sm-4 ">
|
||||
<button type="submit" class="btn btn-primary pull-right btn-lg" name="save" ><i class="fa fa-check-square-o fa-lg"></i> <?php echo T_("Save selection"); ?></button>
|
||||
<div class="col-lg-3">
|
||||
<?php if ($_SESSION['user'] === "admin" && !isset($_GET['addoutcome'])) { ?>
|
||||
<a href="set_outcomes.php?addoutcome&h=<?php echo $h;?>&v=<?php echo $v;?>" class="btn btn-default" ><i class="fa fa-plus fa-lg text-primary"></i> <?php echo $abtn; ?></a>
|
||||
<?php } ?>
|
||||
</div>
|
||||
<div class="col-lg-6">
|
||||
<button type="submit" class="btn btn-primary btn-lg" name="save" ><i class="fa fa-check-square-o fa-lg"></i> <?php echo $sbtn; ?></button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
|
||||
<?php
|
||||
|
||||
}
|
||||
/* else {
|
||||
|
||||
if (isset($_GET['default'])) { ?>
|
||||
<div class="well text-danger col-sm-4"><p><?php echo T_("ERROR: Check tables 'outcome' and 'outcome_type' in DB"); ?></p></div>
|
||||
<?php }
|
||||
@@ -269,7 +341,6 @@ if (isset($rs) && !empty($rs)){
|
||||
if (isset($_GET['qid']) ) { ?>
|
||||
<div class="well text-danger col-sm-4"><p><?php echo T_("ERROR: Check tables 'outcome' and 'questionnaire' in DB"); ?></p></div>
|
||||
<?php }
|
||||
|
||||
} */
|
||||
|
||||
xhtml_foot($js_foot);
|
||||
|
||||
173
call.php
173
call.php
@@ -44,6 +44,7 @@ include ("db.inc.php");
|
||||
*/
|
||||
require ("auth-interviewer.php");
|
||||
|
||||
|
||||
/**
|
||||
* XHTML functions
|
||||
*/
|
||||
@@ -86,13 +87,13 @@ function display_outcomes($contacted,$ca,$case_id)
|
||||
//see if the case is completed
|
||||
if ($completed)
|
||||
{
|
||||
$sql = "SELECT outcome_id,description,contacted
|
||||
$sql = "SELECT outcome_id,description
|
||||
FROM outcome
|
||||
WHERE outcome_id = 10";
|
||||
}
|
||||
else if (limesurvey_is_quota_full($case_id))
|
||||
{
|
||||
$sql = "SELECT outcome_id,description,contacted
|
||||
$sql = "SELECT outcome_id,description
|
||||
FROM outcome
|
||||
WHERE outcome_id = 32";
|
||||
}
|
||||
@@ -112,38 +113,33 @@ function display_outcomes($contacted,$ca,$case_id)
|
||||
if (!empty($rs))
|
||||
{
|
||||
//we have an appointment made ... only select appointment ID's
|
||||
$sql = "SELECT outcome_id,description,contacted
|
||||
$sql = "SELECT outcome_id,description
|
||||
FROM outcome
|
||||
WHERE outcome_type_id = '5'
|
||||
AND outcome_id IN ($outcomes)";
|
||||
}
|
||||
else
|
||||
{
|
||||
if ($contacted) $contacted = bigintval($contacted);
|
||||
else{
|
||||
print "<div class=\"form-group\" ><a href=\"?contacted=1\" class=\"btn btn-info\" style=\"margin-left: 15px; margin-right: 30px; min-width: 150px;\">".T_("CONTACTED")."</a>";
|
||||
print "<a href=\"?contacted=0\" class=\"btn btn-default\" style=\"margin-left: 30px; margin-right: 15px; min-width: 150px;\">".T_("NOT CONTACTED")."</a></div>";
|
||||
|
||||
if (isset ($_GET['contacted'])) $contacted = bigintval($_GET['contacted']);
|
||||
}
|
||||
if ($contacted == 1 || $contacted === 0){
|
||||
if ($contacted === false) $ctd = "";
|
||||
else
|
||||
{
|
||||
$contacted = bigintval($contacted);
|
||||
$ctd = "AND contacted = '$contacted'";
|
||||
}
|
||||
|
||||
$sql = "SELECT outcome_id,description,contacted
|
||||
$sql = "SELECT outcome_id,description
|
||||
FROM outcome
|
||||
WHERE outcome_type_id != '5'
|
||||
AND contacted = '$contacted'
|
||||
$ctd
|
||||
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);
|
||||
|
||||
print "<div class=\"panel-body\">";
|
||||
print "<div>";
|
||||
if (!empty($rs))
|
||||
{
|
||||
$do = false;
|
||||
|
||||
$lime_sid = get_limesurvey_id(get_operator_id());
|
||||
|
||||
//Check to see if we have sent an email on this call and set the default outcome
|
||||
@@ -152,22 +148,21 @@ function display_outcomes($contacted,$ca,$case_id)
|
||||
WHERE t.sent = '$ca'
|
||||
AND c.case_id = $case_id
|
||||
AND t.token = c.token";
|
||||
|
||||
$do = $db->GetOne($sql);
|
||||
|
||||
if (isset($_GET['defaultoutcome'])) $do = bigintval($_GET['defaultoutcome']);
|
||||
foreach($rs as $r)
|
||||
{
|
||||
if ($do == $r['outcome_id']) $selected = "checked='checked'"; else $selected = "";
|
||||
if (isset($r['contacted']) && $r['contacted'] == 1) $highlight = ""; else $highlight = "style='color:black;'";
|
||||
print "<div><label $highlight class='label'><input type='radio' class='radio' name='outcome' id='outcome-{$r['outcome_id']}' value='{$r['outcome_id']}' $selected/>" . T_($r['description']) . "</label></div>";
|
||||
print "<div><label class='label'><input type='radio' class='radio' name='outcome' id='outcome-{$r['outcome_id']}' value='{$r['outcome_id']}' $selected/>" . T_($r['description']) . "</label></div>";
|
||||
}
|
||||
|
||||
$_POST['confirm'] = true; //check that outcome selected
|
||||
}
|
||||
print "</div>";
|
||||
|
||||
|
||||
}
|
||||
|
||||
if (browser_ie()) $js = "js/window_ie6.js"; else $js = "js/window.js";
|
||||
|
||||
//display the respondents phone numbers as a drop down list for this call
|
||||
|
||||
@@ -179,15 +174,6 @@ $operator_id = get_operator_id();
|
||||
|
||||
if (isset($_POST['submit']))
|
||||
{
|
||||
if (is_voip_enabled($operator_id))
|
||||
{ //prepare common voip functions
|
||||
include("functions/functions.voip.php");
|
||||
$v = new voip();
|
||||
$v->connect(VOIP_SERVER);
|
||||
}
|
||||
|
||||
$btext = "onload='openParentObject(\"main-content\",\"" . get_respondentselection_url($operator_id) . "\"); parent.closePopup();'"; // set default, change on conditions
|
||||
|
||||
if (isset($_POST['contact_phone']))
|
||||
{
|
||||
$contact_phone_id = bigintval($_POST['contact_phone']);
|
||||
@@ -197,28 +183,56 @@ if (isset($_POST['submit']))
|
||||
if ($call_id)
|
||||
{
|
||||
if (is_voip_enabled($operator_id))
|
||||
{
|
||||
include("functions/functions.voip.php");
|
||||
$v = new voip();
|
||||
$v->connect(VOIP_SERVER);
|
||||
$v->dial(get_extension($operator_id),get_call_number($call_id));
|
||||
}
|
||||
|
||||
$btext = "onload='openParentObject(\"main-content\",\"" . get_respondentselection_url($operator_id) . "\"); parent.closePopup();'";
|
||||
|
||||
$js = "js/window.js";
|
||||
if (browser_ie()) $js = "js/window_ie6.js";
|
||||
xhtml_head(T_("Call"),true,array("css/call.css"),array($js),$btext,false,false,false,false);
|
||||
}
|
||||
else exit();
|
||||
}
|
||||
else
|
||||
else if (isset($_POST['outcome']))
|
||||
{
|
||||
//hang up the call first
|
||||
if (is_voip_enabled($operator_id))
|
||||
$v->hangup(get_extension($operator_id));
|
||||
|
||||
//disable recording
|
||||
$newtext = T_("Start REC");
|
||||
$btext = "onload='toggleRec(\"$newtext\",\"record.php?start=start\",\"offline\"); openParentObject(\"main-content\",\"" . get_respondentselection_url($operator_id) . "\"); parent.closePopup();'";
|
||||
|
||||
if (isset($_POST['outcome'])){ //process with outcome
|
||||
$outcome_id = bigintval($_POST['outcome']);
|
||||
end_call($operator_id,$outcome_id);
|
||||
|
||||
if (is_voip_enabled($operator_id))
|
||||
{
|
||||
include("functions/functions.voip.php");
|
||||
$v = new voip();
|
||||
$v->connect(VOIP_SERVER);
|
||||
$v->hangup(get_extension($operator_id));
|
||||
}
|
||||
}
|
||||
//disable recording
|
||||
$newtext = T_("Start REC");
|
||||
|
||||
xhtml_head(T_("Call"),true,array("css/call.css"),array($js),$btext,false,false,false,false);
|
||||
$js = "js/window.js";
|
||||
if (browser_ie()) $js = "js/window_ie6.js";
|
||||
|
||||
xhtml_head(T_("Call"),true,array("css/call.css"),array($js),"onload='toggleRec(\"$newtext\",\"record.php?start=start\",\"offline\"); openParentObject(\"main-content\",\"" . get_respondentselection_url($operator_id) . "\"); parent.closePopup();'",false,false,false,false);
|
||||
}
|
||||
else
|
||||
{
|
||||
//if no outcome selected, just hang up the call
|
||||
if (is_voip_enabled($operator_id))
|
||||
{
|
||||
include("functions/functions.voip.php");
|
||||
$v = new voip();
|
||||
$v->connect(VOIP_SERVER);
|
||||
$v->hangup(get_extension($operator_id));
|
||||
}
|
||||
//disable recording
|
||||
$newtext = T_("Start REC");
|
||||
$js = "js/window.js";
|
||||
if (browser_ie()) $js = "js/window_ie6.js";
|
||||
xhtml_head(T_("Call"),true,array("css/call.css"),array($js),"onload='toggleRec(\"$newtext\",\"record.php?start=start\",\"offline\"); openParentObject(\"main-content\",\"" . get_respondentselection_url($operator_id) . "\"); parent.closePopup();'",false,false,false,false);
|
||||
|
||||
}
|
||||
|
||||
print "<p></p>"; //for XHTML
|
||||
xhtml_foot();
|
||||
@@ -244,19 +258,12 @@ if (isset($_GET['newstate']))
|
||||
$db->Execute($sql);
|
||||
}
|
||||
|
||||
$js = "js/window.js";
|
||||
if (browser_ie()) $js = "js/window_ie6.js";
|
||||
|
||||
xhtml_head(T_("Set outcome"),true,array("css/call.css"),array($js,"include/jquery/jquery-1.4.2.min.js"),false,false,false,false,false);
|
||||
xhtml_head(T_("Call"),true,array("css/call.css"),array($js,"include/jquery/jquery-1.4.2.min.js"),false,false,false,false,false);
|
||||
|
||||
$state = is_on_call($operator_id);
|
||||
|
||||
function print_endcase($trigger = ""){
|
||||
print "<p><a href='javascript:" . $trigger . "(\"endcase=endcase\")' class='btn btn-primary'>" . T_("End case") . "</a></p>";
|
||||
}
|
||||
|
||||
function print_endwork($trigger = ""){
|
||||
print "<p><a href='javascript:" . $trigger . "(\"endwork=endwork\")' class='btn btn-info'>" . T_("End work") . "</a></p>";
|
||||
}
|
||||
|
||||
switch($state)
|
||||
{
|
||||
case false: //no call made
|
||||
@@ -273,8 +280,8 @@ switch($state)
|
||||
{
|
||||
//end the case
|
||||
if (!isset($_GET['end'])) print "<div>" . T_("End work") . "</div>";
|
||||
print_endcase("openParent");
|
||||
print_endwork("openParent");
|
||||
print "<p><a href='javascript:openParent(\"endcase=endcase\")'>" . T_("End case") . "</a></p>";
|
||||
print "<p><a href='javascript:openParent(\"endwork=endwork\")'>" . T_("End work") . "</a></p>";
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -300,11 +307,9 @@ switch($state)
|
||||
|
||||
print "<div>" . T_("Press the call button to dial the number for this appointment:") . "</div>";
|
||||
|
||||
print "<form action='?' method='post'>
|
||||
<div><p>" . T_("Number to call:") . " {$r['phone']} - {$r['description']}</p></div>
|
||||
<input type='hidden' id='contact_phone' name='contact_phone' value='{$r['contact_phone_id']}'/>
|
||||
<div><input type='submit' value=\"" . T_("Call") . "\" name='submit' id='submit' class='btn btn-primary'/></div>
|
||||
</form>";
|
||||
print "<form action='?' method='post'><div>";
|
||||
print "<p>" . T_("Number to call:") . " {$r['phone']} - {$r['description']}</p>";
|
||||
print "</div><div><input type='hidden' id='contact_phone' name='contact_phone' value='{$r['contact_phone_id']}'/><input type='submit' value=\"" . T_("Call") . "\" name='submit' id='submit'/></div></form>";
|
||||
}
|
||||
else
|
||||
print "<div>" . T_("Your VoIP extension is not enabled. Please close this window and enable VoIP by clicking once on the red button that says 'VoIP Off'") . "</div>";
|
||||
@@ -322,11 +327,12 @@ switch($state)
|
||||
LIMIT 1";
|
||||
|
||||
$rs = $db->GetRow($sql);
|
||||
|
||||
if (!empty($rs) && $rs['require_note'] == 1) $rn = 1; else $rn = 0;
|
||||
|
||||
|
||||
if (!isset($_GET['end']) && (empty($rs) || $rs['tryanother'] == 1)) //dial another number only when available and not ending
|
||||
{
|
||||
$rn = 0;
|
||||
if (!empty($rs) && $rs['require_note'] == 1) $rn = 1;
|
||||
|
||||
//an exclusion left join
|
||||
$sql = "SELECT c. *
|
||||
FROM contact_phone AS c
|
||||
@@ -374,7 +380,7 @@ switch($state)
|
||||
{
|
||||
print "<option value='{$r['contact_phone_id']}'>{$r['phone']} - {$r['description']}</option>";
|
||||
}
|
||||
print "</select></div><div><input type='submit' value=\"" . T_("Call") . "\" name='submit' id='submit' class='btn btn-primary'/></div></form>";
|
||||
print "</select></div><div><input type='submit' value=\"" . T_("Call") . "\" name='submit' id='submit'/></div></form>";
|
||||
}
|
||||
else
|
||||
print "<div>" . T_("Your VoIP extension is not enabled. Please close this window and enable VoIP by clicking once on the red button that says 'VoIP Off'") . "</div>";
|
||||
@@ -386,36 +392,39 @@ switch($state)
|
||||
|
||||
if ($rn) // a note is required to be entered
|
||||
{
|
||||
print "<div><label for='note' class='control-label'>" . T_("Enter a reason for this outcome before completing this case:") . "</label><textarea type='text' id='note' name='note' class='form-control' rows='3'></textarea><br/></div>";
|
||||
print "<div><label for='note'>" . T_("Enter a reason for this outcome before completing this case:") . "</label><input type='text' id='note' name='note' size='48'/><br/><br/><br/><br/></div>";
|
||||
//give focus on load
|
||||
print '<script type="text/javascript">$(document).ready(function(){$("#note").focus();});</script>';
|
||||
//put these lower on the screen so they don't get "automatically" clicked
|
||||
print_endcase("openParentNote");
|
||||
print_endwork("openParentNote");
|
||||
print "<p><a href='javascript:openParentNote(\"endcase=endcase\")'>" . T_("End case") . "</a></p>";
|
||||
print "<p><a href='javascript:openParentNote(\"endwork=endwork\")'>" . T_("End work") . "</a></p>";
|
||||
}
|
||||
else
|
||||
{
|
||||
print_endcase("openParent");
|
||||
print_endwork("openParent");
|
||||
print "<p><a href='javascript:openParent(\"endcase=endcase\")'>" . T_("End case") . "</a></p>";
|
||||
print "<p><a href='javascript:openParent(\"endwork=endwork\")'>" . T_("End work") . "</a></p";
|
||||
}
|
||||
}
|
||||
}
|
||||
else //don't try any more
|
||||
{
|
||||
$rn = 0;
|
||||
if (!empty($rs) && $rs['require_note'] == 1) $rn = 1;
|
||||
|
||||
//end the case
|
||||
|
||||
if ($rn) // a note is required to be entered
|
||||
{
|
||||
print "<div><label for='note' class='control-label'>" . T_("Enter a reason for this outcome before completing this case:") . "</label><textarea type='text' id='note' name='note' class='form-control' rows='3'></textarea><br/></div>";
|
||||
print "<div><label for='note'>" . T_("Enter a reason for this outcome before completing this case:") . "</label><input type='text' id='note' name='note' size='48'/><br/><br/><br/><br/></div>";
|
||||
print '<script type="text/javascript">$(document).ready(function(){$("#note").focus();});</script>';
|
||||
print_endcase("openParentNote");
|
||||
print_endwork("openParentNote");
|
||||
print "<p><a href='javascript:openParentNote(\"endcase=endcase\")'>" . T_("End case") . "</a></p>";
|
||||
print "<p><a href='javascript:openParentNote(\"endwork=endwork\")'>" . T_("End work") . "</a></p>";
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!isset($_GET['end'])) print "<div class='alert alert-info'>" . T_("The last call completed this call attempt") . "</div>";
|
||||
print_endcase("openParent");
|
||||
print_endwork("openParent");
|
||||
if (!isset($_GET['end'])) print "<div>" . T_("The last call completed this call attempt") . "</div>";
|
||||
print "<p><a href='javascript:openParent(\"endcase=endcase\")'>" . T_("End case") . "</a></p>";
|
||||
print "<p><a href='javascript:openParent(\"endwork=endwork\")'>" . T_("End work") . "</a></p>";
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -442,16 +451,14 @@ switch($state)
|
||||
print "<div><input type='submit' value=\"" . T_("Hangup") . "\" name='submit' id='submit'/></div></form>";
|
||||
break;
|
||||
case 4: //requires coding
|
||||
// print "<div class='status'>" . T_("Requires coding") . "</div>";
|
||||
print "<form action='?' method='post'><div class=\" \">";
|
||||
print "<div class='status'>" . T_("Requires coding") . "</div>";
|
||||
print "<form action='?' method='post'>";
|
||||
display_outcomes(false,$call_attempt_id,$case_id);
|
||||
if (isset($_POST['confirm'])){
|
||||
print "</div><input type='submit' class=\"btn btn-primary btn-lg\" style=\"margin: 20px;\" value=\"" . T_("Assign outcome") . "\" name='submit' id='submit'/></form>";
|
||||
}
|
||||
print "<div><input type='submit' value=\"" . T_("Assign outcome") . "\" name='submit' id='submit'/></div></form>";
|
||||
break;
|
||||
case 5: //done -- shouldn't come here as should be coded + done
|
||||
default:
|
||||
print "<div class='status alert alert-danger'>" . T_("Error: Close window") . "</div>";
|
||||
print "<div class='status'>" . T_("Error: Close window") . "</div>";
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
@@ -1059,7 +1059,7 @@ CREATE TABLE `outcome` (
|
||||
`permanent` TINYINT(1) UNSIGNED NOT NULL COMMENT 'Permanent outcome, used for all questionnaires, not possible to de-select',
|
||||
PRIMARY KEY (`outcome_id`),
|
||||
KEY `calc` (`calc`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=100;
|
||||
|
||||
--
|
||||
-- Dumping data for table `outcome`
|
||||
|
||||
@@ -1318,22 +1318,21 @@ function get_respondentselection_url($operator_id,$escape = true,$interface2 = f
|
||||
{
|
||||
$sid = get_limesurvey_id($operator_id,true); //true for RS
|
||||
if ($sid != false && !empty($sid) && $sid != 'NULL')
|
||||
{
|
||||
$url = LIME_URL . "index.php?interviewer=interviewer" . $amp . "loadall=reload" . $amp . "sid=$sid" . $amp . "token=$call_id" . $amp . "lang=" . DEFAULT_LOCALE;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (is_respondent_selection($operator_id) === false)
|
||||
{
|
||||
$url = get_limesurvey_url($operator_id);
|
||||
if (!$escape)
|
||||
$url = str_replace("&","&",$url);
|
||||
}
|
||||
else
|
||||
{
|
||||
if ($interface2)
|
||||
$url = 'rs_intro_interface2.php';
|
||||
else
|
||||
$url = 'rs_intro.php';
|
||||
}
|
||||
{
|
||||
if (is_respondent_selection($operator_id) === false)
|
||||
{
|
||||
$url = get_limesurvey_url($operator_id);
|
||||
if (!$escape)
|
||||
$url = str_replace("&","&",$url);
|
||||
}
|
||||
else
|
||||
{
|
||||
$url = 'rs_intro.php';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
6640
locale/quexs.pot
6640
locale/quexs.pot
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
@@ -20,11 +20,11 @@
|
||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
*
|
||||
* @author Adam Zammit <adam.zammit@deakin.edu.au>
|
||||
* @copyright Deakin University 2007,2008
|
||||
* @author Adam Zammit <adam.zammit@acspri.org.au>
|
||||
* @copyright Australian Consortium for Social and Political Research Inc 2007,2008
|
||||
* @package queXS
|
||||
* @subpackage user
|
||||
* @link http://www.deakin.edu.au/dcarf/ queXS was writen for DCARF - Deakin Computer Assisted Research Facility
|
||||
* @link http://www.acspri.org.au/ queXS was writen for Australian Consortium for Social and Political Research Incorporated (ACSPRI)
|
||||
* @license http://opensource.org/licenses/gpl-2.0.php The GNU General Public License (GPL) Version 2
|
||||
*
|
||||
*/
|
||||
@@ -62,13 +62,13 @@ $leavemessage = leave_message($case_id);
|
||||
|
||||
$js = array("js/popup.js","include/jquery/jquery-1.4.2.min.js","include/jquery-ui/jquery-ui.min.js");
|
||||
|
||||
if (AUTO_LOGOUT_MINUTES !== false)
|
||||
{
|
||||
$js[] = "js/childnap.js";
|
||||
}
|
||||
if (AUTO_LOGOUT_MINUTES !== false) $js[] = "js/childnap.js";
|
||||
|
||||
xhtml_head(T_("Respondent Selection - Answering machine"),true,array("css/rs.css","include/jquery-ui/jquery-ui.min.css"),$js);
|
||||
|
||||
|
||||
xhtml_head(T_("Respondent Selection") . " - " . T_("Answering machine"),true,array("include/bootstrap/css/bootstrap.min.css","css/rs.css"),$js);//,"include/jquery-ui/jquery-ui.min.css"
|
||||
|
||||
print "<div class='col-lg-12'>";
|
||||
if ($leavemessage)
|
||||
{
|
||||
//display answering machine text
|
||||
@@ -78,24 +78,48 @@ if ($leavemessage)
|
||||
|
||||
$r = $db->GetRow($sql);
|
||||
|
||||
print "<p class='rstext'>" . template_replace($r['rs_answeringmachine'],$operator_id,$case_id) . "</p>";
|
||||
if (!empty($r['rs_answeringmachine'])) print "<div class='rstext well rs'>" . template_replace($r['rs_answeringmachine'],$operator_id,$case_id) . "</div>";
|
||||
}
|
||||
else
|
||||
print "<p class='rstext'>" . T_("Do not leave a message, please hang up") . "</p>";
|
||||
print "<p class='rstext alert alert-warning'>" . T_("Do not leave a message, please hang up") . "</p>";
|
||||
|
||||
print "<div class=' '>
|
||||
<div class='col-lg-2'><p><a class='btn btn-default' href=\"rs_intro.php\" >" . T_("Go Back") . "</a></p></div>";
|
||||
|
||||
if ($questionnaire_id){
|
||||
$outcomes = $db->GetOne("SELECT q.outcomes FROM `questionnaire` as q WHERE q.questionnaire_id = $questionnaire_id");//
|
||||
$outcomes = explode(",",$outcomes);
|
||||
|
||||
$des = $db->GetAll("SELECT description FROM outcome WHERE outcome_id IN (23,24,29)");
|
||||
translate_array($des,array("description"));
|
||||
|
||||
print "<div class='col-lg-4'><p class=''><h4 class='text-right'>" . T_("End call with outcome:") . "</h4></p></div>
|
||||
<div class='col-lg-6'>";
|
||||
if (in_array(29,$outcomes)){
|
||||
print "<p><a class='btn btn-primary' ";
|
||||
if ( ALTERNATE_INTERFACE ) print "href=\"javascript:parent.location.href = 'index_interface2.php?outcome=29&endcase=endcase'\">";
|
||||
else print "href=\"javascript:parent.poptastic('call.php?defaultoutcome=29');\">";
|
||||
print $des[2]['description'] . "</a></p>";
|
||||
}
|
||||
|
||||
if (in_array(23,$outcomes) && $leavemessage){
|
||||
print "<p><a class='btn btn-primary' ";
|
||||
if ( ALTERNATE_INTERFACE ) print "href=\"javascript:parent.location.href = 'index_interface2.php?outcome=23&endcase=endcase'\">";
|
||||
else print "href=\"javascript:parent.poptastic('call.php?defaultoutcome=23');\">";
|
||||
print $des[0]['description'] . "</a></p>";
|
||||
}
|
||||
|
||||
if (in_array(24,$outcomes)){
|
||||
print "<p><a class='btn btn-primary' ";
|
||||
if ( ALTERNATE_INTERFACE ) print "href=\"javascript:parent.location.href = 'index_interface2.php?outcome=24&endcase=endcase'\">";
|
||||
else print "href=\"javascript:parent.poptastic('call.php?defaultoutcome=24');\">";
|
||||
print $des[1]['description'] . "</a></p>";
|
||||
}
|
||||
print "</div>";
|
||||
}
|
||||
|
||||
print "</div>";
|
||||
|
||||
?>
|
||||
<p class='rsoption'><a href="javascript:parent.poptastic('call.php?defaultoutcome=29');"><?php echo T_("End call with outcome: Business answering machine"); ?></a></p>
|
||||
<?php
|
||||
if ($leavemessage)
|
||||
{
|
||||
?>
|
||||
<p class='rsoption'><a href="javascript:parent.poptastic('call.php?defaultoutcome=23');"><?php echo T_("End call with outcome: Answering machine Message left"); ?></a></p>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<p class='rsoption'><a href="javascript:parent.poptastic('call.php?defaultoutcome=24');"><?php echo T_("End call with outcome: Answering machine No message left"); ?></a></p>
|
||||
<p class='rsoption'><a href="rs_intro.php"><?php echo T_("Go Back"); ?></a></p>
|
||||
<?php
|
||||
|
||||
xhtml_foot();
|
||||
|
||||
|
||||
@@ -1,102 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* Respondent selection - Answering machine
|
||||
*
|
||||
*
|
||||
* This file is part of queXS
|
||||
*
|
||||
* queXS is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* queXS is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with queXS; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
*
|
||||
* @author Adam Zammit <adam.zammit@acspri.org.au>
|
||||
* @copyright Australian Consortium for Social and Political Research Inc 2007,2008
|
||||
* @package queXS
|
||||
* @subpackage user
|
||||
* @link http://www.acspri.org.au/ queXS was writen for Australian Consortium for Social and Political Research Incorporated (ACSPRI)
|
||||
* @license http://opensource.org/licenses/gpl-2.0.php The GNU General Public License (GPL) Version 2
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* Configuration file
|
||||
*/
|
||||
include ("config.inc.php");
|
||||
|
||||
/**
|
||||
* Database file
|
||||
*/
|
||||
include ("db.inc.php");
|
||||
|
||||
/**
|
||||
* Authentication
|
||||
*/
|
||||
require ("auth-interviewer.php");
|
||||
|
||||
|
||||
/**
|
||||
* XHTML
|
||||
*/
|
||||
include ("functions/functions.xhtml.php");
|
||||
|
||||
/**
|
||||
* Operator functions
|
||||
*/
|
||||
include ("functions/functions.operator.php");
|
||||
|
||||
$operator_id = get_operator_id();
|
||||
$case_id = get_case_id($operator_id);
|
||||
$questionnaire_id = get_questionnaire_id($operator_id);
|
||||
$leavemessage = leave_message($case_id);
|
||||
|
||||
$js = array("js/popup.js","include/jquery/jquery-1.4.2.min.js","include/jquery-ui/jquery-ui.min.js");
|
||||
|
||||
if (AUTO_LOGOUT_MINUTES !== false)
|
||||
{
|
||||
$js[] = "js/childnap.js";
|
||||
}
|
||||
|
||||
xhtml_head(T_("Respondent Selection - Answering machine"),true,array("css/rs.css","include/jquery-ui/jquery-ui.min.css"),$js);
|
||||
|
||||
if ($leavemessage)
|
||||
{
|
||||
//display answering machine text
|
||||
$sql = "SELECT rs_answeringmachine
|
||||
FROM questionnaire
|
||||
WHERE questionnaire_id = '$questionnaire_id'";
|
||||
|
||||
$r = $db->GetRow($sql);
|
||||
|
||||
print "<p class='rstext'>" . template_replace($r['rs_answeringmachine'],$operator_id,$case_id) . "</p>";
|
||||
}
|
||||
else
|
||||
print "<p class='rstext'>" . T_("Do not leave a message, please hang up") . "</p>";
|
||||
|
||||
?>
|
||||
<p class='rsoption'><a href="javascript:parent.location.href = 'index_interface2.php?outcome=29&endcase=endcase'"><?php echo T_("End call with outcome: Business answering machine"); ?></a></p>
|
||||
<?php
|
||||
if ($leavemessage)
|
||||
{
|
||||
?>
|
||||
<p class='rsoption'><a href="javascript:parent.location.href = 'index_interface2.php?outcome=23&endcase=endcase'"><?php echo T_("End call with outcome: Answering machine Message left"); ?></a></p>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<p class='rsoption'><a href="javascript:parent.location.href = 'index_interface2.php?outcome=24&endcase=endcase'"><?php echo T_("End call with outcome: Answering machine No message left"); ?></a></p>
|
||||
<p class='rsoption'><a href="rs_intro_interface2.php"><?php echo T_("Go Back"); ?></a></p>
|
||||
<?php
|
||||
|
||||
xhtml_foot();
|
||||
|
||||
?>
|
||||
@@ -20,11 +20,11 @@
|
||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
*
|
||||
* @author Adam Zammit <adam.zammit@deakin.edu.au>
|
||||
* @copyright Deakin University 2007,2008
|
||||
* @author Adam Zammit <adam.zammit@acspri.org.au>
|
||||
* @copyright Australian Consortium for Social and Political Research Inc 2007,2008
|
||||
* @package queXS
|
||||
* @subpackage user
|
||||
* @link http://www.deakin.edu.au/dcarf/ queXS was writen for DCARF - Deakin Computer Assisted Research Facility
|
||||
* @link http://www.acspri.org.au/ queXS was writen for Australian Consortium for Social and Political Research Incorporated (ACSPRI)
|
||||
* @license http://opensource.org/licenses/gpl-2.0.php The GNU General Public License (GPL) Version 2
|
||||
*
|
||||
*/
|
||||
@@ -52,21 +52,25 @@ include_once ("lang.inc.php");
|
||||
|
||||
$js = array("js/popup.js","include/jquery/jquery-1.4.2.min.js","include/jquery-ui/jquery-ui.min.js");
|
||||
|
||||
if (AUTO_LOGOUT_MINUTES !== false)
|
||||
{
|
||||
$js[] = "js/childnap.js";
|
||||
}
|
||||
if (AUTO_LOGOUT_MINUTES !== false) $js[] = "js/childnap.js";
|
||||
|
||||
|
||||
xhtml_head(T_("Respondent Selection - Business answers"),true,array("css/rs.css","include/jquery-ui/jquery-ui.min.css"), $js);
|
||||
xhtml_head(T_("Respondent Selection") . " - " . T_("Business answers"),true,array("include/bootstrap/css/bootstrap.min.css","css/rs.css"), $js);
|
||||
|
||||
print "<p class='rstext well rs'>" . T_("Sorry to bother you, I have called the wrong number") . "</p>";
|
||||
|
||||
?>
|
||||
<p class='rstext'><?php echo T_("Sorry to bother you, I have called the wrong number")?></p>
|
||||
print "<div class=' '>
|
||||
<div class='col-lg-2'><p><a class='btn btn-default' href=\"rs_intro.php\" >" . T_("Go Back") . "</a></p></div>";
|
||||
|
||||
$des = $db->GetAll("SELECT description FROM outcome WHERE outcome_id = 16");
|
||||
print "<div class='col-lg-4'><p><h4 class='text-right'>" . T_("End call with outcome:") . "</h4></p></div>
|
||||
<div class='col-lg-6'><p><a class='btn btn-primary' ";
|
||||
if ( ALTERNATE_INTERFACE ) print "href=\"javascript:parent.location.href = 'index_interface2.php?outcome=16&endcase=endcase'\">";
|
||||
else print "href=\"javascript:parent.poptastic('call.php?defaultoutcome=16');\">";
|
||||
print T_($des[0]['description']) . "</a></p></div>";
|
||||
|
||||
print "</div>";
|
||||
|
||||
<p class='rsoption'><a href="javascript:parent.poptastic('call.php?defaultoutcome=16');"><?php echo T_("End call with outcome: Business number"); ?></a></p>
|
||||
<p class='rsoption'><a href="rs_intro.php"><?php echo T_("Go Back"); ?></a></p>
|
||||
<?php
|
||||
|
||||
xhtml_foot();
|
||||
|
||||
|
||||
@@ -1,73 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* Respondent selection - Business answers
|
||||
*
|
||||
*
|
||||
* This file is part of queXS
|
||||
*
|
||||
* queXS is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* queXS is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with queXS; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
*
|
||||
* @author Adam Zammit <adam.zammit@acspri.org.au>
|
||||
* @copyright Australian Consortium for Social and Political Research Inc 2007,2008
|
||||
* @package queXS
|
||||
* @subpackage user
|
||||
* @link http://www.acspri.org.au/ queXS was writen for Australian Consortium for Social and Political Research Incorporated (ACSPRI)
|
||||
* @license http://opensource.org/licenses/gpl-2.0.php The GNU General Public License (GPL) Version 2
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* Configuration file
|
||||
*/
|
||||
include ("config.inc.php");
|
||||
|
||||
/**
|
||||
* Authentication
|
||||
*/
|
||||
require ("auth-interviewer.php");
|
||||
|
||||
|
||||
/**
|
||||
* XHTML
|
||||
*/
|
||||
include ("functions/functions.xhtml.php");
|
||||
|
||||
/**
|
||||
* Language
|
||||
*/
|
||||
include_once ("lang.inc.php");
|
||||
|
||||
$js = array("js/popup.js","include/jquery/jquery-1.4.2.min.js","include/jquery-ui/jquery-ui.min.js");
|
||||
|
||||
if (AUTO_LOGOUT_MINUTES !== false)
|
||||
{
|
||||
$js[] = "js/childnap.js";
|
||||
}
|
||||
|
||||
|
||||
xhtml_head(T_("Respondent Selection - Business answers"),true,array("css/rs.css","include/jquery-ui/jquery-ui.min.css"), $js);
|
||||
|
||||
|
||||
?>
|
||||
<p class='rstext'><?php echo T_("Sorry to bother you, I have called the wrong number")?></p>
|
||||
|
||||
<p class='rsoption'><a href="javascript:parent.location.href = 'index_interface2.php?outcome=16&endcase=endcase'"><?php echo T_("End call with outcome: Business number"); ?></a></p>
|
||||
<p class='rsoption'><a href="rs_intro_interface2.php"><?php echo T_("Go Back"); ?></a></p>
|
||||
<?php
|
||||
|
||||
xhtml_foot();
|
||||
|
||||
?>
|
||||
@@ -20,11 +20,11 @@
|
||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
*
|
||||
* @author Adam Zammit <adam.zammit@deakin.edu.au>
|
||||
* @copyright Deakin University 2007,2008
|
||||
* @author Adam Zammit <adam.zammit@acspri.org.au>
|
||||
* @copyright Australian Consortium for Social and Political Research Inc 2007,2008
|
||||
* @package queXS
|
||||
* @subpackage user
|
||||
* @link http://www.deakin.edu.au/dcarf/ queXS was writen for DCARF - Deakin Computer Assisted Research Facility
|
||||
* @link http://www.acspri.org.au/ queXS was writen for Australian Consortium for Social and Political Research Incorporated (ACSPRI)
|
||||
* @license http://opensource.org/licenses/gpl-2.0.php The GNU General Public License (GPL) Version 2
|
||||
*
|
||||
*/
|
||||
@@ -62,14 +62,10 @@ include ("functions/functions.limesurvey.php");
|
||||
|
||||
$js = array("js/popup.js","include/jquery/jquery-1.4.2.min.js","include/jquery-ui/jquery-ui.min.js");
|
||||
|
||||
if (AUTO_LOGOUT_MINUTES !== false)
|
||||
{
|
||||
$js[] = "js/childnap.js";
|
||||
}
|
||||
if (AUTO_LOGOUT_MINUTES !== false) $js[] = "js/childnap.js";
|
||||
|
||||
|
||||
|
||||
xhtml_head(T_("Respondent Selection - Call back"),true,array("css/rs.css","include/jquery-ui/jquery-ui.min.css"), $js );
|
||||
xhtml_head(T_("Respondent Selection") . " - " . T_("Call back"),true,array("include/bootstrap/css/bootstrap.min.css","css/rs.css"), $js );
|
||||
|
||||
$operator_id = get_operator_id();
|
||||
$case_id = get_case_id($operator_id);
|
||||
@@ -79,23 +75,36 @@ $questionnaire_id = get_questionnaire_id($operator_id);
|
||||
$sql = "SELECT rs_callback
|
||||
FROM questionnaire
|
||||
WHERE questionnaire_id = '$questionnaire_id'";
|
||||
|
||||
$r = $db->GetRow($sql);
|
||||
|
||||
print "<p class='rstext'>" . template_replace($r['rs_callback'],$operator_id,$case_id) . "</p>";
|
||||
print "<p class='rstext'>" . T_("You are: ") . round(limesurvey_percent_complete($case_id),1) . T_("% complete") . "</p>";
|
||||
if (!empty($r['rs_callback'])) print "<div class='rstext well rs'>" . template_replace($r['rs_callback'],$operator_id,$case_id) . "</div>";
|
||||
|
||||
print "<p class='rstext alert alert-info'>" . T_("Survey is") . " " . round(limesurvey_percent_complete($case_id),1) . " % " . T_("complete") . "</p>";
|
||||
|
||||
//display outcomes
|
||||
print "<div class=' '>
|
||||
<div class='col-lg-2'><p><a class='btn btn-default' href=\"rs_intro.php\" >" . T_("Go Back") . "</a></p></div>";
|
||||
|
||||
//filter displayed outcomes
|
||||
if ($questionnaire_id){
|
||||
$outcomes = $db->GetOne("SELECT q.outcomes FROM `questionnaire` as q WHERE q.questionnaire_id = $questionnaire_id");//
|
||||
$outcomes = explode(",",$outcomes);
|
||||
|
||||
if (in_array(8,$outcomes)){
|
||||
$des = $db->GetAll("SELECT description FROM outcome WHERE outcome_id = 8");
|
||||
print "<div class='col-lg-4'><p class=''><h4 class=' '>" . T_("End call with outcome:") . "</h4></p>
|
||||
<p><a class='btn btn-primary' ";
|
||||
if ( ALTERNATE_INTERFACE ) print "href=\"javascript:parent.location.href = 'index_interface2.php?outcome=8&endcase=endcase'\">";
|
||||
else print "href=\"javascript:parent.poptastic('call.php?defaultoutcome=8');\">";
|
||||
print T_($des[0]['description']) . "</a></p></div>";
|
||||
}
|
||||
}
|
||||
|
||||
print "<div class='col-lg-6'>
|
||||
<p><a href=\"" . (get_limesurvey_url($operator_id)) . "\" class='btn btn-primary' >" . T_("Yes - Continue where we left off") . "</a></p></div>";
|
||||
|
||||
print "</div>";
|
||||
|
||||
?>
|
||||
|
||||
<p class='rsoption'><a href="<?php print(get_limesurvey_url($operator_id)); ?>"><?php echo T_("Yes - Continue where we left off"); ?></a></p>
|
||||
<p class='rsoption'><a href="javascript:parent.poptastic('call.php?defaultoutcome=8');"><?php echo T_("End call with outcome: Refusal by respondent"); ?></a></p>
|
||||
<p class='rsoption'><a href="rs_intro.php"><?php echo T_("Go Back"); ?></a></p>
|
||||
<?php
|
||||
|
||||
xhtml_foot();
|
||||
|
||||
|
||||
?>
|
||||
|
||||
@@ -1,101 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* Respondent selection - Call back (respondent already started questionnaire)
|
||||
*
|
||||
*
|
||||
* This file is part of queXS
|
||||
*
|
||||
* queXS is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* queXS is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with queXS; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
*
|
||||
* @author Adam Zammit <adam.zammit@acspri.org.au>
|
||||
* @copyright Australian Consortium for Social and Political Research Inc 2007,2008
|
||||
* @package queXS
|
||||
* @subpackage user
|
||||
* @link http://www.acspri.org.au/ queXS was writen for Australian Consortium for Social and Political Research Incorporated (ACSPRI)
|
||||
* @license http://opensource.org/licenses/gpl-2.0.php The GNU General Public License (GPL) Version 2
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* Configuration file
|
||||
*/
|
||||
include ("config.inc.php");
|
||||
|
||||
/**
|
||||
* Database file
|
||||
*/
|
||||
include ("db.inc.php");
|
||||
|
||||
/**
|
||||
* Authentication
|
||||
*/
|
||||
require ("auth-interviewer.php");
|
||||
|
||||
|
||||
/**
|
||||
* XHTML functions
|
||||
*/
|
||||
include ("functions/functions.xhtml.php");
|
||||
|
||||
/**
|
||||
* Operator functions
|
||||
*/
|
||||
include ("functions/functions.operator.php");
|
||||
|
||||
/**
|
||||
* Limesurvey functions
|
||||
*/
|
||||
include ("functions/functions.limesurvey.php");
|
||||
|
||||
$js = array("js/popup.js","include/jquery/jquery-1.4.2.min.js","include/jquery-ui/jquery-ui.min.js");
|
||||
|
||||
if (AUTO_LOGOUT_MINUTES !== false)
|
||||
{
|
||||
$js[] = "js/childnap.js";
|
||||
}
|
||||
|
||||
|
||||
|
||||
xhtml_head(T_("Respondent Selection - Call back"),true,array("css/rs.css","include/jquery-ui/jquery-ui.min.css"), $js );
|
||||
|
||||
$operator_id = get_operator_id();
|
||||
$case_id = get_case_id($operator_id);
|
||||
$questionnaire_id = get_questionnaire_id($operator_id);
|
||||
|
||||
//display introduction text
|
||||
$sql = "SELECT rs_callback
|
||||
FROM questionnaire
|
||||
WHERE questionnaire_id = '$questionnaire_id'";
|
||||
|
||||
$r = $db->GetRow($sql);
|
||||
|
||||
print "<p class='rstext'>" . template_replace($r['rs_callback'],$operator_id,$case_id) . "</p>";
|
||||
print "<p class='rstext'>" . T_("You are: ") . round(limesurvey_percent_complete($case_id),1) . T_("% complete") . "</p>";
|
||||
|
||||
|
||||
//display outcomes
|
||||
|
||||
?>
|
||||
|
||||
<p class='rsoption'><a href="<?php print(get_limesurvey_url($operator_id)); ?>"><?php echo T_("Yes - Continue where we left off"); ?></a></p>
|
||||
<p class='rsoption'><a href="javascript:parent.location.href = 'index_interface2.php?outcome=8&endcase=endcase'"><?php echo T_("End call with outcome: Refusal by respondent"); ?></a></p>
|
||||
<p class='rsoption'><a href="rs_intro_interface2.php"><?php echo T_("Go Back"); ?></a></p>
|
||||
<?php
|
||||
|
||||
xhtml_foot();
|
||||
|
||||
|
||||
?>
|
||||
147
rs_intro.php
147
rs_intro.php
@@ -20,11 +20,11 @@
|
||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
*
|
||||
* @author Adam Zammit <adam.zammit@deakin.edu.au>
|
||||
* @copyright Deakin University 2007,2008
|
||||
* @author Adam Zammit <adam.zammit@acspri.org.au>
|
||||
* @copyright Australian Consortium for Social and Political Research Inc 2007,2008
|
||||
* @package queXS
|
||||
* @subpackage user
|
||||
* @link http://www.deakin.edu.au/dcarf/ queXS was writen for DCARF - Deakin Computer Assisted Research Facility
|
||||
* @link http://www.acspri.org.au/ queXS was writen for Australian Consortium for Social and Political Research Incorporated (ACSPRI)
|
||||
* @license http://opensource.org/licenses/gpl-2.0.php The GNU General Public License (GPL) Version 2
|
||||
*
|
||||
*/
|
||||
@@ -62,74 +62,101 @@ include ("functions/functions.limesurvey.php");
|
||||
|
||||
$js = array("js/popup.js","include/jquery/jquery-1.4.2.min.js","include/jquery-ui/jquery-ui.min.js");
|
||||
|
||||
if (AUTO_LOGOUT_MINUTES !== false)
|
||||
{
|
||||
$js[] = "js/childnap.js";
|
||||
}
|
||||
|
||||
|
||||
xhtml_head(T_("Respondent Selection - Introduction"),true,array("css/rs.css","include/jquery-ui/jquery-ui.min.css"), $js);
|
||||
|
||||
//display introduction text
|
||||
|
||||
if (AUTO_LOGOUT_MINUTES !== false) $js[] = "js/childnap.js";
|
||||
|
||||
$operator_id = get_operator_id();
|
||||
$case_id = get_case_id($operator_id);
|
||||
$questionnaire_id = get_questionnaire_id($operator_id);
|
||||
|
||||
//display introduction text
|
||||
$sql = "SELECT rs_intro,rs_project_intro,rs_callback
|
||||
FROM questionnaire
|
||||
WHERE questionnaire_id = '$questionnaire_id'";
|
||||
if($questionnaire_id && $operator_id){
|
||||
|
||||
$r = $db->GetRow($sql);
|
||||
xhtml_head(T_("Respondent Selection") . " - " . T_("Introduction"),false,array("include/bootstrap/css/bootstrap.min.css","css/rs.css"), $js);// "include/bootstrap/css/bootstrap-theme.min.css",
|
||||
|
||||
print "<p class='rstext'>". template_replace($r['rs_intro'],$operator_id,$case_id) . "</p>";
|
||||
//display outcomes
|
||||
$outcomes = $db->GetOne("SELECT q.outcomes FROM `questionnaire` as q WHERE q.questionnaire_id = $questionnaire_id");//
|
||||
$outcomes = explode(",",$outcomes);
|
||||
|
||||
$des = $db->GetAll("SELECT description FROM outcome WHERE outcome_id IN (1,2,3,6,8,16,17,18,30,31)");
|
||||
translate_array($des,array("description"));
|
||||
|
||||
//display outcomes
|
||||
print "<div class='col-lg-4 text-danger'>
|
||||
<h3>" . T_("End call with outcome:") . "</h3>";
|
||||
print "<div class='panel panel-danger'><div class='panel-heading'><t class='panel-title'>" . T_("Not Contacted") . "</t></div>
|
||||
<div class='panel-body'>";
|
||||
if ( ALTERNATE_INTERFACE ) print "<p><a class='btn btn-default' href=\"javascript:parent.location.href = 'index_interface2.php?outcome=1&endcase=endcase'\">" . $des[0]['description'] . "</a></p>";
|
||||
print "<p><a class='btn btn-default'";
|
||||
if ( ALTERNATE_INTERFACE ) print "href=\"javascript:parent.location.href = 'index_interface2.php?outcome=2&endcase=endcase'\">";
|
||||
else print "href=\"javascript:parent.poptastic('call.php?defaultoutcome=2');\">";
|
||||
print $des[1]['description'] . "</a></p>";
|
||||
if ( ALTERNATE_INTERFACE ) print "<p><a class='btn btn-default' href=\"javascript:parent.location.href = 'index_interface2.php?outcome=3&endcase=endcase'\">" . $des[2]['description'] . "</a></p>";
|
||||
print "</div></div>";
|
||||
|
||||
print "<div class='panel panel-info'><div class='panel-heading'><t class='panel-title'>" . T_("Contacted") . "</t></div>
|
||||
<div class='panel-body' style='padding:10px;'>";
|
||||
if (in_array(8,$outcomes)){
|
||||
print "<p><a class='btn btn-default' ";
|
||||
if ( ALTERNATE_INTERFACE ) print "href=\"javascript:parent.location.href = 'index_interface2.php?outcome=8&endcase=endcase'\">";
|
||||
else print "href=\"javascript:parent.poptastic('call.php?defaultoutcome=8');\">";
|
||||
print $des[4]['description'] . "</a></p>"; }
|
||||
if (in_array(6,$outcomes)){
|
||||
print "<p><a class='btn btn-default' ";
|
||||
if ( ALTERNATE_INTERFACE ) print "href=\"javascript:parent.location.href = 'index_interface2.php?outcome=6&endcase=endcase'\">";
|
||||
else print "href=\"javascript:parent.poptastic('call.php?defaultoutcome=6');\">";
|
||||
print $des[3]['description'] . "</a></p>"; }
|
||||
if (in_array(17,$outcomes)){
|
||||
print "<p><a class='btn btn-default' title = \"" . T_("No eligible respondent (person never available on this number)") . "\"";
|
||||
if ( ALTERNATE_INTERFACE ) print "href=\"javascript:parent.location.href = 'index_interface2.php?outcome=17&endcase=endcase'\">";
|
||||
else print "href=\"javascript:parent.poptastic('call.php?defaultoutcome=17');\">";
|
||||
print $des[6]['description'] . " * </a></p>"; }
|
||||
if (in_array(18,$outcomes)){
|
||||
print "<p><a class='btn btn-default' ";
|
||||
if ( ALTERNATE_INTERFACE ) print "href=\"javascript:parent.location.href = 'index_interface2.php?outcome=18&endcase=endcase'\">";
|
||||
else print "href=\"javascript:parent.poptastic('call.php?defaultoutcome=18');\">";
|
||||
print $des[7]['description'] . "</a></p>"; }
|
||||
if (in_array(31,$outcomes)){
|
||||
print "<p><a class='btn btn-default' title = \"" . T_("Non contact (person not currently available on this number: no appointment made)") . "\"";
|
||||
if ( ALTERNATE_INTERFACE ) print "href=\"javascript:parent.location.href = 'index_interface2.php?outcome=31&endcase=endcase'\">";
|
||||
else print "href=\"javascript:parent.poptastic('call.php?defaultoutcome=31');\">";
|
||||
print $des[9]['description'] . " * </a></p>"; }
|
||||
if (in_array(30,$outcomes)){
|
||||
print "<p><a class='btn btn-default' ";
|
||||
if ( ALTERNATE_INTERFACE ) print "href=\"javascript:parent.location.href = 'index_interface2.php?outcome=30&endcase=endcase'\">";
|
||||
else print "href=\"javascript:parent.poptastic('call.php?defaultoutcome=30');\">";
|
||||
print $des[8]['description'] . "</a></p>"; }
|
||||
if (in_array(16,$outcomes))
|
||||
print "<p><a class='btn btn-default' href=\"rs_business.php\">" . $des[5]['description'] . "</a></p>";
|
||||
if (in_array(23,$outcomes) || in_array(24,$outcomes) || in_array(29,$outcomes))
|
||||
print "<p><a class='btn btn-default' href=\"rs_answeringmachine.php\">" . T_("Answering machine") . "</a></p>";
|
||||
print "</div></div>";
|
||||
print "</div>";
|
||||
|
||||
print "<div class=\"col-sm-7 \"><h3 class='text-primary'>" . T_("Respondent Selection") . " - " . T_("Introduction") . "</h3>";
|
||||
//display introduction text
|
||||
$sql = "SELECT rs_intro,rs_project_intro,rs_callback
|
||||
FROM questionnaire
|
||||
WHERE questionnaire_id = '$questionnaire_id'";
|
||||
|
||||
$r = $db->GetRow($sql);
|
||||
if (!empty($r['rs_intro'])) print "<div class='rstext well rs'>" . template_replace($r['rs_intro'],$operator_id,$case_id) . "</div>";
|
||||
print "</div>";
|
||||
|
||||
// display continue
|
||||
print "<div class=\"col-sm-7 text-right\" style=\"margin-top: 50px;\">";
|
||||
print "<p><a class=\"btn btn-lg btn-primary\" href=\"";
|
||||
if (limesurvey_percent_complete($case_id) == false){
|
||||
if(empty($r['rs_project_intro'])) { //If nothing is specified as a project introduction, skip straight to questionnaire
|
||||
print(get_limesurvey_url($operator_id)); }
|
||||
else print "rs_project_intro.php";
|
||||
}
|
||||
else {
|
||||
if(empty($r['rs_callback'])) { //If nothing is specified as a callback screen, skip straight to questionnaire
|
||||
print(get_limesurvey_url($operator_id)); }
|
||||
else print "rs_callback.php";
|
||||
}
|
||||
print "\">" . T_("Yes - Continue") . "</a></p>";
|
||||
print "</div>";
|
||||
|
||||
if (limesurvey_percent_complete($case_id) == false)
|
||||
{
|
||||
if(empty($r['rs_project_intro']))
|
||||
{
|
||||
//If nothing is specified as a project introduction, skip straight to questionnaire
|
||||
?>
|
||||
<p class='rsoption'><a href="<?php print(get_limesurvey_url($operator_id)); ?>"><?php echo T_("Yes - Continue"); ?></a></p>
|
||||
<?php
|
||||
}
|
||||
else
|
||||
{
|
||||
?>
|
||||
<p class='rsoption'><a href="rs_project_intro.php"><?php echo T_("Yes - Continue"); ?></a></p>
|
||||
<?php
|
||||
}
|
||||
} else {
|
||||
if(empty($r['rs_callback']))
|
||||
{
|
||||
//If nothing is specified as a callback screen, skip straight to questionnaire
|
||||
?>
|
||||
<p class='rsoption'><a href="<?php print(get_limesurvey_url($operator_id)); ?>"><?php echo T_("Yes - Continue"); ?></a></p>
|
||||
<?php
|
||||
}
|
||||
else
|
||||
{
|
||||
?>
|
||||
<p class='rsoption'><a href="rs_callback.php"><?php echo T_("Yes - Continue"); ?></a></p>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
?>
|
||||
<p class='rsoption'><a href="rs_business.php"><?php echo T_("Business number"); ?></a></p>
|
||||
<p class='rsoption'><a href="rs_answeringmachine.php"><?php echo T_("Answering machine"); ?></a></p>
|
||||
<p class='rsoption'><a href="javascript:parent.poptastic('call.php?defaultoutcome=2');"><?php echo T_("End call with outcome: No answer (ring out or busy) "); ?></a></p>
|
||||
<p class='rsoption'><a href="javascript:parent.poptastic('call.php?defaultoutcome=18');"><?php echo T_("End call with outcome: Accidental hang up"); ?></a></p>
|
||||
<p class='rsoption'><a href="javascript:parent.poptastic('call.php?defaultoutcome=6');"><?php echo T_("End call with outcome: Refusal by unknown person"); ?></a></p>
|
||||
<p class='rsoption'><a href="javascript:parent.poptastic('call.php?defaultoutcome=8');"><?php echo T_("End call with outcome: Refusal by respondent"); ?></a></p>
|
||||
<p class='rsoption'><a href="javascript:parent.poptastic('call.php?defaultoutcome=17');"><?php echo T_("End call with outcome: No eligible respondent (person never available on this number)"); ?></a></p>
|
||||
<p class='rsoption'><a href="javascript:parent.poptastic('call.php?defaultoutcome=31');"><?php echo T_("End call with outcome: Non contact (person not currently available on this number: no appointment made)"); ?></a></p>
|
||||
<p class='rsoption'><a href="javascript:parent.poptastic('call.php?defaultoutcome=30');"><?php echo T_("End call with outcome: Out of sample (already completed in another mode)"); ?></a></p>
|
||||
<?php
|
||||
|
||||
xhtml_foot();
|
||||
|
||||
|
||||
@@ -1,144 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* Respondent selection introduction
|
||||
*
|
||||
*
|
||||
* This file is part of queXS
|
||||
*
|
||||
* queXS is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* queXS is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with queXS; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
*
|
||||
* @author Adam Zammit <adam.zammit@acspri.org.au>
|
||||
* @copyright Australian Consortium for Social and Political Research Inc 2007,2008
|
||||
* @package queXS
|
||||
* @subpackage user
|
||||
* @link http://www.acspri.org.au/ queXS was writen for Australian Consortium for Social and Political Research Incorporated (ACSPRI)
|
||||
* @license http://opensource.org/licenses/gpl-2.0.php The GNU General Public License (GPL) Version 2
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* Configuration file
|
||||
*/
|
||||
include ("config.inc.php");
|
||||
|
||||
/**
|
||||
* Database file
|
||||
*/
|
||||
include ("db.inc.php");
|
||||
|
||||
/**
|
||||
* Authentication
|
||||
*/
|
||||
require ("auth-interviewer.php");
|
||||
|
||||
|
||||
/**
|
||||
* XHTML functions
|
||||
*/
|
||||
include ("functions/functions.xhtml.php");
|
||||
|
||||
/**
|
||||
* Operator functions
|
||||
*/
|
||||
include ("functions/functions.operator.php");
|
||||
|
||||
/**
|
||||
* Limesurvey functions
|
||||
*/
|
||||
include ("functions/functions.limesurvey.php");
|
||||
|
||||
$js = array("js/popup.js","include/jquery/jquery-1.4.2.min.js","include/jquery-ui/jquery-ui.min.js");
|
||||
|
||||
if (AUTO_LOGOUT_MINUTES !== false)
|
||||
{
|
||||
$js[] = "js/childnap.js";
|
||||
}
|
||||
|
||||
|
||||
xhtml_head(T_("Respondent Selection - Introduction"),false,array("include/bootstrap/css/bootstrap.min.css","css/rs.css","css/rs.css","include/jquery-ui/jquery-ui.min.css"), $js);
|
||||
|
||||
$operator_id = get_operator_id();
|
||||
$case_id = get_case_id($operator_id);
|
||||
$questionnaire_id = get_questionnaire_id($operator_id);
|
||||
|
||||
//display outcomes
|
||||
?>
|
||||
<div class="col-sm-3 text-danger">
|
||||
<h4><?php echo T_("End call with outcome:"); ?></h4>
|
||||
<ul class="" style="padding: 0 20px;">
|
||||
<p class=''><a class="btn btn-default text-danger" href="javascript:parent.location.href = 'index_interface2.php?outcome=1&endcase=endcase'"><?php echo T_("Not attempted or worked"); ?></a></p></ul>
|
||||
<ul class="panel-body" style="padding: 0 20px;"><b><?php echo T_("Not Contacted");?></b>
|
||||
<p class=''><a class="btn btn-default text-danger" href="javascript:parent.location.href = 'index_interface2.php?outcome=2&endcase=endcase'"><?php echo T_("No answer (ring out or busy) "); ?></a></p>
|
||||
<p class=''><a class="btn btn-default text-danger" href="javascript:parent.location.href = 'index_interface2.php?outcome=3&endcase=endcase'"><?php echo T_("Technical phone problems"); ?></a></p>
|
||||
<p class=''><a class="btn btn-default text-danger" href="javascript:parent.location.href = 'index_interface2.php?outcome=18&endcase=endcase'"><?php echo T_("Accidental hang up"); ?></a></p></ul>
|
||||
<ul class="panel-body" style="padding: 0 20px;"><b><?php echo T_("Contacted");?></b>
|
||||
<p class=''><a class="btn btn-default text-danger" href="javascript:parent.location.href = 'index_interface2.php?outcome=8&endcase=endcase'"><?php echo T_("Refusal by respondent"); ?></a></p>
|
||||
<p class=''><a class="btn btn-default text-danger" href="javascript:parent.location.href = 'index_interface2.php?outcome=6&endcase=endcase'"><?php echo T_("Refusal by unknown person"); ?></a></p>
|
||||
<p class=''><a class="btn btn-default text-danger" href="javascript:parent.location.href = 'index_interface2.php?outcome=17&endcase=endcase'" title = "<?php echo T_("No eligible respondent (person never available on this number)"); ?>" ><?php echo T_("No eligible respondent"); ?> * </a></p>
|
||||
<p class=''><a class="btn btn-default text-danger" href="javascript:parent.location.href = 'index_interface2.php?outcome=31&endcase=endcase'" title ="<?php echo T_("Non contact (person not currently available on this number: no appointment made)"); ?>" ><?php echo T_("Non contact"); ?> * </a></p>
|
||||
<p class=''><a class="btn btn-default text-danger" href="javascript:parent.location.href = 'index_interface2.php?outcome=30&endcase=endcase'"><?php echo T_("Out of sample (already completed in another mode)"); ?></a></p>
|
||||
<p class=''><a class="btn btn-default text-danger" href="rs_business_interface2.php"><?php echo T_("Business number"); ?></a></p>
|
||||
<p class=''><a class="btn btn-default text-danger" href="rs_answeringmachine_interface2.php"><?php echo T_("Answering machine"); ?></a></p></ul>
|
||||
</div>
|
||||
<?php
|
||||
//display introduction text
|
||||
$sql = "SELECT rs_intro,rs_project_intro,rs_callback
|
||||
FROM questionnaire
|
||||
WHERE questionnaire_id = '$questionnaire_id'";
|
||||
|
||||
$r = $db->GetRow($sql);
|
||||
print "</br><div class=\"col-sm-7 rs\">";
|
||||
print "<p class='rstext'>". template_replace($r['rs_intro'],$operator_id,$case_id) . "</p>";
|
||||
print "</div>";
|
||||
|
||||
// display continue
|
||||
print "<div class=\"col-sm-2 \" style=\"margin-top: 50px;\">";
|
||||
if (limesurvey_percent_complete($case_id) == false)
|
||||
{
|
||||
if(empty($r['rs_project_intro']))
|
||||
{
|
||||
//If nothing is specified as a project introduction, skip straight to questionnaire
|
||||
?>
|
||||
<p class=''><a class="btn btn-lg btn-primary col-sm-offset-1" href="<?php print(get_limesurvey_url($operator_id)); ?>"><?php echo T_("Yes - Continue"); ?></a></p>
|
||||
<?php
|
||||
}
|
||||
else
|
||||
{
|
||||
?>
|
||||
<p class=''><a class="btn btn-primary" href="rs_project_intro_interface2.php"><?php echo T_("Yes - Continue"); ?></a></p>
|
||||
<?php
|
||||
}
|
||||
} else {
|
||||
if(empty($r['rs_callback']))
|
||||
{
|
||||
//If nothing is specified as a callback screen, skip straight to questionnaire
|
||||
?>
|
||||
<p class=''><a class="btn btn-primary" href="<?php print(get_limesurvey_url($operator_id)); ?>"><?php echo T_("Yes - Continue"); ?></a></p>
|
||||
<?php
|
||||
}
|
||||
else
|
||||
{
|
||||
?>
|
||||
<p class=''><a class="btn btn-primary" href="rs_callback_interface2.php"><?php echo T_("Yes - Continue"); ?></a></p>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
print "</div>";
|
||||
|
||||
xhtml_foot();
|
||||
|
||||
|
||||
?>
|
||||
@@ -20,11 +20,11 @@
|
||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
*
|
||||
* @author Adam Zammit <adam.zammit@deakin.edu.au>
|
||||
* @copyright Deakin University 2007,2008
|
||||
* @author Adam Zammit <adam.zammit@acspri.org.au>
|
||||
* @copyright Australian Consortium for Social and Political Research Inc 2007,2008
|
||||
* @package queXS
|
||||
* @subpackage user
|
||||
* @link http://www.deakin.edu.au/dcarf/ queXS was writen for DCARF - Deakin Computer Assisted Research Facility
|
||||
* @link http://www.acspri.org.au/ queXS was writen for Australian Consortium for Social and Political Research Incorporated (ACSPRI)
|
||||
* @license http://opensource.org/licenses/gpl-2.0.php The GNU General Public License (GPL) Version 2
|
||||
*
|
||||
*/
|
||||
@@ -34,7 +34,6 @@
|
||||
*/
|
||||
include ("config.inc.php");
|
||||
|
||||
|
||||
/**
|
||||
* Database file
|
||||
*/
|
||||
@@ -58,23 +57,12 @@ include ("functions/functions.operator.php");
|
||||
|
||||
$operator_id = get_operator_id();
|
||||
|
||||
//check for alternate interface
|
||||
if (ALTERNATE_INTERFACE && !is_voip_enabled($operator_id))
|
||||
{
|
||||
include_once("rs_project_end_interface2.php");
|
||||
die();
|
||||
}
|
||||
|
||||
$js = array("js/popup.js","include/jquery/jquery-1.4.2.min.js","include/jquery-ui/jquery-ui.min.js");
|
||||
|
||||
if (AUTO_LOGOUT_MINUTES !== false)
|
||||
{
|
||||
$js[] = "js/childnap.js";
|
||||
}
|
||||
if (AUTO_LOGOUT_MINUTES !== false) $js[] = "js/childnap.js";
|
||||
|
||||
|
||||
|
||||
xhtml_head(T_("Respondent Selection - Project end"),true,array("css/rs.css","include/jquery-ui/jquery-ui.min.css"), $js);
|
||||
xhtml_head(T_("Respondent Selection") . " - " . T_("Project end"),true,array("include/bootstrap/css/bootstrap.min.css","css/rs.css"), $js);
|
||||
|
||||
$case_id = get_case_id($operator_id);
|
||||
$questionnaire_id = get_questionnaire_id($operator_id);
|
||||
@@ -86,19 +74,33 @@ $sql = "SELECT rs_project_end
|
||||
|
||||
$r = $db->GetRow($sql);
|
||||
|
||||
print "<p class='rstext'>" . template_replace($r['rs_project_end'],$operator_id,$case_id) . "</p>";
|
||||
if (!empty($r['rs_project_end'])) print "<p class='rstext well'>" . template_replace($r['rs_project_end'],$operator_id,$case_id) . "</p>";
|
||||
|
||||
print "<p class='well'>";
|
||||
|
||||
if (!is_voip_enabled($operator_id) && AUTO_COMPLETE_OUTCOME)
|
||||
{
|
||||
end_call($operator_id,10);
|
||||
print "<p class='rsoption'>" . T_("Call automatically ended with outcome: Complete") . "</p>";
|
||||
|
||||
print T_("Call automatically ended with outcome:") . " <b>" . T_("Complete") . "</b>";
|
||||
//check for alternate interface
|
||||
if (ALTERNATE_INTERFACE && !is_voip_enabled($operator_id))
|
||||
print " <a href=\"javascript:parent.location.href = 'index_interface2.php?endcase=endcase'\" class='btn btn-primary'>" . T_("End case") . "</a>";
|
||||
}
|
||||
else
|
||||
{
|
||||
?>
|
||||
<p class='rsoption'><a href="javascript:parent.poptastic('call.php?defaultoutcome=10');"><?php echo T_("End call with outcome: Complete"); ?></a></p>
|
||||
<?php
|
||||
{
|
||||
print T_("End call with outcome:") . " <a class='btn btn-primary' ";
|
||||
//check for alternate interface
|
||||
if (ALTERNATE_INTERFACE && !is_voip_enabled($operator_id))
|
||||
print "href=\"javascript:parent.location.href = 'index_interface2.php?outcome=10&endcase=endcase'\">";
|
||||
else
|
||||
print "href=\"javascript:parent.poptastic('call.php?defaultoutcome=10');\">";
|
||||
|
||||
print T_("Complete") . "</a>";
|
||||
}
|
||||
|
||||
print "</p>";
|
||||
|
||||
xhtml_foot();
|
||||
|
||||
?>
|
||||
|
||||
@@ -1,96 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* Respondent selection - Project End
|
||||
*
|
||||
*
|
||||
* This file is part of queXS
|
||||
*
|
||||
* queXS is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* queXS is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with queXS; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
*
|
||||
* @author Adam Zammit <adam.zammit@acspri.org.au>
|
||||
* @copyright Australian Consortium for Social and Political Research Inc 2007,2008
|
||||
* @package queXS
|
||||
* @subpackage user
|
||||
* @link http://www.acspri.org.au/ queXS was writen for Australian Consortium for Social and Political Research Incorporated (ACSPRI)
|
||||
* @license http://opensource.org/licenses/gpl-2.0.php The GNU General Public License (GPL) Version 2
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* Configuration file
|
||||
*/
|
||||
include_once ("config.inc.php");
|
||||
|
||||
/**
|
||||
* Database file
|
||||
*/
|
||||
include_once ("db.inc.php");
|
||||
|
||||
/**
|
||||
* Authentication
|
||||
*/
|
||||
require ("auth-interviewer.php");
|
||||
|
||||
|
||||
/**
|
||||
* XHTML functions
|
||||
*/
|
||||
include_once ("functions/functions.xhtml.php");
|
||||
|
||||
/**
|
||||
* Operator functions
|
||||
*/
|
||||
include_once ("functions/functions.operator.php");
|
||||
|
||||
|
||||
$js = array("js/popup.js","include/jquery/jquery-1.4.2.min.js","include/jquery-ui/jquery-ui.min.js");
|
||||
|
||||
if (AUTO_LOGOUT_MINUTES !== false)
|
||||
{
|
||||
$js[] = "js/childnap.js";
|
||||
}
|
||||
|
||||
|
||||
|
||||
xhtml_head(T_("Respondent Selection - Project end"),true,array("css/rs.css","include/jquery-ui/jquery-ui.min.css"), $js);
|
||||
|
||||
$operator_id = get_operator_id();
|
||||
$case_id = get_case_id($operator_id);
|
||||
$questionnaire_id = get_questionnaire_id($operator_id);
|
||||
|
||||
//display introduction text
|
||||
$sql = "SELECT rs_project_end
|
||||
FROM questionnaire
|
||||
WHERE questionnaire_id = '$questionnaire_id'";
|
||||
|
||||
$r = $db->GetRow($sql);
|
||||
|
||||
print "<p class='rstext'>" . template_replace($r['rs_project_end'],$operator_id,$case_id) . "</p>";
|
||||
|
||||
if (!is_voip_enabled($operator_id) && AUTO_COMPLETE_OUTCOME)
|
||||
{
|
||||
end_call($operator_id,10);
|
||||
print "<p class='rsoption'><a href=\"javascript:parent.location.href = 'index_interface2.php?endcase=endcase'\">" . T_("Call automatically ended with outcome: Complete - End case") . "</a></p>";
|
||||
}
|
||||
else
|
||||
{
|
||||
?>
|
||||
<p class='rsoption'><a href="javascript:parent.location.href = 'index_interface2.php?outcome=10&endcase=endcase'"><?php echo T_("End call with outcome: Complete"); ?></a></p>
|
||||
<?php
|
||||
}
|
||||
xhtml_foot();
|
||||
|
||||
?>
|
||||
@@ -20,11 +20,11 @@
|
||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
*
|
||||
* @author Adam Zammit <adam.zammit@deakin.edu.au>
|
||||
* @copyright Deakin University 2007,2008
|
||||
* @author Adam Zammit <adam.zammit@acspri.org.au>
|
||||
* @copyright Australian Consortium for Social and Political Research Inc 2007,2008
|
||||
* @package queXS
|
||||
* @subpackage user
|
||||
* @link http://www.deakin.edu.au/dcarf/ queXS was writen for DCARF - Deakin Computer Assisted Research Facility
|
||||
* @link http://www.acspri.org.au/ queXS was writen for Australian Consortium for Social and Political Research Incorporated (ACSPRI)
|
||||
* @license http://opensource.org/licenses/gpl-2.0.php The GNU General Public License (GPL) Version 2
|
||||
*
|
||||
*/
|
||||
@@ -57,12 +57,10 @@ include ("functions/functions.operator.php");
|
||||
|
||||
$js = array("js/popup.js","include/jquery/jquery-1.4.2.min.js","include/jquery-ui/jquery-ui.min.js");
|
||||
|
||||
if (AUTO_LOGOUT_MINUTES !== false)
|
||||
{
|
||||
$js[] = "js/childnap.js";
|
||||
}
|
||||
if (AUTO_LOGOUT_MINUTES !== false) $js[] = "js/childnap.js";
|
||||
|
||||
xhtml_head(T_("Respondent Selection - Project Introduction"),true,array("css/rs.css","include/jquery-ui/jquery-ui.min.css"), $js);
|
||||
|
||||
xhtml_head(T_("Respondent Selection") . " - " . T_("Project Introduction"),true,array("include/bootstrap/css/bootstrap.min.css","css/rs.css"), $js); //,"include/jquery-ui/jquery-ui.min.css"
|
||||
|
||||
$operator_id = get_operator_id();
|
||||
$case_id = get_case_id($operator_id);
|
||||
@@ -75,24 +73,48 @@ $sql = "SELECT rs_project_intro
|
||||
|
||||
$r = $db->GetRow($sql);
|
||||
|
||||
print "<p class='rstext'>" . template_replace($r['rs_project_intro'],$operator_id,$case_id) . "</p>";
|
||||
if (!empty($r['rs_project_intro'])) print "<div class='rstext well rs'>" . template_replace($r['rs_project_intro'],$operator_id,$case_id) . "</div>";
|
||||
|
||||
print "<div class=' '>
|
||||
<div class='col-lg-2'><p><a class='btn btn-default' href=\"rs_intro.php\" >" . T_("Go Back") . "</a></p></div>";
|
||||
|
||||
if ($questionnaire_id){
|
||||
//filter displayed outcomes
|
||||
$outcomes = $db->GetOne("SELECT q.outcomes FROM `questionnaire` as q WHERE q.questionnaire_id = $questionnaire_id");//
|
||||
$outcomes = explode(",",$outcomes);
|
||||
|
||||
$des = $db->GetAll("SELECT description FROM outcome WHERE outcome_id IN (8,17,30)");
|
||||
translate_array($des,array("description"));
|
||||
|
||||
print "<div class='col-lg-6'>
|
||||
<p><h4 class=''>" . T_("End call with outcome:") . "</h4></p>";
|
||||
|
||||
if (in_array(8,$outcomes)){
|
||||
print "<p><a class='btn btn-primary' ";
|
||||
if ( ALTERNATE_INTERFACE ) print "href=\"javascript:parent.location.href = 'index_interface2.php?outcome=8&endcase=endcase'\">";
|
||||
else print "href=\"javascript:parent.poptastic('call.php?defaultoutcome=29');\">";
|
||||
print $des[0]['description'] . "</a></p>";
|
||||
}
|
||||
|
||||
//display outcomes
|
||||
if (in_array(17,$outcomes)){
|
||||
print "<p><a class='btn btn-primary' ";
|
||||
if ( ALTERNATE_INTERFACE ) print "href=\"javascript:parent.location.href = 'index_interface2.php?outcome=17&endcase=endcase'\">";
|
||||
else print "href=\"javascript:parent.poptastic('call.php?defaultoutcome=23');\">";
|
||||
print $des[1]['description'] . "</a></p>";
|
||||
}
|
||||
|
||||
?>
|
||||
if (in_array(30,$outcomes)){
|
||||
print "<p><a class='btn btn-primary' ";
|
||||
if ( ALTERNATE_INTERFACE ) print "href=\"javascript:parent.location.href = 'index_interface2.php?outcome=30&endcase=endcase'\">";
|
||||
else print "href=\"javascript:parent.poptastic('call.php?defaultoutcome=24');\">";
|
||||
print $des[2]['description'] . "</a></p>";
|
||||
}
|
||||
print "</div>";
|
||||
}
|
||||
print "<div class='col-lg-4'><p><a class=\"btn btn-lg btn-primary\" href=\"" . (get_limesurvey_url($operator_id)) . "\">" . T_("Yes - Continue") . "</a></p></div>";
|
||||
print "</div>";
|
||||
|
||||
<p class='rsoption'><a href="<?php print(get_limesurvey_url($operator_id)); ?>"><?php echo T_("Yes - Continue"); ?></a></p>
|
||||
|
||||
<p class='rsoption'><a href="javascript:parent.poptastic('call.php?defaultoutcome=8');"><?php echo T_("End call with outcome: Refusal by respondent"); ?></a></p>
|
||||
<p class='rsoption'><a href="javascript:parent.poptastic('call.php?defaultoutcome=17');"><?php echo T_("End call with outcome: No eligible respondent (person not available on this number)"); ?></a></p>
|
||||
<p class='rsoption'><a href="javascript:parent.poptastic('call.php?defaultoutcome=30');"><?php echo T_("End call with outcome: Out of sample (already completed in another mode)"); ?></a></p>
|
||||
|
||||
<p class='rsoption'><a href="rs_intro.php"><?php echo T_("Go Back"); ?></a></p>
|
||||
|
||||
<?php
|
||||
|
||||
xhtml_foot();
|
||||
|
||||
|
||||
?>
|
||||
|
||||
@@ -1,98 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* Respondent selection - Project Introduction
|
||||
*
|
||||
*
|
||||
* This file is part of queXS
|
||||
*
|
||||
* queXS is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* queXS is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with queXS; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
*
|
||||
* @author Adam Zammit <adam.zammit@acspri.org.au>
|
||||
* @copyright Australian Consortium for Social and Political Research Inc 2007,2008
|
||||
* @package queXS
|
||||
* @subpackage user
|
||||
* @link http://www.acspri.org.au/ queXS was writen for Australian Consortium for Social and Political Research Incorporated (ACSPRI)
|
||||
* @license http://opensource.org/licenses/gpl-2.0.php The GNU General Public License (GPL) Version 2
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* Configuration file
|
||||
*/
|
||||
include ("config.inc.php");
|
||||
|
||||
/**
|
||||
* Database file
|
||||
*/
|
||||
include ("db.inc.php");
|
||||
|
||||
/**
|
||||
* Authentication
|
||||
*/
|
||||
require ("auth-interviewer.php");
|
||||
|
||||
|
||||
/**
|
||||
* XHTML functions
|
||||
*/
|
||||
include ("functions/functions.xhtml.php");
|
||||
|
||||
/**
|
||||
* Operator functions
|
||||
*/
|
||||
include ("functions/functions.operator.php");
|
||||
|
||||
$js = array("js/popup.js","include/jquery/jquery-1.4.2.min.js","include/jquery-ui/jquery-ui.min.js");
|
||||
|
||||
if (AUTO_LOGOUT_MINUTES !== false)
|
||||
{
|
||||
$js[] = "js/childnap.js";
|
||||
}
|
||||
|
||||
xhtml_head(T_("Respondent Selection - Project Introduction"),true,array("css/rs.css","include/jquery-ui/jquery-ui.min.css"), $js);
|
||||
|
||||
$operator_id = get_operator_id();
|
||||
$case_id = get_case_id($operator_id);
|
||||
$questionnaire_id = get_questionnaire_id($operator_id);
|
||||
|
||||
//display introduction text
|
||||
$sql = "SELECT rs_project_intro
|
||||
FROM questionnaire
|
||||
WHERE questionnaire_id = '$questionnaire_id'";
|
||||
|
||||
$r = $db->GetRow($sql);
|
||||
|
||||
print "<p class='rstext'>" . template_replace($r['rs_project_intro'],$operator_id,$case_id) . "</p>";
|
||||
|
||||
|
||||
//display outcomes
|
||||
|
||||
?>
|
||||
|
||||
<p class='rsoption'><a href="<?php print(get_limesurvey_url($operator_id)); ?>"><?php echo T_("Yes - Continue"); ?></a></p>
|
||||
|
||||
<p class='rsoption'><a href="javascript:parent.location.href = 'index_interface2.php?outcome=8&endcase=endcase'"><?php echo T_("End call with outcome: Refusal by respondent"); ?></a></p>
|
||||
<p class='rsoption'><a href="javascript:parent.location.href = 'index_interface2.php?outcome=17&endcase=endcase'"><?php echo T_("End call with outcome: No eligible respondent (person not available on this number)"); ?></a></p>
|
||||
<p class='rsoption'><a href="javascript:parent.location.href = 'index_interface2.php?outcome=30&endcase=endcase'"><?php echo T_("End call with outcome: Out of sample (already completed in another mode)"); ?></a></p>
|
||||
|
||||
<p class='rsoption'><a href="rs_intro_interface2.php"><?php echo T_("Go Back"); ?></a></p>
|
||||
|
||||
<?php
|
||||
|
||||
xhtml_foot();
|
||||
|
||||
|
||||
?>
|
||||
@@ -57,33 +57,28 @@ include ("functions/functions.operator.php");
|
||||
|
||||
$js = array("js/popup.js","include/jquery/jquery-1.4.2.min.js","include/jquery-ui/jquery-ui.min.js");
|
||||
|
||||
if (AUTO_LOGOUT_MINUTES !== false)
|
||||
{
|
||||
$js[] = "js/childnap.js";
|
||||
}
|
||||
if (AUTO_LOGOUT_MINUTES !== false) $js[] = "js/childnap.js";
|
||||
|
||||
|
||||
|
||||
xhtml_head(T_("Respondent Selection - Project Quota End"),true,array("css/rs.css","include/jquery-ui/jquery-ui.min.css"), $js);
|
||||
xhtml_head(T_("Respondent Selection") . " - " . T_("Project Quota End"),true,array("include/bootstrap/css/bootstrap.min.css","css/rs.css"), $js);
|
||||
|
||||
$operator_id = get_operator_id();
|
||||
$case_id = get_case_id($operator_id);
|
||||
$questionnaire_id = get_questionnaire_id($operator_id);
|
||||
|
||||
print "<p class='rstext'>" . template_replace($_GET['message'],$operator_id,$case_id) . "</p>";
|
||||
if (isset($_GET['message'])) print "<p class='rstext well'>" . template_replace($_GET['message'],$operator_id,$case_id) . "</p>";
|
||||
|
||||
$des = $db->GetOne("SELECT description FROM outcome WHERE outcome_id = 32");
|
||||
|
||||
print "<p class=' '><h4 class=''>" . T_("End call with outcome:") . "<a class='btn btn-primary' "
|
||||
if (ALTERNATE_INTERFACE && !is_voip_enabled($operator_id))
|
||||
{
|
||||
?>
|
||||
<p class='rsoption'><a href="javascript:parent.location.href = 'index_interface2.php?outcome=32&endcase=endcase'"><?php echo T_("End call with outcome: Quota filled"); ?></a></p>
|
||||
<?php
|
||||
}
|
||||
print "href=\"javascript:parent.location.href = 'index_interface2.php?outcome=32&endcase=endcase'\">";
|
||||
else
|
||||
{
|
||||
?>
|
||||
<p class='rsoption'><a href="javascript:parent.poptastic('call.php?defaultoutcome=32');"><?php echo T_("End call with outcome: Quota filled"); ?></a></p>
|
||||
<?php
|
||||
}
|
||||
print "href=\"javascript:parent.poptastic('call.php?defaultoutcome=32');\">";
|
||||
|
||||
print T_($des[0]['description']) . "</a></p>";
|
||||
|
||||
|
||||
xhtml_foot();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user