90 if (!isset(self::$instances[
$ref_id])) {
93 return self::$instances[
$ref_id];
102 if (in_array($usr_id, $this->completed_users)) {
105 foreach ($this->collection_items as $item) {
106 $item_instance = self::getInstanceByRefId($item);
107 if ($item_instance->isWarningRequired($usr_id)) {
111 if (!$this->timings_active) {
116 if ($this->timings[
'changeable'] && isset($this->timings_user[$usr_id][
'end'])) {
117 $end = $this->timings_user[$usr_id][
'end'];
119 $end = $this->timings[
'suggestion_end'];
121 return $end < time();
130 $this->timings_active =
false;
132 $this->timings_active =
true;
137 $collection = $olp->getCollectionInstance();
139 $this->collection_items = $collection->getItems();
152 static $cache = array();
154 if (isset($cache[$a_ref_id])) {
155 return $cache[$a_ref_id];
160 return $cache[$a_ref_id];
173 $ilObjDataCache = $DIC[
'ilObjDataCache'];
175 $obj_id = $ilObjDataCache->lookupObjId($a_ref_id);
178 include_once
'./Services/Tracking/classes/class.ilLPStatus.php';
196 include_once
'./Services/Object/classes/class.ilObjectLP.php';
198 $collection = $olp->getCollectionInstance();
200 foreach ($collection->getItems() as $item) {
readObjectInformation()
Read timing information for object.
__construct($ref_id)
ilTimingCache constructor.
static getItem($a_ref_id)
Get item data.
isWarningRequired($usr_id)
static _getPlanedTimingsByItem($a_item_id)
LP collection of repository objects.
static _getCompleted($a_obj_id)
static _showWarning($a_ref_id, $a_usr_id)
static _hasUserCompleted($a_obj_id, $a_user_id)
Lookup user object completion.
static _lookupObjId($a_id)
static getInstanceByRefId($ref_id)
static getInstance($a_obj_id)
static & _getTimings($a_ref_id)