5 include_once
'./Services/WebServices/ECS/interfaces/interface.ilECSCommandQueueHandler.php';
6 include_once
'./Services/WebServices/ECS/classes/class.ilECSSetting.php';
7 include_once
'./Services/WebServices/ECS/classes/class.ilECSParticipantSetting.php';
55 include_once
'./Services/WebServices/ECS/classes/Course/class.ilECSCourseConnector.php';
57 $details = $crs_reader->getCourse($a_content_id,
true);
58 $this->mid = $details->getMySender();
61 include_once
'./Services/WebServices/ECS/classes/class.ilECSParticipantSetting.php';
63 if (!$part->isImportEnabled()) {
64 $GLOBALS[
'ilLog']->write(__METHOD__ .
': Import disabled for mid ' . $this->
getMid());
68 include_once
'./Services/WebServices/ECS/classes/Mapping/class.ilECSNodeMappingSettings.php';
73 $enabled = $gl_settings->isCourseAllocationEnabled();
75 $GLOBALS[
'ilLog']->write(__METHOD__ .
': Course allocation disabled for ' . $this->
getMid());
79 $GLOBALS[
'ilLog']->write(__METHOD__ .
': Reading course details failed with message ' . $e->getMessage());
92 include_once
'./Services/WebServices/ECS/classes/Tree/class.ilECSCmsData.php';
93 include_once
'./Services/WebServices/ECS/classes/Tree/class.ilECSCmsTree.php';
94 include_once
'./Services/WebServices/ECS/classes/Course/class.ilECSCourseConnector.php';
100 $course = $this->
readCourse($server, $a_content_id);
101 $GLOBALS[
'ilLog']->write(__METHOD__ .
': ' . print_r($course,
true));
102 $this->
doUpdate($a_content_id, $course);
105 $GLOBALS[
'ilLog']->write(__METHOD__ .
': Course creation failed with mesage ' . $e->getMessage());
134 $course = $this->
readCourse($server, $a_content_id);
135 $this->
doUpdate($a_content_id, $course);
138 $GLOBALS[
'ilLog']->write(__METHOD__ .
': Course creation failed with mesage ' . $e->getMessage());
150 protected function doUpdate($a_content_id, $course)
152 $GLOBALS[
'ilLog']->write(__METHOD__ .
': Starting course creation/update');
154 include_once
'./Services/WebServices/ECS/classes/Course/class.ilECSCourseCreationHandler.php';
156 $creation_handler->handle($a_content_id, $course);
167 include_once
'./Services/WebServices/ECS/classes/Course/class.ilECSCourseConnector.php';
169 return $crs_reader->getCourse($a_content_id, $a_details);
readCourse(ilECSSetting $server, $a_content_id, $a_details=false)
Read course from ecs.
$GLOBALS['loaded']
Global hash that tracks already loaded includes.
static getInstanceByServerMid($a_server_id, $a_mid)
Get instance.
handleCreate(ilECSSetting $server, $a_content_id)
Handle create.
Interface for all command queue handler classes.
handleUpdate(ilECSSetting $server, $a_content_id)
Handle update.
static getInstance($a_server_id, $mid)
Get instance by server id and mid.
handleDelete(ilECSSetting $server, $a_content_id)
Handle delete.
checkAllocationActivation(ilECSSetting $server, $a_content_id)
Check if course allocation is activated for one recipient of the.
__construct(ilECSSetting $server)
Constructor.
doUpdate($a_content_id, $course)
Perform update.