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

Jump to questionnaire where no rs_project_intro or rs_callback defined

Automatically assign case as complete when questionnaire is complete, and AUTO_COMPLETE_OUTCOME is set to true
This commit is contained in:
azammitdcarf
2011-01-18 23:44:22 +00:00
parent 44453fe28f
commit 47410627e9
2 changed files with 38 additions and 11 deletions

View File

@@ -65,7 +65,7 @@ $case_id = get_case_id($operator_id);
$questionnaire_id = get_questionnaire_id($operator_id);
//display introduction text
$sql = "SELECT rs_intro
$sql = "SELECT rs_intro,rs_project_intro,rs_callback
FROM questionnaire
WHERE questionnaire_id = '$questionnaire_id'";
@@ -78,13 +78,33 @@ print "<p class='rstext'>". template_replace($r['rs_intro'],$operator_id,$case_i
if (limesurvey_percent_complete($case_id) == false)
{
?>
<p class='rsoption'><a href="rs_project_intro.php"><? echo T_("Yes - Continue"); ?></a></p>
<?
if(empty($r['rs_project_intro']))
{
//If nothing is specified as a project introduction, skip straight to questionnaire
?>
<p class='rsoption'><a href="<? print(get_limesurvey_url($operator_id)); ?>"><? echo T_("Yes - Continue"); ?></a></p>
<?
}
else
{
?>
<p class='rsoption'><a href="rs_project_intro.php"><? echo T_("Yes - Continue"); ?></a></p>
<?
}
} else {
?>
<p class='rsoption'><a href="rs_callback.php"><? echo T_("Yes - Continue"); ?></a></p>
<?
if(empty($r['rs_callback']))
{
//If nothing is specified as a callback screen, skip straight to questionnaire
?>
<p class='rsoption'><a href="<? print(get_limesurvey_url($operator_id)); ?>"><? echo T_("Yes - Continue"); ?></a></p>
<?
}
else
{
?>
<p class='rsoption'><a href="rs_callback.php"><? echo T_("Yes - Continue"); ?></a></p>
<?
}
}
?>
<p class='rsoption'><a href="rs_business.php"><? echo T_("Business number"); ?></a></p>

View File

@@ -65,10 +65,17 @@ $r = $db->GetRow($sql);
print "<p class='rstext'>" . template_replace($r['rs_project_end'],$operator_id,$case_id) . "</p>";
?>
<p class='rsoption'><a href="javascript:parent.poptastic('call.php?defaultoutcome=10');"><? echo T_("End call with outcome: Complete"); ?></a></p>
<?
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>";
}
else
{
?>
<p class='rsoption'><a href="javascript:parent.poptastic('call.php?defaultoutcome=10');"><? echo T_("End call with outcome: Complete"); ?></a></p>
<?
}
xhtml_foot();
?>