19 declare(strict_types=0);
42 $query =
"SELECT DISTINCT(usr_id) user_id FROM ut_lp_marks " .
43 "WHERE obj_id = " .
$ilDB->quote($a_obj_id,
'integer') .
" " .
44 "AND completed = '1' ";
48 $usr_ids[] = (
int) $row->user_id;
66 $status = self::LP_STATUS_NOT_ATTEMPTED_NUM;
67 switch ($this->ilObjDataCache->lookupType($a_obj_id)) {
73 $status = self::LP_STATUS_IN_PROGRESS_NUM;
76 $set = $this->db->query(
77 $q =
"SELECT usr_id FROM ut_lp_marks " .
78 "WHERE obj_id = " . $this->db->quote(
82 "AND usr_id = " . $this->db->quote(
86 "AND completed = '1' " 88 if ($rec = $this->db->fetchAssoc($set)) {
89 $status = self::LP_STATUS_COMPLETED_NUM;
105 ?array $a_user_ids =
null
static _getInProgress(int $a_obj_id)
static _lookupFailedForObject(int $a_obj_id, ?array $a_user_ids=null)
Get failed users for object.
static _getCompleted(int $a_obj_id)
Static function to read the users who have the status 'completed'.
static hasAccessed(int $a_obj_id, int $a_usr_id)
Has accessed.
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
static lookupUsersInProgress(int $a_obj_id)
ilObjectDataCache $ilObjDataCache
static _getCompleted(int $a_obj_id)
determineStatus(int $a_obj_id, int $a_usr_id, ?object $a_obj=null)
Determine status.