5 include_once
'Services/Tracking/classes/class.ilLPStatus.php';
23 parent::ilLPStatus($a_obj_id);
31 $members = self::getMembers($a_obj_id);
44 include_once
'./Services/Tracking/classes/class.ilChangeEvent.php';
53 $users = array_intersect(self::getMembers($a_obj_id), (array)$users);
64 foreach($status_info[
'objective_result'] as $user_id => $completed)
66 if(count($completed) == $status_info[
'num_objectives'])
68 $usr_ids[] = $user_id;
75 $usr_ids = array_intersect(self::getMembers($a_obj_id), (array)$usr_ids);
78 return $usr_ids ? $usr_ids : array();
86 include_once
'Modules/Course/classes/class.ilCourseObjective.php';
88 $status_info = array();
89 $status_info[
'objective_result'] = array();
91 $status_info[
'num_objectives'] = count($status_info[
'objectives']);
93 if($status_info[
'num_objectives'])
95 $in = $ilDB->in(
'objective_id',$status_info[
'objectives'],
false,
'integer');
97 $query =
"SELECT * FROM crs_objective_status WHERE ".$in;
101 $status_info[
'completed'][
$row->objective_id][] =
$row->user_id;
102 $status_info[
'objective_result'][
$row->user_id][
$row->objective_id] =
$row->objective_id;
106 $query =
"SELECT * FROM crs_objectives WHERE ".$in;
110 $status_info[
'objective_title'][
$row->objective_id] =
$row->title;
111 $status_info[
'objective_description'][
$row->objective_id] =
$row->description;
128 global $ilObjDataCache, $ilDB;
140 $status = self::LP_STATUS_NOT_ATTEMPTED_NUM;
141 switch ($ilObjDataCache->lookupType($a_obj_id))
144 include_once(
"./Services/Tracking/classes/class.ilChangeEvent.php");
147 $status = self::LP_STATUS_IN_PROGRESS_NUM;
149 include_once
'Modules/Course/classes/class.ilCourseObjective.php';
153 $set = $ilDB->query(
"SELECT count(objective_id) cnt FROM crs_objective_status ".
154 "WHERE ".$ilDB->in(
'objective_id',$objectives,
false,
'integer').
155 " AND user_id = ".$ilDB->quote($a_user_id,
"integer"));
156 if ($rec = $ilDB->fetchAssoc($set))
158 if ($rec[
"cnt"] == count($objectives))
160 $status = self::LP_STATUS_COMPLETED_NUM;
177 include_once
'Modules/Course/classes/class.ilCourseParticipants.php';
179 return $member_obj->getMembers();
193 $a_user_ids = self::getMembers($a_obj_id);
199 return self::_lookupStatusForObject($a_obj_id, self::LP_STATUS_COMPLETED_NUM, $a_user_ids);
225 $a_user_ids = self::getMembers($a_obj_id);
231 return self::_lookupStatusForObject($a_obj_id, self::LP_STATUS_IN_PROGRESS_NUM, $a_user_ids);
static _lookupFailedForObject($a_obj_id, $a_user_ids=null)
Get failed users for object.
static hasAccessed($a_obj_id, $a_usr_id)
Has accessed.
static _lookupInProgressForObject($a_obj_id, $a_user_ids=null)
Get in progress users for object.
static _getInstanceByObjId($a_obj_id)
Get singleton instance.
_getInProgress($a_obj_id)
const DB_FETCHMODE_OBJECT
_getStatusInfo($a_obj_id)
Reads informations about the object e.g test results, tlt, number of visits.
static _lookupCompletedForObject($a_obj_id, $a_user_ids=null)
Get completed users for object.
_getNotAttempted($a_obj_id)
_getCompleted($a_obj_id)
Static function to read the users who have the status 'completed'.
determineStatus($a_obj_id, $a_user_id, $a_obj=null)
Determine status.
_getObjectiveIds($course_id)
ilLPStatusObjectives($a_obj_id)
Abstract class ilLPStatus for all learning progress modes E.g ilLPStatusManual, ilLPStatusObjectives ...
static getMembers($a_obj_id)
Get members for object.
_getInProgress($a_obj_id)
Static function to read users who have the status 'in_progress'.
_getStatusInfo($a_obj_id)
static lookupUsersInProgress($a_obj_id)
Lookup users in progress.