33 include_once
'Services/Tracking/classes/class.ilLPStatus.php';
50 parent::__construct($a_obj_id);
66 $members = self::getMembers($a_obj_id);
85 include_once
'./Services/Tracking/classes/class.ilChangeEvent.php';
93 $users = array_intersect(self::getMembers($a_obj_id), (array) $users);
103 $ilDB = $DIC[
'ilDB'];
107 $query =
"SELECT DISTINCT(usr_id) user_id FROM ut_lp_marks " .
108 "WHERE obj_id = " .
$ilDB->quote($a_obj_id,
'integer') .
" " .
109 "AND completed = '1' ";
113 $usr_ids[] =
$row->user_id;
118 $usr_ids = array_intersect(self::getMembers($a_obj_id), (array) $usr_ids);
136 $ilObjDataCache = $DIC[
'ilObjDataCache'];
137 $ilDB = $DIC[
'ilDB'];
139 $status = self::LP_STATUS_NOT_ATTEMPTED_NUM;
140 switch ($ilObjDataCache->lookupType($a_obj_id)) {
144 $set =
$ilDB->query($q =
"SELECT usr_id FROM ut_lp_marks " .
145 "WHERE obj_id = " .
$ilDB->quote($a_obj_id,
'integer') .
" " .
146 "AND usr_id = " .
$ilDB->quote($a_user_id,
'integer') .
" " .
147 "AND completed = '1' ");
148 if ($rec =
$ilDB->fetchAssoc($set)) {
149 $status = self::LP_STATUS_COMPLETED_NUM;
151 include_once
'./Services/Tracking/classes/class.ilChangeEvent.php';
153 $status = self::LP_STATUS_IN_PROGRESS_NUM;
170 $ilObjDataCache = $DIC[
'ilObjDataCache'];
172 switch ($ilObjDataCache->lookupType($a_obj_id)) {
175 include_once
'./Services/Membership/classes/class.ilParticipants.php';
192 $a_user_ids = self::getMembers($a_obj_id);
197 return self::_lookupStatusForObject($a_obj_id, self::LP_STATUS_COMPLETED_NUM, $a_user_ids);
222 $a_user_ids = self::getMembers($a_obj_id);
227 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)
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