ILIAS
Release_5_0_x_branch Revision 61816
|
Description of class. More...
Public Member Functions | |
__construct (ilECSSetting $server, $a_mid) | |
Constructor | |
getServer () | |
Get server settings. | |
getMapping () | |
Get mapping settings. | |
getCourseUrl () | |
Get course url. | |
isObjectCreated () | |
Check if an object (course / group) has been created. | |
setObjectCreated ($a_status) | |
Set object created status. | |
getMid () | |
Get mid of course event. | |
handle ($a_content_id, $course) | |
Handle sync request. |
Protected Member Functions | |
doAttributeMapping ($a_content_id, $course) | |
Sync attribute mapping. | |
syncParentContainer ($a_content_id, $course) | |
Sync parent container. | |
syncNodeToTop ($tree_id, $cms_id) | |
Sync node to top. | |
syncCategory ($tobj_id, $parent_ref_id) | |
Sync category. | |
doSync ($a_content_id, $course, $a_parent_obj_id) | |
Handle all in one setting. | |
createParallelCourses ($a_content_id, $course, $parent_ref) | |
Create parallel courses. | |
createParallelCourse ($a_content_id, $course, $group, $parent_ref) | |
Create parallel course. | |
updateParallelCourses ($a_content_id, $course, $parent_obj) | |
Update parallel group data. | |
createParallelGroups ($a_content_id, $course, $parent_ref) | |
This create parallel groups. | |
createParallelGroup ($a_content_id, $course, $group, $parent_ref) | |
Create parallel group. | |
updateParallelGroups ($a_content_id, $course, $parent_obj) | |
Update parallel group data. | |
getImportId ($a_content_id, $a_sub_id=NULL) | |
Get import id of remote course Return 0 if object isn't imported. | |
updateCourseData ($course, $obj_id) | |
Update course data. | |
createCourseData ($course) | |
Create course data from json. | |
createCourseReference ($crs, $a_parent_obj_id) | |
Create course reference. | |
setImported ($a_content_id, $object, $a_ecs_id=0, $a_sub_id=0) | |
Set new course object imported. | |
addUrlEntry ($a_obj_id) | |
Add an url entry. | |
handleCourseUrlUpdate () | |
Update course url. |
Private Attributes | |
$server = null | |
$mapping = null | |
$course_url = null | |
$object_created = false | |
$mid |
Description of class.
Definition at line 14 of file class.ilECSCourseCreationHandler.php.
ilECSCourseCreationHandler::__construct | ( | ilECSSetting | $server, |
$a_mid | |||
) |
Constructor
Definition at line 28 of file class.ilECSCourseCreationHandler.php.
References $server, ilECSNodeMappingSettings\getInstanceByServerMid(), getMid(), and getServer().
|
protected |
Add an url entry.
type | $a_obj_id |
Definition at line 644 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 585 of file class.ilECSCourseCreationHandler.php.
References $GLOBALS.
Referenced by doSync().
|
protected |
Create course reference.
ilObjCourse | $crs_obj | |
int | $a_parent_obj_id |
Definition at line 602 of file class.ilECSCourseCreationHandler.php.
References $ref_id, ilObject\_getAllReferences(), addUrlEntry(), and setObjectCreated().
Referenced by createParallelCourse(), and doSync().
|
protected |
Create parallel course.
type | $course | |
type | $group | |
type | $parent_ref |
Definition at line 415 of file class.ilECSCourseCreationHandler.php.
References $GLOBALS, ilObject\_lookupObjId(), createCourseReference(), setImported(), and setObjectCreated().
Referenced by createParallelCourses(), and updateParallelCourses().
|
protected |
Create parallel courses.
int | econtent id | |
type | $course | |
type | $parent_ref |
Definition at line 400 of file class.ilECSCourseCreationHandler.php.
References createParallelCourse().
Referenced by doSync().
|
protected |
Create parallel group.
type | $course | |
type | $group |
Definition at line 487 of file class.ilECSCourseCreationHandler.php.
References GRP_TYPE_CLOSED, setImported(), and setObjectCreated().
Referenced by createParallelGroups(), and updateParallelGroups().
|
protected |
This create parallel groups.
type | $course | |
ilObjCourse |
Definition at line 473 of file class.ilECSCourseCreationHandler.php.
References createParallelGroup().
Referenced by doSync().
|
protected |
Sync attribute mapping.
type | $a_content_id | |
type | $course |
Definition at line 136 of file class.ilECSCourseCreationHandler.php.
References $GLOBALS, $ref_id, ilObject\_getAllReferences(), ilObject\_lookupObjId(), 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 308 of file class.ilECSCourseCreationHandler.php.
References $GLOBALS, 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 61 of file class.ilECSCourseCreationHandler.php.
References $course_url.
Referenced by addUrlEntry(), doSync(), handle(), and handleCourseUrlUpdate().
|
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 545 of file class.ilECSCourseCreationHandler.php.
References getMid(), getServer(), and ilECSImport\lookupObjIdByContentId().
Referenced by doAttributeMapping(), doSync(), syncNodeToTop(), updateParallelCourses(), and updateParallelGroups().
ilECSCourseCreationHandler::getMapping | ( | ) |
Get mapping settings.
Definition at line 52 of file class.ilECSCourseCreationHandler.php.
References $mapping.
Referenced by doAttributeMapping(), and handle().
ilECSCourseCreationHandler::getMid | ( | ) |
Get mid of course event.
Definition at line 88 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 43 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 98 of file class.ilECSCourseCreationHandler.php.
References $GLOBALS, ilObject\_lookupObjId(), ilObject\_lookupTitle(), doAttributeMapping(), doSync(), getCourseUrl(), getMapping(), setObjectCreated(), and syncParentContainer().
|
protected |
Update course url.
Definition at line 665 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 70 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 621 of file class.ilECSCourseCreationHandler.php.
References $GLOBALS, getMid(), and getServer().
Referenced by createParallelCourse(), createParallelGroup(), and doSync().
ilECSCourseCreationHandler::setObjectCreated | ( | $a_status | ) |
Set object created status.
bool | $a_status |
Definition at line 79 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 270 of file class.ilECSCourseCreationHandler.php.
References $GLOBALS, getMid(), getServer(), and ilECSImport\setMID().
Referenced by syncNodeToTop().
|
protected |
Sync node to top.
type | $tree_id | |
type | $parent_id |
Definition at line 214 of file class.ilECSCourseCreationHandler.php.
References $GLOBALS, $ref_id, ilObject\_getAllReferences(), getImportId(), getMid(), getServer(), ilECSCmsData\lookupCmsIds(), ilECSCmsData\lookupObjId(), and syncCategory().
|
protected |
Sync parent container.
type | $a_content_id | |
type | $course |
Definition at line 189 of file class.ilECSCourseCreationHandler.php.
References $GLOBALS, getMid(), getServer(), and ilECSCmsData\lookupFirstTreeOfNode().
Referenced by handle().
|
protected |
Update course data.
type | $course |
Definition at line 560 of file class.ilECSCourseCreationHandler.php.
References $GLOBALS, $ref_id, ilObject\_getAllReferences(), and ilObjectFactory\getInstanceByRefId().
Referenced by doSync().
|
protected |
Update parallel group data.
type | $course | |
type | $parent_obj |
Definition at line 436 of file class.ilECSCourseCreationHandler.php.
References $GLOBALS, ilObject\_getAllReferences(), addUrlEntry(), createParallelCourse(), getImportId(), and ilObjectFactory\getInstanceByObjId().
Referenced by doSync().
|
protected |
Update parallel group data.
type | $course | |
type | $parent_obj |
Definition at line 509 of file class.ilECSCourseCreationHandler.php.
References $GLOBALS, ilObject\_getAllReferences(), addUrlEntry(), createParallelGroup(), getImportId(), and ilObjectFactory\getInstanceByObjId().
Referenced by doSync().
|
private |
Definition at line 18 of file class.ilECSCourseCreationHandler.php.
Referenced by getCourseUrl().
|
private |
Definition at line 17 of file class.ilECSCourseCreationHandler.php.
Referenced by getMapping().
|
private |
Definition at line 21 of file class.ilECSCourseCreationHandler.php.
Referenced by getMid().
|
private |
Definition at line 19 of file class.ilECSCourseCreationHandler.php.
Referenced by isObjectCreated().
|
private |
Definition at line 16 of file class.ilECSCourseCreationHandler.php.
Referenced by __construct(), and getServer().