19declare(strict_types=0);
34 $tlt = $status_info[
'tlt'];
39 foreach ($all as $event) {
40 if ($event[
'spent_seconds'] < $tlt) {
41 $user_ids[] = (
int) $event[
'usr_id'];
54 $tlt = $status_info[
'tlt'];
59 foreach ($all as $event) {
60 if ($event[
'spent_seconds'] >= $tlt) {
61 $user_ids[] = (
int) $event[
'usr_id'];
74 $status_info[
'tlt'] = parent::_getTypicalLearningTime(
87 switch ($this->ilObjDataCache->lookupType($a_obj_id)) {
94 $tlt = $status_info[
'tlt'];
100 if ($re[0][
'spent_seconds'] >= $tlt) {
112 ?
object $a_obj =
null
114 $tlt = parent::_getTypicalLearningTime(
115 $this->ilObjDataCache->lookupType($a_obj_id),
119 $spent = (
int) ($re[0][
"spent_seconds"] ?? 0);
122 $per = (
int) min(100, 100 / $tlt * $spent);
static _lookupReadEvents($obj_id, $usr_id=null)
Reads all read events which occured on the object.
static hasAccessed(int $a_obj_id, int $a_usr_id)
Has accessed.
determineStatus(int $a_obj_id, int $a_usr_id, ?object $a_obj=null)
static _getInProgress(int $a_obj_id)
determinePercentage(int $a_obj_id, int $a_usr_id, ?object $a_obj=null)
static _getCompleted(int $a_obj_id)
static _getStatusInfo(int $a_obj_id)
Reads informations about the object e.g test results, tlt, number of visits.
Abstract class ilLPStatus for all learning progress modes E.g ilLPStatusManual, ilLPStatusObjectives ...
const LP_STATUS_COMPLETED_NUM
const LP_STATUS_IN_PROGRESS_NUM
const LP_STATUS_NOT_ATTEMPTED_NUM
ilObjectDataCache $ilObjDataCache
static _getStatusInfo(int $a_obj_id)