class ilTimingCache
More...
◆ __construct()
ilTimingCache::__construct |
( |
|
$ref_id | ) |
|
◆ _getTimings()
static & ilTimingCache::_getTimings |
( |
|
$a_ref_id | ) |
|
|
static |
◆ _showWarning()
static ilTimingCache::_showWarning |
( |
|
$a_ref_id, |
|
|
|
$a_usr_id |
|
) |
| |
|
static |
- Deprecated:
- 7
- Parameters
-
- Returns
- bool
Definition at line 169 of file class.ilTimingCache.php.
170 {
172
173 $ilObjDataCache =
$DIC[
'ilObjDataCache'];
174
175 $obj_id = $ilObjDataCache->lookupObjId($a_ref_id);
176
177
178 include_once './Services/Tracking/classes/class.ilLPStatus.php';
180 return false;
181 }
182
183
186 if (
$timings[
'item'][
'changeable'] and
$timings[
'user'][$a_usr_id][
'end']) {
188 } else {
190 }
192 return true;
193 }
194 }
195
196 include_once './Services/Object/classes/class.ilObjectLP.php';
198 $collection = $olp->getCollectionInstance();
200 foreach ($collection->getItems() as $item) {
202 return true;
203 }
204 }
205 }
206
207
208 return false;
209 }
LP collection of repository objects.
static _hasUserCompleted($a_obj_id, $a_user_id)
Lookup user object completion.
static getInstance($a_obj_id)
static _showWarning($a_ref_id, $a_usr_id)
static & _getTimings($a_ref_id)
References $DIC, $end, $obj_id, $timings, _getTimings(), ilLPStatus\_hasUserCompleted(), _showWarning(), ilObjectLP\getInstance(), and ilObjectActivation\TIMINGS_PRESETTING.
Referenced by _showWarning().
◆ getInstanceByRefId()
static ilTimingCache::getInstanceByRefId |
( |
|
$ref_id | ) |
|
|
static |
◆ isWarningRequired()
ilTimingCache::isWarningRequired |
( |
|
$usr_id | ) |
|
- Parameters
-
- Returns
- bool
Definition at line 100 of file class.ilTimingCache.php.
101 {
102 if (in_array($usr_id, $this->completed_users)) {
103 return false;
104 }
105 foreach ($this->collection_items as $item) {
107 if ($item_instance->isWarningRequired($usr_id)) {
108 return true;
109 }
110 }
111 if (!$this->timings_active) {
112 return false;
113 }
114
115
116 if ($this->timings['changeable'] && isset($this->timings_user[$usr_id]['end'])) {
117 $end = $this->timings_user[$usr_id][
'end'];
118 } else {
119 $end = $this->timings[
'suggestion_end'];
120 }
121 return $end < time();
122 }
static getInstanceByRefId($ref_id)
References $end, and getInstanceByRefId().
◆ readObjectInformation()
ilTimingCache::readObjectInformation |
( |
| ) |
|
|
protected |
◆ $collection_items
ilTimingCache::$collection_items = array() |
|
private |
◆ $completed_users
ilTimingCache::$completed_users = array() |
|
private |
◆ $instances
ilTimingCache::$instances = array() |
|
staticprivate |
◆ $obj_id
ilTimingCache::$obj_id = 0 |
|
private |
◆ $ref_id
ilTimingCache::$ref_id = 0 |
|
private |
◆ $timings
ilTimingCache::$timings = array() |
|
private |
◆ $timings_active
ilTimingCache::$timings_active = false |
|
private |
◆ $timings_user
ilTimingCache::$timings_user = array() |
|
private |
The documentation for this class was generated from the following file: