2
0
mirror of https://github.com/ACSPRI/queXS synced 2024-04-02 12:12:16 +00:00

filter outcomes on rs panels;

1st  iteration: merge rs_ x_interface2 files to  rs_  files, removed merged _intreface2 files
This commit is contained in:
Alex
2015-12-06 03:00:49 +03:00
parent 47340844ea
commit 273fb168b6
11 changed files with 191 additions and 587 deletions

View File

@@ -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,52 @@ 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 "<p class='rstext well'>" . 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>";
print "<p class='rstext alert alert-warning'>" . T_("Do not leave a message, please hang up") . "</p>";
?>
<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
print "<div class=' '>
<div class='col-lg-2'><p class=''><a class='btn btn-default'";
//to remove after rs_intro and rs_intro_interface2 merging //
if ( ALTERNATE_INTERFACE ) print "href=\"rs_intro_interface2.php\""; else print "href=\"rs_intro.php\"";
print ">" . 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)){ //preg_match('/29/',$outcomes)
print "<p class=''><a class='btn btn-primary' ";
if ( ALTERNATE_INTERFACE ) print "href=\"javascript:parent.location.href = 'index_interface2.php?outcome=29&amp;endcase=endcase'\">";
else print "href=\"javascript:parent.poptastic('call.php?defaultoutcome=29');\">";
print $des[2]['description'] . "</a></p>";
}
?>
<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
if (in_array(23,$outcomes) && $leavemessage){ //preg_match('/23/',$outcomes
print "<p class=''><a class='btn btn-primary' ";
if ( ALTERNATE_INTERFACE ) print "href=\"javascript:parent.location.href = 'index_interface2.php?outcome=23&amp;endcase=endcase'\">";
else print "href=\"javascript:parent.poptastic('call.php?defaultoutcome=23');\">";
print $des[0]['description'] . "</a></p>";
}
if (in_array(24,$outcomes)){ //preg_match('/24/',$outcomes
print "<p class=''><a class='btn btn-primary' ";
if ( ALTERNATE_INTERFACE ) print "href=\"javascript:parent.location.href = 'index_interface2.php?outcome=24&amp;endcase=endcase'\">";
else print "href=\"javascript:parent.poptastic('call.php?defaultoutcome=24');\">";
print $des[1]['description'] . "</a></p>";
}
print "</div>";
}
print "</div>";
xhtml_foot();

View File

@@ -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();
?>

View File

@@ -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
*
*/
@@ -48,25 +48,34 @@ include ("functions/functions.xhtml.php");
/**
* Language
*/
include ("lang.inc.php");
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);
?>
<p class='rstext'><?php echo T_("Sorry to bother you, I have called the wrong number")?></p>
print "<p class='rstext well '>" . T_("Sorry to bother you, I have called the wrong number") . "</p>";
print "<div class=' '>
<div class='col-lg-2'><p class=''><a class='btn btn-default'";
//to remove after rs_intro and rs_intro_interface2 merging //
if ( ALTERNATE_INTERFACE ) print "href=\"rs_intro_interface2.php\""; else print "href=\"rs_intro.php\"";
print ">" . T_("Go Back") . "</a></p></div>";
$des = $db->GetAll("SELECT description FROM outcome WHERE outcome_id = 16");
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'><p class=''><a class='btn btn-primary' ";
if ( ALTERNATE_INTERFACE ) print "href=\"javascript:parent.location.href = 'index_interface2.php?outcome=16&amp;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();

View File

@@ -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 ("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();
?>

View File

@@ -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,40 @@ $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 "<p class='well'>" . template_replace($r['rs_callback'],$operator_id,$case_id) . "</p>";
print "<p class='rstext alert alert-info'>" . T_("Survey is") . "&emsp;" . round(limesurvey_percent_complete($case_id),1) . "&ensp;%&emsp;" . T_("complete") . "</p>";
//display outcomes
print "<div class=' '>
<div class='col-lg-2'><p class=''><a class='btn btn-default'";
?>
//to remove after rs_intro and rs_intro_interface2 merging //
if ( ALTERNATE_INTERFACE ) print "href=\"rs_intro_interface2.php\""; else print "href=\"rs_intro.php\"";
print ">" . 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 class=''><a class='btn btn-primary' ";
if ( ALTERNATE_INTERFACE ) print "href=\"javascript:parent.location.href = 'index_interface2.php?outcome=8&amp;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 class=''><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();
?>

View File

@@ -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();
?>

View File

@@ -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:") . "&ensp;<b>" . T_("Complete") . "</b>";
//check for alternate interface
if (ALTERNATE_INTERFACE && !is_voip_enabled($operator_id))
print "&emsp;<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:") . "&emsp;<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&amp;endcase=endcase'\">";
else
print "href=\"javascript:parent.poptastic('call.php?defaultoutcome=10');\">";
print T_("Complete") . "</a>";
}
print "</p>";
xhtml_foot();
?>

View File

@@ -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();
?>

View File

@@ -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,53 @@ $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 "<p class='rstext well'>" . template_replace($r['rs_project_intro'],$operator_id,$case_id) . "</p>";
print "<div class=' '>
<div class='col-lg-2'><p class=''><a class='btn btn-default'";
//display outcomes
//to remove after rs_intro and rs_intro_interface2 merging //
if ( ALTERNATE_INTERFACE ) print "href=\"rs_intro_interface2.php\""; else print "href=\"rs_intro.php\"";
?>
print ">" . T_("Go Back") . "</a></p></div>";
<p class='rsoption'><a href="<?php print(get_limesurvey_url($operator_id)); ?>"><?php echo T_("Yes - Continue"); ?></a></p>
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);
<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>
$des = $db->GetAll("SELECT description FROM outcome WHERE outcome_id IN (8,17,30)");
translate_array($des,array("description"));
<p class='rsoption'><a href="rs_intro.php"><?php echo T_("Go Back"); ?></a></p>
print "<div class='col-lg-6'>
<p class=''><h4 class=''>" . T_("End call with outcome:") . "</h4></p>";
if (in_array(8,$outcomes)){
print "<p class=''><a class='btn btn-primary' ";
if ( ALTERNATE_INTERFACE ) print "href=\"javascript:parent.location.href = 'index_interface2.php?outcome=8&amp;endcase=endcase'\">";
else print "href=\"javascript:parent.poptastic('call.php?defaultoutcome=29');\">";
print $des[0]['description'] . "</a></p>";
}
if (in_array(17,$outcomes)){
print "<p class=''><a class='btn btn-primary' ";
if ( ALTERNATE_INTERFACE ) print "href=\"javascript:parent.location.href = 'index_interface2.php?outcome=17&amp;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 class=''><a class='btn btn-primary' ";
if ( ALTERNATE_INTERFACE ) print "href=\"javascript:parent.location.href = 'index_interface2.php?outcome=30&amp;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 class=''><a class=\"btn btn-lg btn-primary\" href=\"" . (get_limesurvey_url($operator_id)) . "\">" . T_("Yes - Continue") . "</a></p></div>";
print "</div>";
<?php
xhtml_foot();
?>

View File

@@ -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();
?>

View File

@@ -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();