ILIAS
release_5-2 Revision v5.2.25-18-g3f80b828510
|
Description of class. More...
Public Member Functions | |
__construct (ilECSSetting $server, $a_mid) | |
Constructor More... | |
getServer () | |
Get server settings. More... | |
getMapping () | |
Get mapping settings. More... | |
getCourseUrl () | |
Get course url. More... | |
isObjectCreated () | |
Check if an object (course / group) has been created. More... | |
setObjectCreated ($a_status) | |
Set object created status. More... | |
getMid () | |
Get mid of course event. More... | |
handle ($a_content_id, $course) | |
Handle sync request. More... | |
Protected Member Functions | |
getCreatedCourses () | |
get created courses More... | |
doAttributeMapping ($a_content_id, $course) | |
Sync attribute mapping. More... | |
createCourseReferenceObjects ($a_parent_ref_id) | |
Create course reference objects. More... | |
syncParentContainer ($a_content_id, $course) | |
Sync parent container. More... | |
syncNodeToTop ($tree_id, $cms_id) | |
Sync node to top. More... | |
syncCategory ($tobj_id, $parent_ref_id) | |
Sync category. More... | |
doSync ($a_content_id, $course, $a_parent_obj_id) | |
Handle all in one setting. More... | |
createParallelCourses ($a_content_id, $course, $parent_ref) | |
Create parallel courses. More... | |
createParallelCourse ($a_content_id, $course, $group, $parent_ref) | |
Create parallel course. More... | |
updateParallelCourses ($a_content_id, $course, $parent_obj) | |
Update parallel group data. More... | |
createParallelGroups ($a_content_id, $course, $parent_ref) | |
This create parallel groups. More... | |
createParallelGroup ($a_content_id, $course, $group, $parent_ref) | |
Create parallel group. More... | |
updateParallelGroups ($a_content_id, $course, $parent_obj) | |
Update parallel group data. More... | |
getImportId ($a_content_id, $a_sub_id=NULL) | |
Get import id of remote course Return 0 if object isn't imported. More... | |
updateCourseData ($course, $obj_id) | |
Update course data. More... | |
createCourseData ($course) | |
Create course data from json. More... | |
createCourseReference ($crs, $a_parent_obj_id) | |
Create course reference. More... | |
setImported ($a_content_id, $object, $a_ecs_id=0, $a_sub_id=null) | |
Set new course object imported. More... | |
addUrlEntry ($a_obj_id) | |
Add an url entry. More... | |
handleCourseUrlUpdate () | |
Update course url. More... | |
Protected Attributes | |
$log | |
Private Attributes | |
$server = null | |
$mapping = null | |
$course_url = null | |
$object_created = false | |
$courses_created = array() | |
$mid | |
Description of class.
Definition at line 14 of file class.ilECSCourseCreationHandler.php.
ilECSCourseCreationHandler::__construct | ( | ilECSSetting | $server, |
$a_mid | |||
) |
Constructor
Definition at line 35 of file class.ilECSCourseCreationHandler.php.
References $GLOBALS, $server, ilECSNodeMappingSettings\getInstanceByServerMid(), getMid(), and getServer().
|
protected |
Add an url entry.
type | $a_obj_id |
Definition at line 751 of file class.ilECSCourseCreationHandler.php.
References $ref_id, ilObject\_getAllReferences(), ilLink\_getLink(), ilObject\_lookupTitle(), and getCourseUrl().
Referenced by createCourseReference(), updateParallelCourses(), and updateParallelGroups().
|
protected |
Create course data from json.
Definition at line 689 of file class.ilECSCourseCreationHandler.php.
References $GLOBALS, and $title.
Referenced by doSync().
|
protected |
Create course reference.
ilObjCourse | $crs_obj | |
int | $a_parent_obj_id |
Definition at line 707 of file class.ilECSCourseCreationHandler.php.
References $ref_id, ilObject\_getAllReferences(), addUrlEntry(), and setObjectCreated().
Referenced by createParallelCourse(), and doSync().
|
protected |
Create course reference objects.
type | $a_parent_ref_id |
Definition at line 249 of file class.ilECSCourseCreationHandler.php.
References $ref_id, ilObject\_lookupObjId(), ilObject\_lookupTitle(), and getCreatedCourses().
Referenced by doAttributeMapping().
|
protected |
Create parallel course.
type | $course | |
type | $group | |
type | $parent_ref |
Definition at line 502 of file class.ilECSCourseCreationHandler.php.
References $title, ilObject\_lookupObjId(), createCourseReference(), getImportId(), setImported(), and setObjectCreated().
Referenced by createParallelCourses(), and updateParallelCourses().
|
protected |
Create parallel courses.
int | econtent id | |
type | $course | |
type | $parent_ref |
Definition at line 487 of file class.ilECSCourseCreationHandler.php.
References array, and createParallelCourse().
Referenced by doSync().
|
protected |
Create parallel group.
type | $course | |
type | $group |
Definition at line 590 of file class.ilECSCourseCreationHandler.php.
References $title, GRP_TYPE_CLOSED, setImported(), and setObjectCreated().
Referenced by createParallelGroups(), and updateParallelGroups().
|
protected |
This create parallel groups.
type | $course | |
ilObjCourse |
Definition at line 576 of file class.ilECSCourseCreationHandler.php.
References array, and createParallelGroup().
Referenced by doSync().
|
protected |
Sync attribute mapping.
type | $a_content_id | |
type | $course |
Definition at line 155 of file class.ilECSCourseCreationHandler.php.
References $GLOBALS, $ref_id, ilObject\_getAllReferences(), ilObject\_lookupObjId(), createCourseReferenceObjects(), ilLogLevel\DEBUG, ilECSCourseMappingRule\doMappings(), doSync(), getImportId(), getMapping(), getMid(), ilECSCourseMappingRule\getRuleRefIds(), getServer(), and ilECSCourseMappingRule\isMatching().
Referenced by handle().
|
protected |
Handle all in one setting.
type | $a_content_id | |
type | $course |
Definition at line 395 of file class.ilECSCourseCreationHandler.php.
References ilObject\_getAllReferences(), createCourseData(), createCourseReference(), createParallelCourses(), createParallelGroups(), getCourseUrl(), getImportId(), handleCourseUrlUpdate(), ilECSMappingUtils\PARALLEL_ALL_COURSES, ilECSMappingUtils\PARALLEL_COURSES_FOR_LECTURERS, ilECSMappingUtils\PARALLEL_GROUPS_IN_COURSE, ilECSMappingUtils\PARALLEL_ONE_COURSE, setImported(), updateCourseData(), updateParallelCourses(), and updateParallelGroups().
Referenced by doAttributeMapping(), and handle().
ilECSCourseCreationHandler::getCourseUrl | ( | ) |
Get course url.
Definition at line 70 of file class.ilECSCourseCreationHandler.php.
References $course_url.
Referenced by addUrlEntry(), doSync(), handle(), and handleCourseUrlUpdate().
|
protected |
get created courses
Definition at line 97 of file class.ilECSCourseCreationHandler.php.
References $courses_created.
Referenced by createCourseReferenceObjects().
|
protected |
Get import id of remote course Return 0 if object isn't imported.
Searches for the (hopefully) unique content id of an imported object
type | $a_content_id |
Definition at line 649 of file class.ilECSCourseCreationHandler.php.
References getMid(), getServer(), and ilECSImport\lookupObjIdByContentId().
Referenced by createParallelCourse(), doAttributeMapping(), doSync(), syncNodeToTop(), updateParallelCourses(), and updateParallelGroups().
ilECSCourseCreationHandler::getMapping | ( | ) |
Get mapping settings.
Definition at line 61 of file class.ilECSCourseCreationHandler.php.
References $mapping.
Referenced by doAttributeMapping(), and handle().
ilECSCourseCreationHandler::getMid | ( | ) |
Get mid of course event.
Definition at line 106 of file class.ilECSCourseCreationHandler.php.
References $mid.
Referenced by __construct(), doAttributeMapping(), getImportId(), handleCourseUrlUpdate(), setImported(), syncCategory(), syncNodeToTop(), and syncParentContainer().
ilECSCourseCreationHandler::getServer | ( | ) |
Get server settings.
Definition at line 52 of file class.ilECSCourseCreationHandler.php.
References $server.
Referenced by __construct(), doAttributeMapping(), getImportId(), handleCourseUrlUpdate(), setImported(), syncCategory(), syncNodeToTop(), and syncParentContainer().
ilECSCourseCreationHandler::handle | ( | $a_content_id, | |
$course | |||
) |
Handle sync request.
int | ecs content id | |
type | $course |
Definition at line 116 of file class.ilECSCourseCreationHandler.php.
References ilObject\_lookupObjId(), ilObject\_lookupTitle(), doAttributeMapping(), doSync(), getCourseUrl(), getMapping(), setObjectCreated(), and syncParentContainer().
|
protected |
Update course url.
Definition at line 772 of file class.ilECSCourseCreationHandler.php.
References $GLOBALS, getCourseUrl(), getMid(), getServer(), and isObjectCreated().
Referenced by doSync().
ilECSCourseCreationHandler::isObjectCreated | ( | ) |
Check if an object (course / group) has been created.
Definition at line 79 of file class.ilECSCourseCreationHandler.php.
References $object_created.
Referenced by handleCourseUrlUpdate().
|
protected |
Set new course object imported.
int | $a_content_id | |
ilObjCourse | $crs |
Definition at line 729 of file class.ilECSCourseCreationHandler.php.
References getMid(), getServer(), and ilECSImport\setSubId().
Referenced by createParallelCourse(), createParallelGroup(), and doSync().
ilECSCourseCreationHandler::setObjectCreated | ( | $a_status | ) |
Set object created status.
bool | $a_status |
Definition at line 88 of file class.ilECSCourseCreationHandler.php.
Referenced by createCourseReference(), createParallelCourse(), createParallelGroup(), and handle().
|
protected |
Sync category.
type | $tobj_id | |
type | $parent_ref_id |
Definition at line 355 of file class.ilECSCourseCreationHandler.php.
References $data, $GLOBALS, getMid(), getServer(), and ilECSImport\setMID().
Referenced by syncNodeToTop().
|
protected |
Sync node to top.
type | $tree_id | |
type | $parent_id |
Definition at line 299 of file class.ilECSCourseCreationHandler.php.
References $GLOBALS, $ref_id, ilObject\_getAllReferences(), array, getImportId(), getMid(), getServer(), ilECSCmsData\lookupCmsIds(), ilECSCmsData\lookupObjId(), and syncCategory().
|
protected |
Sync parent container.
type | $a_content_id | |
type | $course |
Definition at line 274 of file class.ilECSCourseCreationHandler.php.
References $GLOBALS, getMid(), getServer(), and ilECSCmsData\lookupFirstTreeOfNode().
Referenced by handle().
|
protected |
Update course data.
type | $course |
Definition at line 664 of file class.ilECSCourseCreationHandler.php.
References $GLOBALS, $ref_id, $title, ilObject\_getAllReferences(), and ilObjectFactory\getInstanceByRefId().
Referenced by doSync().
|
protected |
Update parallel group data.
type | $course | |
type | $parent_obj |
Definition at line 534 of file class.ilECSCourseCreationHandler.php.
References $title, ilObject\_getAllReferences(), addUrlEntry(), array, createParallelCourse(), getImportId(), and ilObjectFactory\getInstanceByObjId().
Referenced by doSync().
|
protected |
Update parallel group data.
type | $course | |
type | $parent_obj |
Definition at line 613 of file class.ilECSCourseCreationHandler.php.
References $GLOBALS, $title, ilObject\_getAllReferences(), addUrlEntry(), array, createParallelGroup(), getImportId(), and ilObjectFactory\getInstanceByObjId().
Referenced by doSync().
|
private |
Definition at line 24 of file class.ilECSCourseCreationHandler.php.
Referenced by getCourseUrl().
|
private |
Definition at line 26 of file class.ilECSCourseCreationHandler.php.
Referenced by getCreatedCourses().
|
protected |
Definition at line 19 of file class.ilECSCourseCreationHandler.php.
|
private |
Definition at line 23 of file class.ilECSCourseCreationHandler.php.
Referenced by getMapping().
|
private |
Definition at line 28 of file class.ilECSCourseCreationHandler.php.
Referenced by getMid().
|
private |
Definition at line 25 of file class.ilECSCourseCreationHandler.php.
Referenced by isObjectCreated().
|
private |
Definition at line 22 of file class.ilECSCourseCreationHandler.php.
Referenced by __construct(), and getServer().