33 include_once
'Services/Tracking/classes/class.ilLPStatus.php';
48 parent::__construct($a_obj_id);
64 $members = self::getMembers($a_obj_id);
84 include_once
'./Services/Tracking/classes/class.ilChangeEvent.php';
93 $users = array_intersect(self::getMembers($a_obj_id), (
array)$users);
105 $query =
"SELECT DISTINCT(usr_id) user_id FROM ut_lp_marks ".
106 "WHERE obj_id = ".$ilDB->quote($a_obj_id ,
'integer').
" ".
107 "AND completed = '1' ";
112 $usr_ids[] =
$row->user_id;
118 $usr_ids = array_intersect(self::getMembers($a_obj_id), (
array)$usr_ids);
134 global $ilObjDataCache,
$ilDB;
136 $status = self::LP_STATUS_NOT_ATTEMPTED_NUM;
137 switch ($ilObjDataCache->lookupType($a_obj_id))
142 $set = $ilDB->query($q =
"SELECT usr_id FROM ut_lp_marks ".
143 "WHERE obj_id = ".$ilDB->quote($a_obj_id ,
'integer').
" ".
144 "AND usr_id = ".$ilDB->quote($a_user_id ,
'integer').
" ".
145 "AND completed = '1' ");
146 if ($rec = $ilDB->fetchAssoc($set))
148 $status = self::LP_STATUS_COMPLETED_NUM;
152 include_once
'./Services/Tracking/classes/class.ilChangeEvent.php';
155 $status = self::LP_STATUS_IN_PROGRESS_NUM;
170 global $ilObjDataCache;
172 switch($ilObjDataCache->lookupType($a_obj_id))
176 include_once
'./Services/Membership/classes/class.ilParticipants.php';
194 $a_user_ids = self::getMembers($a_obj_id);
200 return self::_lookupStatusForObject($a_obj_id, self::LP_STATUS_COMPLETED_NUM, $a_user_ids);
226 $a_user_ids = self::getMembers($a_obj_id);
232 return self::_lookupStatusForObject($a_obj_id, self::LP_STATUS_IN_PROGRESS_NUM, $a_user_ids);
static hasAccessed($a_obj_id, $a_usr_id)
Has accessed.
static _getInProgress($a_obj_id)
Static function to read users who have the status 'in_progress'.
static _getCompleted($a_obj_id)
Static function to read the users who have the status 'completed'.
static _getNotAttempted($a_obj_id)
get not attempted
static _lookupFailedForObject($a_obj_id, $a_user_ids=null)
Get failed users for object.
static getMembers($a_obj_id)
Get members for object.
static _getCompleted($a_obj_id)
Create styles array
The data for the language used.
determineStatus($a_obj_id, $a_user_id, $a_obj=null)
Determine status.
Abstract class ilLPStatus for all learning progress modes E.g ilLPStatusManual, ilLPStatusObjectives ...
static _lookupCompletedForObject($a_obj_id, $a_user_ids=null)
Get completed users for object.
__construct($a_obj_id)
Constructor.
static _lookupInProgressForObject($a_obj_id, $a_user_ids=null)
Get in progress users for object.
static getInstanceByObjId($a_obj_id)
Get instance by obj type.
static lookupUsersInProgress($a_obj_id)
Lookup users in progress.
static _getInProgress($a_obj_id)
get in progress