33 include_once
'Services/Tracking/classes/class.ilLPStatus.php';
48 parent::__construct($a_obj_id);
64 $members = self::getMembers($a_obj_id);
83 include_once
'./Services/Tracking/classes/class.ilChangeEvent.php';
91 $users = array_intersect(self::getMembers($a_obj_id), (
array) $users);
103 $query =
"SELECT DISTINCT(usr_id) user_id FROM ut_lp_marks " .
104 "WHERE obj_id = " . $ilDB->quote($a_obj_id,
'integer') .
" " .
105 "AND completed = '1' ";
109 $usr_ids[] =
$row->user_id;
114 $usr_ids = array_intersect(self::getMembers($a_obj_id), (
array) $usr_ids);
130 global $ilObjDataCache,
$ilDB;
132 $status = self::LP_STATUS_NOT_ATTEMPTED_NUM;
133 switch ($ilObjDataCache->lookupType($a_obj_id)) {
137 $set = $ilDB->query($q =
"SELECT usr_id FROM ut_lp_marks " .
138 "WHERE obj_id = " . $ilDB->quote($a_obj_id,
'integer') .
" " .
139 "AND usr_id = " . $ilDB->quote($a_user_id,
'integer') .
" " .
140 "AND completed = '1' ");
141 if ($rec = $ilDB->fetchAssoc($set)) {
142 $status = self::LP_STATUS_COMPLETED_NUM;
144 include_once
'./Services/Tracking/classes/class.ilChangeEvent.php';
146 $status = self::LP_STATUS_IN_PROGRESS_NUM;
161 global $ilObjDataCache;
163 switch ($ilObjDataCache->lookupType($a_obj_id)) {
166 include_once
'./Services/Membership/classes/class.ilParticipants.php';
183 $a_user_ids = self::getMembers($a_obj_id);
188 return self::_lookupStatusForObject($a_obj_id, self::LP_STATUS_COMPLETED_NUM, $a_user_ids);
213 $a_user_ids = self::getMembers($a_obj_id);
218 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.
foreach($_POST as $key=> $value) $res
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