diff --git a/CHANGELOG b/CHANGELOG index 8c837c1e..0cf252a2 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,6 +1,5 @@ queXS 1.14.0 - Changes since 1.13.1 - Changes for session authentication: queXS now uses the Limesurvey session based authentication system to authenticate all users. @@ -29,23 +28,23 @@ These queries will: 2. Make all other users regular users, and assign them the password "password" 3. Make all clients regular clients, and assign them the password "password" -Once you have run these - please go to the operator management page and update passwords for all users. +Once you have run these - please go to the operator management page and update passwords for all users AND reassign any extensions. /* Make the first user the admin user - with default password of: password */ INSERT INTO `lime_users` (`users_name`, `password`, `full_name`, `parent_id`, `lang`, `superadmin`) -SELECT username, '0x35653838343839386461323830343731353164306535366638646336323932373733363033643064366161626264643632613131656637323164313534326438', firstName, 0, 'auto', 1 +SELECT username, 0x35653838343839386461323830343731353164306535366638646336323932373733363033643064366161626264643632613131656637323164313534326438, firstName, 0, 'auto', 1 FROM operator WHERE operator_id = 1; /* Make all other users operators - with default password of: password */ INSERT INTO `lime_users` (`users_name`, `password`, `full_name`, `parent_id`, `lang`, `superadmin`) -SELECT username, '0x35653838343839386461323830343731353164306535366638646336323932373733363033643064366161626264643632613131656637323164313534326438', firstName, 1, 'auto', 0 +SELECT username, 0x35653838343839386461323830343731353164306535366638646336323932373733363033643064366161626264643632613131656637323164313534326438, firstName, 1, 'auto', 0 FROM operator WHERE operator_id != 1; /* Make all clients - with default password of: password */ INSERT INTO `lime_users` (`users_name`, `password`, `full_name`, `parent_id`, `lang`, `superadmin`) -SELECT username, '0x35653838343839386461323830343731353164306535366638646336323932373733363033643064366161626264643632613131656637323164313534326438', firstName, 1, 'auto', 0 +SELECT username, 0x35653838343839386461323830343731353164306535366638646336323932373733363033643064366161626264643632613131656637323164313534326438, firstName, 1, 'auto', 0 FROM client WHERE 1; @@ -54,6 +53,22 @@ DROP TABLE `sessions2`; /* Add sort order feature to questionnaire sample table */ ALTER TABLE `questionnaire_sample` ADD `sort_order` INT( 11 ) NOT NULL DEFAULT '0'; +UPDATE `questionnaire_sample` SET sort_order = sample_import_id; + +/* Add default outcomes feature */ + +/* -- add `default` and `permanent` parameters for outcomes -- */ +ALTER TABLE `outcome` ADD `default` TINYINT(1) UNSIGNED NOT NULL DEFAULT '1' COMMENT 'Used as default for questionnaire outcomes' AFTER `calc`, ADD `permanent` TINYINT(1) UNSIGNED NOT NULL COMMENT 'Permanent outcome, used for all questionnaires, not possible to de-select' AFTER `default`; + +/* -- define and set mandatory(constant) outcome_id's --*/ +UPDATE `outcome` SET `permanent` = '1' WHERE `outcome`.`outcome_id` IN (1,2,3,7,9,10,14,17,18,19) ; + +/* -- add `outcomes` parameter , define default list of outcome_ID's to be enabled for new questionnaries --*/ +ALTER TABLE `questionnaire` ADD `outcomes` VARCHAR(256) NULL DEFAULT '1,2,3,7,9,10,14,17,18,19' COMMENT 'Comma-separated string of outcomes defined for the questionnaire' AFTER `enabled`; + +/* -- enable all outcomes for existing questionnaires -- */ +UPDATE `questionnaire` SET `outcomes` = '1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,40,41,42,43,44,45' ; + !!-- IMPORTANT --!! If you had more than 1 sample assigned to a questionaire before "samplesort" update, you'll need to have different sort_order values (llike 0,1,2 e.t.c.)for each sample per questionnaire to make "samplesort" feature work. diff --git a/admin/addshift.php b/admin/addshift.php index 271e90fc..52089d59 100644 --- a/admin/addshift.php +++ b/admin/addshift.php @@ -42,7 +42,7 @@ include ("../db.inc.php"); /** * Authentication */ -include ("auth-admin.php"); +require ("auth-admin.php"); /** * XHTML functions diff --git a/admin/assignsample.php b/admin/assignsample.php index e43abbe3..7d9eaa94 100644 --- a/admin/assignsample.php +++ b/admin/assignsample.php @@ -43,7 +43,7 @@ include ("../db.inc.php"); /** * Authentication */ -include ("auth-admin.php"); +require ("auth-admin.php"); /** * XHTML functions @@ -149,7 +149,8 @@ if (isset($_GET['questionnaire_id']) && isset($_GET['sample']) && isset($_GET[' foreach($rs as $r) { - add_case($r['sample_id'],$questionnaire_id,"NULL",$testing,41, true); + set_time_limit(30); + add_case($r['sample_id'],$questionnaire_id,"NULL",$testing,41, true); } $db->CompleteTrans(); diff --git a/admin/assigntimeslots.php b/admin/assigntimeslots.php index ff191027..a0d8a877 100644 --- a/admin/assigntimeslots.php +++ b/admin/assigntimeslots.php @@ -43,7 +43,7 @@ include ("../db.inc.php"); /** * Authentication */ -include ("auth-admin.php"); +require ("auth-admin.php"); /** * XHTML functions diff --git a/admin/auth-admin.php b/admin/auth-admin.php index b650c000..f260abcb 100644 --- a/admin/auth-admin.php +++ b/admin/auth-admin.php @@ -39,16 +39,13 @@ include_once(dirname(__FILE__) . "/../config.inc.php"); */ include_once(dirname(__FILE__) . "/../db.inc.php"); +session_name(LS_SESSION_NAME); -//get session name from DB -// -$sql = "SELECT stg_value - FROM " . LIME_PREFIX . "settings_global - WHERE stg_name = 'SessionName'"; +session_set_cookie_params(0,QUEXS_PATH); -session_name($db->GetOne($sql)); - -session_start(); +if ((defined('PHP_SESSION_ACTIVE') && session_status() !== PHP_SESSION_ACTIVE) || !session_id()) { + session_start(); +} //check if the session exists or loginID not set if (session_id() == "" || !isset($_SESSION['loginID'])) diff --git a/admin/availability.php b/admin/availability.php index 0808e9bf..d6a21d99 100644 --- a/admin/availability.php +++ b/admin/availability.php @@ -42,7 +42,7 @@ include ("../db.inc.php"); /** * Authentication file */ -include ("auth-admin.php"); +require ("auth-admin.php"); /** diff --git a/admin/availabilitygroup.php b/admin/availabilitygroup.php index 2029f348..cc67f9f6 100644 --- a/admin/availabilitygroup.php +++ b/admin/availabilitygroup.php @@ -43,7 +43,7 @@ include ("../db.inc.php"); /** * Authentication file */ -include ("auth-admin.php"); +require ("auth-admin.php"); /** * XHTML functions diff --git a/admin/bulkappointment.php b/admin/bulkappointment.php index e3afc406..26076971 100644 --- a/admin/bulkappointment.php +++ b/admin/bulkappointment.php @@ -47,7 +47,7 @@ include ("../db.inc.php"); /** * Authentication file */ -include ("auth-admin.php"); +require ("auth-admin.php"); /** * Operator functions diff --git a/admin/callhistory.php b/admin/callhistory.php index 102e3cca..25082f7e 100644 --- a/admin/callhistory.php +++ b/admin/callhistory.php @@ -42,7 +42,7 @@ include ("../db.inc.php"); /** * Authentication file */ -include ("auth-admin.php"); +require ("auth-admin.php"); /** * XHTML functions @@ -82,7 +82,7 @@ if ($operator_id) { if (isset($_GET['questionnaire_id'])) $qid = $_GET['questionnaire_id']; if (isset($_GET['sample_import_id'])) $sid = $_GET['sample_import_id']; - $sql = "SELECT DATE_FORMAT(CONVERT_TZ(c.start,'UTC',op.Time_zone_name),'".DATE_FORMAT."') as start_date, DATE_FORMAT(CONVERT_TZ(c.start,'UTC',op.Time_zone_name),'".TIME_FORMAT."') as start_time, DATE_FORMAT(CONVERT_TZ(c.end,'UTC',op.Time_zone_name),'".TIME_FORMAT."') as end, o.description as descr, (CONCAT(r.firstName,' ',r.lastName)) as firstName, opp.firstName as opname, + $sql = "SELECT DATE_FORMAT(CONVERT_TZ(c.start,'UTC',op.Time_zone_name),'".DATE_FORMAT."') as start_date, DATE_FORMAT(CONVERT_TZ(c.start,'UTC',op.Time_zone_name),'".TIME_FORMAT."') as start_time, DATE_FORMAT(CONVERT_TZ(c.end,'UTC',op.Time_zone_name),'".TIME_FORMAT."') as end, o.description as descr, (CONCAT(r.firstName,' ',r.lastName)) as firstName, CONCAT(opp.firstName, ' ', opp.lastName) as opname, (SELECT GROUP_CONCAT(cn1.note SEPARATOR '¶ ' ) FROM `case_note` as cn1 WHERE c.case_id = cn1.case_id GROUP BY cn1.case_id)as casenotes,"; if (isset($_GET['csv'])) $sql .= " c.case_id "; @@ -133,7 +133,7 @@ if ($operator_id) while ($r = $rs->FetchRow()) { - translate_array($r,array("des")); + translate_array($r,array("descr")); echo $r['start_date'] . "," .$r['start_time'] . "," . $r['end'] . "," . $r['case_id'] . "," . $r['qd'] . "," . $r['spl'] . "," . $r['cpi'] . "," . $r['opname'] . "," . $r['descr'] . "," . $r['casenotes'] . "," . $r['firstName'] . "\n"; } @@ -151,7 +151,7 @@ if ($operator_id) } else { - translate_array($rs,array("des")); + translate_array($rs,array("descr")); $datacol = array("start_date", "start_time","end","case_id","qd","spl","cpi","opname","descr","casenotes","firstName"); $headers = array(T_("Date"), T_("Start time"), T_("End time"),T_("Case ID"),T_("Questionnaire"),T_("Sample"),T_("Phone number"),T_("Operator"),T_("Outcome"),T_("Case notes"),T_("Respondent")); diff --git a/admin/callrestrict.php b/admin/callrestrict.php index 2d6c591c..044a3d74 100644 --- a/admin/callrestrict.php +++ b/admin/callrestrict.php @@ -42,7 +42,7 @@ include ("../db.inc.php"); /** * Authentication file */ -include ("auth-admin.php"); +require ("auth-admin.php"); /** * XHTML functions diff --git a/admin/casesbyoutcome.php b/admin/casesbyoutcome.php index cb3d5b48..048483f7 100644 --- a/admin/casesbyoutcome.php +++ b/admin/casesbyoutcome.php @@ -42,7 +42,7 @@ include ("../db.inc.php"); /** * Authentication file */ -include ("auth-admin.php"); +require ("auth-admin.php"); /** * XHTML functions @@ -75,7 +75,8 @@ if ($operator_id) if (!empty($rs)){ print "
$msg
"; + print "$msg
"; if (!empty($rs)) { - $sql = "SELECT o.operator_id as value, o.firstName as description + $sql = "SELECT o.operator_id as value, CONCAT(o.firstName,' ',o.lastname) as description FROM `operator` as o LEFT JOIN `extension` as e ON (e.current_operator_id = o.operator_id) WHERE e.extension_id IS NULL"; @@ -258,14 +262,15 @@ else if ($rs[$i]['assignment'] == "list") $rs[$i]['assignment'] = display_chooser($ers,"operator_id_" . $rs[$i]["extension_id"],"operator_id_" . $rs[$i]["extension_id"],true,"extension_id=".$rs[$i]["extension_id"],true,false,false,false); } - print "" . T_("No extensions") . "
"; + print "" . T_("No extensions") . "
"; - print ""; + print "" . T_("Add extension") . " +