From fa4e59ce7dfdb132e817ce5d2b4482db84b348f5 Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Fri, 12 Aug 2016 16:47:03 +0200 Subject: Fix minor issues in exams install hook, taskmanager callback logic --- inc/taskmanagercallback.inc.php | 6 +++++- inc/util.inc.php | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) (limited to 'inc') diff --git a/inc/taskmanagercallback.inc.php b/inc/taskmanagercallback.inc.php index c2a05609..bc959f03 100644 --- a/inc/taskmanagercallback.inc.php +++ b/inc/taskmanagercallback.inc.php @@ -38,7 +38,11 @@ class TaskmanagerCallback . " VALUES (:task, UNIX_TIMESTAMP(), :callback, :args)", $data, true) !== false) { return; } - Database::exec("INSERT INTO callback (taskid, dateline, cbfunction) VALUES (:task, UNIX_TIMESTAMP(), :callback)", $data); + // Most likely the args column is missing - try to add it on-the-fly so the update routine can properly + // use it (confmod updates - otherwise the status of modules is not updated properly) + Database::exec("ALTER TABLE `callback` ADD `args` TEXT NOT NULL DEFAULT ''", array(), true); + Database::exec("INSERT INTO callback (taskid, dateline, cbfunction, args)" + . " VALUES (:task, UNIX_TIMESTAMP(), :callback, :args)", $data); } /** diff --git a/inc/util.inc.php b/inc/util.inc.php index 14621a5a..8ad3928a 100644 --- a/inc/util.inc.php +++ b/inc/util.inc.php @@ -14,6 +14,7 @@ class Util { if (defined('API') && API) { error_log('API ERROR: ' . $message); + error_log(print_r(debug_backtrace(), true)); } Header('HTTP/1.1 500 Internal Server Error'); Header('Content-Type: text/html; charset=utf-8'); -- cgit v1.2.3-55-g7522