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

Add quota updates to system sort process

This commit is contained in:
Adam Zammit
2013-04-30 14:18:29 +10:00
parent cf5addb19d
commit 116cf43f7f

View File

@@ -44,6 +44,11 @@ include (dirname(__FILE__) . "/../db.inc.php");
*/
include (dirname(__FILE__) . "/../functions/functions.process.php");
/**
* Operator functions (for quotas)
*/
include (dirname(__FILE__) . "/../functions/functions.operator.php");
/**
* Update the database with the new data from the running script
*
@@ -106,6 +111,17 @@ while (!is_process_killed($process_id)) //check if process killed every $sleepin
$db->Execute($sql);
//Update quotas for all enabled questionnaires
$sql = "SELECT questionnaire_id
FROM questionnaire
WHERE enabled = 1";
$qs = $db->GetAll($sql);
foreach($qs as $q)
update_quotas($q['questionnaire_id']);
//Sort current cases for all enabled questionnaires