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
*
*/
@@ -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'";
//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){
//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 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>";
}
//display outcomes
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>";
<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();
?>