19 declare(strict_types=0);
34 $required_visits = $status_info[
'visits'];
38 foreach ($all as $event) {
39 if ($event[
'read_count'] < $required_visits) {
40 $user_ids[] = (
int) $event[
'usr_id'];
53 $required_visits = $status_info[
'visits'];
57 foreach ($all as $event) {
58 if ($event[
'read_count'] >= $required_visits) {
59 $user_ids[] = (
int) $event[
'usr_id'];
81 $status = self::LP_STATUS_NOT_ATTEMPTED_NUM;
82 switch ($this->ilObjDataCache->lookupType($a_obj_id)) {
85 $status = self::LP_STATUS_IN_PROGRESS_NUM;
89 $required_visits = $status_info[
'visits'];
95 if (($re[0][
'read_count'] ?? 0) >= $required_visits) {
96 $status = self::LP_STATUS_COMPLETED_NUM;
107 ?
object $a_obj =
null 112 $rc = (
int) ($re[0][
"read_count"] ?? 0);
114 if ($reqv > 0 && $rc) {
115 $per = (
int) min(100, 100 / $reqv * $rc);
static _lookupVisits(int $a_obj_id)
determineStatus(int $a_obj_id, int $a_usr_id, ?object $a_obj=null)
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.
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
static _lookupReadEvents($obj_id, $usr_id=null)
Reads all read events which occured on the object.
ilObjectDataCache $ilObjDataCache
static _getInProgress(int $a_obj_id)
determinePercentage(int $a_obj_id, int $a_usr_id, ?object $a_obj=null)
static _getStatusInfo(int $a_obj_id)
static _getCompleted(int $a_obj_id)