5 include_once
'Services/Tracking/classes/class.ilLPStatus.php';
24 parent::__construct($a_obj_id);
32 $members = self::getMembers($a_obj_id);
46 $usr_ids = (array) $objective_results[
'user_status'][self::LP_STATUS_IN_PROGRESS_NUM];
59 $usr_ids = array_intersect(self::getMembers($a_obj_id), (array) $usr_ids);
62 return $usr_ids ? $usr_ids : array();
68 $usr_ids = (array) $objective_results[
'user_status'][self::LP_STATUS_COMPLETED_NUM];
72 $usr_ids = array_intersect(self::getMembers($a_obj_id), (array) $usr_ids);
75 return $usr_ids ? $usr_ids : array();
81 $usr_ids = (array) $objective_results[
'user_status'][self::LP_STATUS_FAILED_NUM];
85 $usr_ids = array_intersect(self::getMembers($a_obj_id), (array) $usr_ids);
88 return $usr_ids ? $usr_ids : array();
97 include_once
'Modules/Course/classes/class.ilCourseObjective.php';
99 $status_info = array();
100 $status_info[
'user_status'] = array();
102 $status_info[
'num_objectives'] = count($status_info[
'objectives']);
104 if ($status_info[
'num_objectives']) {
105 $in =
$ilDB->in(
'objective_id', $status_info[
'objectives'],
false,
'integer');
107 include_once
"Modules/Course/classes/Objectives/class.ilLOUserResults.php";
109 $status_info[
'user_status'][$user_status][] = $user_id;
113 include_once(
"./Services/Tracking/classes/class.ilChangeEvent.php");
116 !in_array($user_id, $status_info[
'user_status'][ilLPStatus::LP_STATUS_IN_PROGRESS_NUM])) {
122 $query =
"SELECT * FROM crs_objectives WHERE " .
$in;
125 $status_info[
'objective_title'][
$row->objective_id] =
$row->title;
126 $status_info[
'objective_description'][
$row->objective_id] =
$row->description;
145 $ilObjDataCache = $DIC[
'ilObjDataCache'];
146 $ilDB = $DIC[
'ilDB'];
158 $status = self::LP_STATUS_NOT_ATTEMPTED_NUM;
159 switch ($ilObjDataCache->lookupType($a_obj_id)) {
161 include_once(
"./Services/Tracking/classes/class.ilChangeEvent.php");
164 $status = self::LP_STATUS_IN_PROGRESS_NUM;
166 include_once
'Modules/Course/classes/class.ilCourseObjective.php';
170 include_once
"Modules/Course/classes/Objectives/class.ilLOUserResults.php";
172 if ($objtv_status !== null) {
173 $status = $objtv_status;
189 include_once
'Modules/Course/classes/class.ilCourseParticipants.php';
191 return $member_obj->getMembers();
204 $a_user_ids = self::getMembers($a_obj_id);
209 return self::_lookupStatusForObject($a_obj_id, self::LP_STATUS_COMPLETED_NUM, $a_user_ids);
234 $a_user_ids = self::getMembers($a_obj_id);
239 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 _getInProgress($a_obj_id)
Static function to read users who have the status 'in_progress'.
static _getInProgress($a_obj_id)
static _getCompleted($a_obj_id)
Static function to read the users who have the status 'completed'.
static getSummarizedObjectiveStatusForLP($a_obj_id, array $a_objective_ids, $a_user_id=null)
static _getFailed($a_obj_id)
static _lookupInProgressForObject($a_obj_id, $a_user_ids=null)
Get in progress users for object.
static _getInstanceByObjId($a_obj_id)
Get singleton instance.
const LP_STATUS_IN_PROGRESS_NUM
static _getObjectiveIds($course_id, $a_activated_only=false)
static _getFailed($a_obj_id)
Static function to read the users who have the status 'completed'.
static _lookupCompletedForObject($a_obj_id, $a_user_ids=null)
Get completed users for object.
foreach($_POST as $key=> $value) $res
static _getNotAttempted($a_obj_id)
determineStatus($a_obj_id, $a_user_id, $a_obj=null)
Determine status.
static _getStatusInfo($a_obj_id)
Reads informations about the object e.g test results, tlt, number of visits.
static _getStatusInfo($a_obj_id)
if(php_sapi_name() !='cli') $in
Abstract class ilLPStatus for all learning progress modes E.g ilLPStatusManual, ilLPStatusObjectives ...
static getMembers($a_obj_id)
Get members for object.
static _getCompleted($a_obj_id)
static lookupUsersInProgress($a_obj_id)
Lookup users in progress.