";
- if (in_array(29,$outcomes)){ //preg_match('/29/',$outcomes)
- print "
";
else print "href=\"javascript:parent.poptastic('call.php?defaultoutcome=29');\">";
print $des[2]['description'] . "
";
}
- if (in_array(23,$outcomes) && $leavemessage){ //preg_match('/23/',$outcomes
- print "
";
else print "href=\"javascript:parent.poptastic('call.php?defaultoutcome=23');\">";
print $des[0]['description'] . "
";
}
- if (in_array(24,$outcomes)){ //preg_match('/24/',$outcomes
- print "
";
else print "href=\"javascript:parent.poptastic('call.php?defaultoutcome=24');\">";
print $des[1]['description'] . "
";
diff --git a/rs_business.php b/rs_business.php
index e859cfcc..cfe5831d 100644
--- a/rs_business.php
+++ b/rs_business.php
@@ -57,19 +57,14 @@ if (AUTO_LOGOUT_MINUTES !== false) $js[] = "js/childnap.js";
xhtml_head(T_("Respondent Selection") . " - " . T_("Business answers"),true,array("include/bootstrap/css/bootstrap.min.css","css/rs.css"), $js);
-
-print "
" . T_("Sorry to bother you, I have called the wrong number") . "
";
+print "
" . T_("Sorry to bother you, I have called the wrong number") . "
";
print "
-
";
+
";
$des = $db->GetAll("SELECT description FROM outcome WHERE outcome_id = 16");
- print "
" . T_("End call with outcome:") . "
-
+
";
diff --git a/rs_callback.php b/rs_callback.php
index 0db79427..4c796d08 100644
--- a/rs_callback.php
+++ b/rs_callback.php
@@ -77,16 +77,12 @@ $sql = "SELECT rs_callback
WHERE questionnaire_id = '$questionnaire_id'";
$r = $db->GetRow($sql);
-if (!empty($r['rs_callback'])) print "
" . template_replace($r['rs_callback'],$operator_id,$case_id) . "
";
+if (!empty($r['rs_callback'])) print "
" . template_replace($r['rs_callback'],$operator_id,$case_id) . "
";
print "
" . T_("Survey is") . " " . round(limesurvey_percent_complete($case_id),1) . " % " . T_("complete") . "
";
print "
-
";
+
";
//filter displayed outcomes
if ($questionnaire_id){
@@ -96,7 +92,7 @@ print "
if (in_array(8,$outcomes)){
$des = $db->GetAll("SELECT description FROM outcome WHERE outcome_id = 8");
print "
";
@@ -104,7 +100,7 @@ print "
";
print "
";
diff --git a/rs_intro.php b/rs_intro.php
index c74c68f8..e2179dd8 100644
--- a/rs_intro.php
+++ b/rs_intro.php
@@ -20,11 +20,11 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*
*
- * @author Adam Zammit
- * @copyright Deakin University 2007,2008
+ * @author Adam Zammit
+ * @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 "". template_replace($r['rs_intro'],$operator_id,$case_id) . "
";
+ //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 "
+
" . T_("End call with outcome:") . "
";
+ print "
" . T_("Not Contacted") . "
+
";
+
+ print "
" . T_("Contacted") . "
+
";
+ if (in_array(8,$outcomes)){
+ print "
";
+ else print "href=\"javascript:parent.poptastic('call.php?defaultoutcome=8');\">";
+ print $des[4]['description'] . "
"; }
+ if (in_array(6,$outcomes)){
+ print "
";
+ else print "href=\"javascript:parent.poptastic('call.php?defaultoutcome=6');\">";
+ print $des[3]['description'] . "
"; }
+ if (in_array(17,$outcomes)){
+ print "
";
+ else print "href=\"javascript:parent.poptastic('call.php?defaultoutcome=17');\">";
+ print $des[6]['description'] . " *
"; }
+ if (in_array(18,$outcomes)){
+ print "
";
+ else print "href=\"javascript:parent.poptastic('call.php?defaultoutcome=18');\">";
+ print $des[7]['description'] . "
"; }
+ if (in_array(31,$outcomes)){
+ print "
";
+ else print "href=\"javascript:parent.poptastic('call.php?defaultoutcome=31');\">";
+ print $des[9]['description'] . " *
"; }
+ if (in_array(30,$outcomes)){
+ print "
";
+ else print "href=\"javascript:parent.poptastic('call.php?defaultoutcome=30');\">";
+ print $des[8]['description'] . "
"; }
+ if (in_array(16,$outcomes))
+ print "
" . $des[5]['description'] . "
";
+ if (in_array(23,$outcomes) || in_array(24,$outcomes) || in_array(29,$outcomes))
+ print "
" . T_("Answering machine") . "
";
+ print "
";
+ print "
";
+
+ print "" . T_("Respondent Selection") . " - " . T_("Introduction") . "
";
+ //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 "
" . template_replace($r['rs_intro'],$operator_id,$case_id) . "
";
+ print "
";
+
+ // display continue
+ print "";
-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
- ?>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- * @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
-?>
-
-GetRow($sql);
-print "";
-print "
". template_replace($r['rs_intro'],$operator_id,$case_id) . "
";
-print "
";
-
-// display continue
-print "";
-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
- ?>
-
-
-
-
-
-
-
- ";
-
-xhtml_foot();
-
-
-?>
diff --git a/rs_project_intro.php b/rs_project_intro.php
index 7a2704eb..2d70c166 100644
--- a/rs_project_intro.php
+++ b/rs_project_intro.php
@@ -73,15 +73,10 @@ $sql = "SELECT rs_project_intro
$r = $db->GetRow($sql);
-if (!empty($r['rs_project_intro'])) print "
" . template_replace($r['rs_project_intro'],$operator_id,$case_id) . "
";
+if (!empty($r['rs_project_intro'])) print "
" . template_replace($r['rs_project_intro'],$operator_id,$case_id) . "
";
print "
-
";
+
";
if ($questionnaire_id){
//filter displayed outcomes
@@ -92,31 +87,31 @@ print "
translate_array($des,array("description"));
print "
";
}
- print "
";
+ print "
";
print "
";