/**
  * Read all importable econtent
  *
  * @access protected
  */
 protected function readAll()
 {
     include_once 'Services/WebServices/ECS/classes/class.ilECSConnector.php';
     include_once 'Services/WebServices/ECS/classes/class.ilECSConnectorException.php';
     include_once './Services/WebServices/ECS/classes/class.ilECSEventQueueReader.php';
     include_once './Services/WebServices/ECS/classes/class.ilECSServerSettings.php';
     try {
         foreach (ilECSServerSettings::getInstance()->getServers() as $server) {
             ilECSEventQueueReader::handleImportReset($server);
             ilECSEventQueueReader::handleExportReset($server);
             include_once './Services/WebServices/ECS/classes/class.ilECSTaskScheduler.php';
             ilECSTaskScheduler::_getInstanceByServerId($server->getServerId())->startTaskExecution();
             ilUtil::sendInfo($this->lng->txt('ecs_remote_imported'));
             $this->imported();
             return true;
         }
     } catch (ilECSConnectorException $e1) {
         ilUtil::sendInfo('Cannot connect to ECS server: ' . $e1->getMessage());
         $this->imported();
         return false;
     } catch (ilException $e2) {
         ilUtil::sendInfo('Update failed: ' . $e1->getMessage());
         $this->imported();
         return false;
     }
 }
 public function handleECSTasks($sid, $a_server_id)
 {
     $this->initAuth($sid);
     $this->initIlias();
     if (!$this->__checkSession($sid)) {
         return $this->__raiseError($this->__getMessage(), $this->__getMessageCode());
     }
     include_once './Services/WebServices/ECS/classes/class.ilECSTaskScheduler.php';
     global $ilLog;
     $ilLog->write(__METHOD__ . ': Starting task execution...');
     $scheduler = ilECSTaskScheduler::_getInstanceByServerId($a_server_id);
     $scheduler->startTaskExecution();
     return true;
 }