From 98f246dd03276731e65c2257902eaecb6bdbb066 Mon Sep 17 00:00:00 2001 From: root Date: Wed, 11 Sep 2013 15:02:59 +1000 Subject: [PATCH] Added referral function (requires addition to database) --- CHANGELOG | 6 + admin/new.php | 7 +- admin/questionnairelist.php | 8 +- index.php | 7 +- index_interface2.php | 7 +- referral.php | 253 ++++++++++++++++++++++++++++++++++++ 6 files changed, 280 insertions(+), 8 deletions(-) create mode 100644 referral.php diff --git a/CHANGELOG b/CHANGELOG index 2efea6b0..08c85f58 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,9 @@ +New Feature: Accept case referrals + +Database updates: + +ALTER TABLE `questionnaire` ADD `referral` TINYINT( 1 ) NOT NULL DEFAULT '0' AFTER `self_complete` + queXS 1.9.0 - Changes since 1.8.0 New Feature: Supervisor chat via XMPP/Jabber (allow interviewers to chat with a supervisor from the interviewer screen) diff --git a/admin/new.php b/admin/new.php index c6575d36..06185066 100644 --- a/admin/new.php +++ b/admin/new.php @@ -66,6 +66,7 @@ if (isset($_POST['import_file'])) $ras =0; $rws = 0; $testing = 0; + $referral = 0; $rs = 0; $lime_sid = 0; $respsc = 0; @@ -74,6 +75,7 @@ if (isset($_POST['import_file'])) if (isset($_POST['rws'])) $rws = 1; if (isset($_POST['testing'])) $testing = 1; if (isset($_POST['respsc'])) $respsc = 1; + if (isset($_POST['referral'])) $respsc = 1; if ($_POST['selectrs'] != "none") $rs = 1; $name = $db->qstr($_POST['description'],get_magic_quotes_gpc()); @@ -93,8 +95,8 @@ if (isset($_POST['import_file'])) $lime_rs_sid = bigintval($_POST['selectrs']); } - $sql = "INSERT INTO questionnaire (questionnaire_id,description,lime_sid,restrict_appointments_shifts,restrict_work_shifts,respondent_selection,rs_intro,rs_project_intro,rs_project_end,rs_callback,rs_answeringmachine,testing,lime_rs_sid,info,self_complete) - VALUES (NULL,$name,'$lime_sid','$ras','$rws','$rs',$rs_intro,$rs_project_intro,$rs_project_end,$rs_callback,$rs_answeringmachine,'$testing',$lime_rs_sid,$info,$respsc)"; + $sql = "INSERT INTO questionnaire (questionnaire_id,description,lime_sid,restrict_appointments_shifts,restrict_work_shifts,respondent_selection,rs_intro,rs_project_intro,rs_project_end,rs_callback,rs_answeringmachine,testing,lime_rs_sid,info,self_complete,referral) + VALUES (NULL,$name,'$lime_sid','$ras','$rws','$rs',$rs_intro,$rs_project_intro,$rs_project_end,$rs_callback,$rs_answeringmachine,'$testing',$lime_rs_sid,$info,$respsc,$referral)"; $rs = $db->Execute($sql); @@ -193,6 +195,7 @@ $ckeditorConfig = array("toolbar" => array(array("tokens","-","Source"),

+