ILIAS
release_8 Revision v8.19
|
Class ilChangeEvent tracks change events on repository objects. More...
Static Public Member Functions | |
static | _recordWriteEvent (int $obj_id, int $usr_id, string $action, ?int $parent_obj_id=null) |
Records a write event. More... | |
static | _recordReadEvent (string $a_type, int $a_ref_id, int $obj_id, int $usr_id, bool $isCatchupWriteEvents=true, $a_ext_rc=null, $a_ext_time=null) |
static | _recordObjStats (int $a_obj_id, ?int $a_spent_seconds, ?int $a_read_count, ?int $a_childs_spent_seconds=null, ?int $a_child_read_count=null) |
static | _syncObjectStats (?int $a_now=null, int $a_minimum=20000) |
static | _catchupWriteEvents (int $obj_id, int $usr_id, ?string $timestamp=null) |
Catches up with all write events which occured before the specified timestamp. More... | |
static | _lookupUncaughtWriteEvents (int $obj_id, int $usr_id) |
Reads all write events which occured on the object which happened after the last time the user caught up with them. More... | |
static | _lookupChangeState (int $obj_id, int $usr_id) |
Returns the change state of the object for the specified user. More... | |
static | _lookupReadEvents ($obj_id, $usr_id=null) |
Reads all read events which occured on the object. More... | |
static | lookupUsersInProgress (int $a_obj_id) |
static | hasAccessed (int $a_obj_id, int $a_usr_id) |
Has accessed. More... | |
static | _activate () |
Activates change event tracking. More... | |
static | _deactivate () |
Deactivates change event tracking. More... | |
static | _isActive () |
Returns true, if change event tracking is active. More... | |
static | _delete (int $a_obj_id) |
Delete object entries. More... | |
static | _deleteReadEvents (int $a_obj_id) |
static | _deleteReadEventsForUsers (int $a_obj_id, array $a_user_ids) |
static | _getAllUserIds (int $a_obj_id) |
Static Private Attributes | |
static array | $has_accessed = [] |
Class ilChangeEvent tracks change events on repository objects.
The following events are considered to be a 'write event':
Definition at line 29 of file class.ilChangeEvent.php.
|
static |
Activates change event tracking.
Definition at line 765 of file class.ilChangeEvent.php.
References $DIC, $ilDB, $ilSetting, $query, $res, and _isActive().
Referenced by ilObjRepositorySettingsGUI\saveSettings().
|
static |
Catches up with all write events which occured before the specified timestamp.
$obj_id | int The object. |
$usr_id | int The user. |
$timestamp | string|null timestamp. |
Definition at line 525 of file class.ilChangeEvent.php.
References $DIC, $ilDB, $query, $res, $timestamp, and ilUtil\now().
Referenced by _recordReadEvent(), ilObjRootFolderGUI\getEditFormValues(), ilContainerGUI\pasteObject(), ilContainerGUI\performPasteIntoMultipleObjectsObject(), ilRepUtil\restoreObjects(), ilObjFileGUI\update(), ilObjGroupGUI\updateObject(), ilObjCourseGUI\updateObject(), and ilObjCategoryGUI\updateObject().
|
static |
Deactivates change event tracking.
Definition at line 819 of file class.ilChangeEvent.php.
References $DIC, and $ilSetting.
Referenced by ilObjRepositorySettingsGUI\saveSettings().
|
static |
Delete object entries.
Definition at line 842 of file class.ilChangeEvent.php.
References $DIC, $ilDB, and $query.
Referenced by ilObjectLP\handleDelete().
|
static |
Definition at line 861 of file class.ilChangeEvent.php.
|
static |
Definition at line 873 of file class.ilChangeEvent.php.
Referenced by ilObjSCORM2004LearningModule\deleteTrackingDataOfUsers(), ilObjSCORMLearningModule\deleteTrackingDataOfUsers(), and ilObjectLP\resetLPDataForUserIds().
|
static |
Definition at line 888 of file class.ilChangeEvent.php.
References $DIC, $ilDB, $res, and ILIAS\Repository\int().
Referenced by ilObjectLP\gatherLPUsers().
|
static |
Returns true, if change event tracking is active.
Definition at line 831 of file class.ilChangeEvent.php.
References $DIC, and $ilSetting.
Referenced by ilObjUserTracking\__readSettings(), _activate(), ilInfoScreenGUI\addMetaDataSections(), ilObjRepositorySettingsGUI\addToExternalSettingsForm(), and ilObjRepositorySettingsGUI\initSettingsForm().
|
static |
Returns the change state of the object for the specified user.
which happened after the last time the user caught up with them.
$obj_id | int The object |
$usr_id | int The user who is interested into these events. |
Definition at line 622 of file class.ilChangeEvent.php.
References $DIC, $ilDB, $query, $res, and ilDBConstants\FETCHMODE_ASSOC.
|
static |
Reads all read events which occured on the object.
$obj_id | int The object |
$usr_id | int Optional, the user who performed these events. |
Definition at line 678 of file class.ilChangeEvent.php.
References $DIC, $ilDB, $query, and $res.
Referenced by ilLPStatusContentVisited\_getCompleted(), ilLPStatusTypicalLearningTime\_getCompleted(), ilLPStatusVisits\_getCompleted(), ilLPStatusTypicalLearningTime\_getInProgress(), ilLPStatusVisits\_getInProgress(), ilLearningProgress\_getProgress(), ilLearningProgress\_lookupProgressByObjId(), ilInfoScreenGUI\addMetaDataSections(), ilLPStatusTypicalLearningTime\determinePercentage(), ilLPStatusVisits\determinePercentage(), ilLPStatusTypicalLearningTime\determineStatus(), ilLPStatusVisits\determineStatus(), ilObjSCORMLearningModule\importSuccessForSahsUser(), and ILIAS\MediaCast\Presentation\VideoViewGUI\renderSideColumn().
|
static |
Reads all write events which occured on the object which happened after the last time the user caught up with them.
$obj_id | int The object |
$usr_id | int The user who is interested into these events. |
Definition at line 566 of file class.ilChangeEvent.php.
References $DIC, $ilDB, $query, $res, and ilDBConstants\FETCHMODE_ASSOC.
|
static |
Definition at line 309 of file class.ilChangeEvent.php.
References $DIC, $ilDB, ilObjUserTracking\_enabledObjectStatistics(), and ilObject\_lookupType().
|
static |
Definition at line 103 of file class.ilChangeEvent.php.
References $DIC, $ilDB, $path, $query, $res, _catchupWriteEvents(), ilObjUserTracking\_getValidTimeSpan(), ilObject\_lookupObjId(), ilObject\_lookupType(), and ILIAS\Repository\int().
Referenced by ilSCORM2004Tracking\_syncReadEvent(), ilObjSCORMTracking\_syncReadEvent(), ilLearningProgress\_tracProgress(), ilRemoteObjectBaseGUI\callObject(), ilSurveyExecutionGUI\executeCommand(), ilObjForumGUI\getContent(), ilObjSCORMLearningModule\importSuccessForSahsUser(), ilWikiPageGUI\increaseViewCount(), ilContainerGUI\performPasteIntoMultipleObjectsObject(), ilObjIndividualAssessmentGUI\recordIndividualAssessmentRead(), ilObjLearningSequenceGUI\recordLearningSequenceRead(), ilObjLinkResourceGUI\redirectToLink(), ilObjPortfolioBaseGUI\renderFullscreenHeader(), ilObjBlogGUI\renderFullscreenHeader(), ilObjCategoryGUI\renderObject(), ILIAS\MediaObjects\Tracking\TrackingManager\saveCompletion(), ilObjFileGUI\sendFile(), ilContainerContentGUI\setOutput(), ilObjMediaCastGUI\showContentObject(), ilObjSessionGUI\showJoinRequestButton(), ilObjSCORMTracking\syncGlobalStatus(), ilLMTracker\trackAccess(), ilObjCmiXapiGUI\trackObjectReadEvent(), ilObjLTIConsumerGUI\trackObjectReadEvent(), ilObjTestGUI\trackTestObjectReadEvent(), ilObjectGUI\viewObject(), and ilObjForumGUI\viewThreadObject().
|
static |
Records a write event.
The parent object should be specified for the 'delete', 'undelete' and 'add' and 'remove' events.
int | $obj_id | The object which was written to. |
int | $usr_id | The user who performed a write action. |
string | $action | The name of the write action. 'create', 'update', 'delete', 'add', 'remove', 'undelete'. |
int | null | $parent_obj_id | The object id of the parent object. If this is null, then the event is recorded for all parents of the object. If this is not null, then the event is only recorded for the specified parent. |
Definition at line 47 of file class.ilChangeEvent.php.
References $DIC, $ilDB, and $query.
Referenced by ilObjCourseGUI\afterSave(), ilObjRootFolderGUI\getEditFormValues(), ilContainerGUI\pasteObject(), ilContainerGUI\performPasteIntoMultipleObjectsObject(), ilObject2GUI\putObjectInTree(), ilObjectGUI\putObjectInTree(), ilRepUtil\removeObjectsFromSystem(), ilRepUtil\restoreObjects(), ilObjFileGUI\update(), ilObjGroupGUI\updateObject(), ilObjCourseGUI\updateObject(), and ilObjCategoryGUI\updateObject().
|
static |
Definition at line 360 of file class.ilChangeEvent.php.
References $check, $DIC, $ilDB, ilDBInterface\buildAtomQuery(), ilDBInterface\fetchAssoc(), ilDBInterface\insert(), ilDBInterface\numRows(), ilDBInterface\query(), ilDBInterface\quote(), and ilDBInterface\update().
Referenced by ilLPObjectStatisticsGUI\adminSync().
|
static |
Has accessed.
Definition at line 741 of file class.ilChangeEvent.php.
Referenced by ilLPStatusContentVisited\_getCompleted(), ilLPStatusVisitedPages\determineStatus(), ilLPStatusManual\determineStatus(), ilLPStatusQuestions\determineStatus(), ilLPStatusTypicalLearningTime\determineStatus(), ilLPStatusVisits\determineStatus(), ilLPStatusExerciseReturned\determineStatus(), ilLPStatusManualByTutor\determineStatus(), ilLPStatusCollectionMobs\determineStatus(), ilLPStatusObjectives\determineStatus(), ilLPStatusSCORM\determineStatus(), and ilLPStatusCollection\determineStatus().
|
static |
Definition at line 719 of file class.ilChangeEvent.php.
References $DIC, $ilDB, $query, $res, and ILIAS\Repository\int().
Referenced by ilLPStatusQuestions\_getCompleted(), ilLPStatusManual\_getInProgress(), ilLPStatusQuestions\_getInProgress(), ilLPStatusVisitedPages\_getInProgress(), ilLPStatusExerciseReturned\_getInProgress(), ilLPStatusManualByTutor\_getInProgress(), ilLPStatusCollection\_getInProgress(), ilLPStatusCollectionMobs\_getStatusInfo(), and ilLPStatusObjectives\_getStatusInfo().
|
staticprivate |
Definition at line 31 of file class.ilChangeEvent.php.