4 include_once
"Services/BackgroundTask/classes/class.ilBackgroundTask.php";
28 $lng->loadLanguageModule(
"bgtask");
30 if ((
int) $_REQUEST[
"tid"]) {
32 $this->handler = $this->task->getHandlerInstance();
49 $next_class =
$ilCtrl->getNextClass($this);
50 $cmd =
$ilCtrl->getCmd(
"validate");
52 switch ($next_class) {
54 if ($cmd ==
"deliver" ||
72 echo json_encode($a_json);
80 $class = trim(
$_GET[
"hid"]);
81 $file =
"Services/BackgroundTask/classes/class." . $class .
".php";
82 if (file_exists($file)) {
102 if ($task_id != $this->task->getId()) {
111 $json = $this->handler->init();
124 $this->handler->process();
126 require_once
'Services/WebServices/SOAP/classes/class.ilSoapClient.php';
128 $soap_client->setResponseTimeout(1);
129 $soap_client->enableWSDL(
true);
130 $soap_client->init();
131 $soap_client->call(
'processBackgroundTask', array(
132 session_id() .
'::' .
$_COOKIE[
'ilClientId'],
149 return (extension_loaded(
'curl') &&
150 $ilSetting->get(
'soap_user_administration') &&
159 include_once
"Services/BackgroundTask/classes/class.ilBackgroundTaskJson.php";
163 $result = $this->handler->finish();
189 $this->handler->deliver();
background task hub (aka ajax handler, GUI)
static getActiveByUserId($a_user_id)
cancel()
Cancel current task.
validate()
Validate given task.
isSOAPEnabled()
Is soap enabled?
progress()
Check progress of current task.
unblock()
Cancel all other tasks, start current one.
static getProgressJson(ilBackgroundTask $a_task, $a_finished_cmd=null, $a_finished_result=null)
Get json for task progress.
sendJson(stdClass $a_json)
Send Json to client.
process()
Process current task.
executeCommand()
Execute current command.
__construct()
Constructor.
static getType()
Get context type.