4include_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();
 
An exception for terminatinating execution or to throw for unit testing.
background task hub (aka ajax handler, GUI)
sendJson(stdClass $a_json)
Send Json to client.
executeCommand()
Execute current command.
__construct()
Constructor.
isSOAPEnabled()
Is soap enabled?
cancel()
Cancel current task.
progress()
Check progress of current task.
process()
Process current task.
validate()
Validate given 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.
static getActiveByUserId($a_user_id)
static getType()
Get context type.