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 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'inc/taskmanagercallback.inc.php') 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); } /** -- cgit v1.2.3-55-g7522