3 declare(strict_types=0);
20 $tlt = $status_info[
'tlt'];
25 foreach ($all as $event) {
26 if ($event[
'spent_seconds'] < $tlt) {
27 $user_ids[] = (
int) $event[
'usr_id'];
40 $tlt = $status_info[
'tlt'];
45 foreach ($all as $event) {
46 if ($event[
'spent_seconds'] >= $tlt) {
47 $user_ids[] = (
int) $event[
'usr_id'];
66 $status = self::LP_STATUS_NOT_ATTEMPTED_NUM;
67 switch ($this->ilObjDataCache->lookupType($a_obj_id)) {
70 $status = self::LP_STATUS_IN_PROGRESS_NUM;
74 $tlt = $status_info[
'tlt'];
80 if ($re[0][
'spent_seconds'] >= $tlt) {
81 $status = self::LP_STATUS_COMPLETED_NUM;
96 $spent = (
int) ($re[0][
"spent_seconds"] ?? 0);
99 $per = min(100, 100 / $tlt * $spent);
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.
static hasAccessed(int $a_obj_id, int $a_usr_id)
Has accessed.
static _getTypicalLearningTimeSeconds(int $a_rbac_id, int $a_obj_id=0)
static _getStatusInfo(int $a_obj_id)
determinePercentage(int $a_obj_id, int $a_usr_id, ?object $a_obj=null)
static _lookupReadEvents($obj_id, $usr_id=null)
Reads all read events which occured on the object.
static _getInProgress(int $a_obj_id)
determineStatus(int $a_obj_id, int $a_usr_id, object $a_obj=null)