diff options
author | Simon Rettberg | 2016-08-12 16:47:03 +0200 |
---|---|---|
committer | Simon Rettberg | 2016-08-12 16:47:03 +0200 |
commit | fa4e59ce7dfdb132e817ce5d2b4482db84b348f5 (patch) | |
tree | cd654aa5c5f50fc0f77f361c9199025c685952c1 /inc/taskmanagercallback.inc.php | |
parent | [inc/event] Remove call to deleted class method (diff) | |
download | slx-admin-fa4e59ce7dfdb132e817ce5d2b4482db84b348f5.tar.gz slx-admin-fa4e59ce7dfdb132e817ce5d2b4482db84b348f5.tar.xz slx-admin-fa4e59ce7dfdb132e817ce5d2b4482db84b348f5.zip |
Fix minor issues in exams install hook, taskmanager callback logic
Diffstat (limited to 'inc/taskmanagercallback.inc.php')
-rw-r--r-- | inc/taskmanagercallback.inc.php | 6 |
1 files changed, 5 insertions, 1 deletions
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); } /** |