4 include_once
"Services/BackgroundTask/classes/class.ilBackgroundTask.php";
27 $lng->loadLanguageModule(
"bgtask");
29 if((
int)$_REQUEST[
"tid"])
32 $this->handler = $this->task->getHandlerInstance();
48 $next_class = $ilCtrl->getNextClass($this);
49 $cmd = $ilCtrl->getCmd(
"validate");
54 if(
$cmd ==
"deliver" ||
73 echo json_encode($a_json);
81 $class = trim(
$_GET[
"hid"]);
82 $file =
"Services/BackgroundTask/classes/class.".$class.
".php";
83 if(file_exists(
$file))
104 if($task_id != $this->task->getId())
114 $json = $this->handler->init();
128 $this->handler->process();
132 require_once
'Services/WebServices/SOAP/classes/class.ilSoapClient.php';
134 $soap_client->setResponseTimeout(1);
135 $soap_client->enableWSDL(
true);
136 $soap_client->init();
137 $soap_client->call(
'processBackgroundTask',
array(
138 session_id() .
'::' .
$_COOKIE[
'ilClientId'],
154 return (extension_loaded(
'curl') &&
155 $ilSetting->get(
'soap_user_administration') &&
164 include_once
"Services/BackgroundTask/classes/class.ilBackgroundTaskJson.php";
169 $result = $this->handler->finish();
197 $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.
Create styles array
The data for the language used.
sendJson(stdClass $a_json)
Send Json to client.
process()
Process current task.
executeCommand()
Execute current command.
__construct()
Constructor.
if(!file_exists("$old.txt")) if($old===$new) if(file_exists("$new.txt")) $file
static getType()
Get context type.