5 include_once
'Services/Tracking/classes/class.ilLPStatus.php';
23 parent::__construct($a_obj_id);
31 $members = self::getMembers($a_obj_id);
46 $usr_ids = (
array)$objective_results[
'user_status'][self::LP_STATUS_IN_PROGRESS_NUM];
60 $usr_ids = array_intersect(self::getMembers($a_obj_id), (
array)$usr_ids);
63 return $usr_ids ? $usr_ids :
array();
69 $usr_ids = (
array)$objective_results[
'user_status'][self::LP_STATUS_COMPLETED_NUM];
74 $usr_ids = array_intersect(self::getMembers($a_obj_id), (
array)$usr_ids);
77 return $usr_ids ? $usr_ids :
array();
83 $usr_ids = (
array)$objective_results[
'user_status'][self::LP_STATUS_FAILED_NUM];
88 $usr_ids = array_intersect(self::getMembers($a_obj_id), (
array)$usr_ids);
91 return $usr_ids ? $usr_ids :
array();
98 include_once
'Modules/Course/classes/class.ilCourseObjective.php';
100 $status_info =
array();
101 $status_info[
'user_status'] =
array();
103 $status_info[
'num_objectives'] = count($status_info[
'objectives']);
105 if($status_info[
'num_objectives'])
107 $in = $ilDB->in(
'objective_id',$status_info[
'objectives'],
false,
'integer');
109 include_once
"Modules/Course/classes/Objectives/class.ilLOUserResults.php";
112 $status_info[
'user_status'][$user_status][] = $user_id;
116 include_once(
"./Services/Tracking/classes/class.ilChangeEvent.php");
120 !in_array($user_id, $status_info[
'user_status'][ilLPStatus::LP_STATUS_IN_PROGRESS_NUM]))
127 $query =
"SELECT * FROM crs_objectives WHERE ".$in;
131 $status_info[
'objective_title'][
$row->objective_id] =
$row->title;
132 $status_info[
'objective_description'][
$row->objective_id] =
$row->description;
149 global $ilObjDataCache,
$ilDB;
161 $status = self::LP_STATUS_NOT_ATTEMPTED_NUM;
162 switch ($ilObjDataCache->lookupType($a_obj_id))
165 include_once(
"./Services/Tracking/classes/class.ilChangeEvent.php");
169 $status = self::LP_STATUS_IN_PROGRESS_NUM;
171 include_once
'Modules/Course/classes/class.ilCourseObjective.php';
176 include_once
"Modules/Course/classes/Objectives/class.ilLOUserResults.php";
178 if($objtv_status !== null)
180 $status = $objtv_status;
196 include_once
'Modules/Course/classes/class.ilCourseParticipants.php';
198 return $member_obj->getMembers();
212 $a_user_ids = self::getMembers($a_obj_id);
218 return self::_lookupStatusForObject($a_obj_id, self::LP_STATUS_COMPLETED_NUM, $a_user_ids);
244 $a_user_ids = self::getMembers($a_obj_id);
250 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.
static _getNotAttempted($a_obj_id)
determineStatus($a_obj_id, $a_user_id, $a_obj=null)
Determine status.
Create styles array
The data for the language used.
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.