diff --git a/CHANGELOG b/CHANGELOG index bce65ec0..44940fce 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,7 @@ +ALTER TABLE `questionnaire` ADD `remote_id` INT NOT NULL , +ADD INDEX ( `remote_id` ) ; + + queXS 1.14.4 - Changes since 1.14.3 Fourth bug fix release. diff --git a/admin/new.php b/admin/new.php index fa778177..802ded3e 100644 --- a/admin/new.php +++ b/admin/new.php @@ -26,6 +26,11 @@ include ("../functions/functions.xhtml.php"); */ include("../functions/functions.input.php"); +/** + * Limesurvey functions + */ +include("../functions/functions.limesurvey.php"); + $css = array( "../include/bootstrap/css/bootstrap.min.css", "../include/bootstrap/css/bootstrap-theme.min.css", @@ -72,14 +77,10 @@ if (isset($_POST['import_file'])) $rs_answeringmachine = $db->qstr(html_entity_decode($_POST['rs_answeringmachine'],ENT_QUOTES,'UTF-8')); $info = $db->qstr(html_entity_decode($_POST['info'],ENT_QUOTES,'UTF-8')); - //use existing lime instrument - $lime_sid = bigintval($_POST['select']); - - - if (is_numeric($_POST['selectrs'])) - { - $lime_rs_sid = bigintval($_POST['selectrs']); - } + //use existing lime instrument + $tmp = explode(';',$_POST['select']); + $lime_sid = bigintval($tmp[0]); + $remote = intval($tmp[1]); //** get default coma-separated outcomes list and use it for new questionnaire as initial set $sql = "SELECT o.outcome_id @@ -97,26 +98,14 @@ if (isset($_POST['import_file'])) //** - end - $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,outcomes) - 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,'$do')"; + $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,outcomes,remote_id) + 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,'$do','$remote')"; $rs = $db->Execute($sql); if ($rs) { $qid = $db->Insert_ID(); - if ($respsc == 1) - { - $lime_mode = $db->qstr($_POST['lime_mode']); - $lime_template = $db->qstr($_POST['lime_template']); - $lime_endurl = $db->qstr($_POST['lime_endurl']); - - $sql = "UPDATE questionnaire - SET lime_mode = $lime_mode, lime_template = $lime_template, lime_endurl = $lime_endurl - WHERE questionnaire_id = $qid"; - - $db->Execute($sql); - } $cl = "info"; $message = T_("Successfully inserted") . " " . T_("with ID") . " $qid,