33 include_once
'./Services/Tracking/classes/class.ilLPStatus.php';
34 include_once
'./Services/Tracking/classes/class.ilLPStatusWrapper.php';
42 parent::__construct($a_obj_id);
52 $members = self::getMembers($status_info[
'crs_id'],
true);
67 if (!$status_info[
'registration']) {
71 if ($status_info[
'starting_time'] <
time()) {
76 return $status_info[
'registered_users'] ? $status_info[
'registered_users'] :
array();
82 return $status_info[
'participated_users'] ? $status_info[
'participated_users'] :
array();
87 $tree =
$GLOBALS[
'DIC']->repositoryTree();
90 $ref_id = end($references);
92 $member_ref_id = null;
93 if (
$id = $tree->checkForParentType($ref_id,
'grp')) {
95 } elseif (
$id = $tree->checkForParentType($ref_id,
'crs')) {
99 $status_info =
array();
106 $status_info[
'starting_time'] = $time_info[
'start'];
107 $status_info[
'ending_time'] = $time_info[
'end'];
108 $status_info[
'fullday'] = $time_info[
'fullday'];
126 global $ilObjDataCache;
128 $status = self::LP_STATUS_NOT_ATTEMPTED_NUM;
129 switch ($ilObjDataCache->lookupType($a_obj_id)) {
131 include_once
'./Modules/Session/classes/class.ilEventParticipants.php';
132 include_once(
'./Modules/Session/classes/class.ilSessionAppointment.php');
133 include_once(
'./Modules/Session/classes/class.ilObjSession.php');
140 if ($registration && $time_info[
'start'] >=
time()) {
143 $status = self::LP_STATUS_IN_PROGRESS_NUM;
147 $status = self::LP_STATUS_COMPLETED_NUM;
160 protected static function getMembers($a_obj_id, $a_is_crs_id =
false)
163 $tree =
$GLOBALS[
'DIC']->repositoryTree();
165 $ref_id = end($references);
167 $member_ref_id = null;
168 if (
$id = $tree->checkForParentType($ref_id,
'grp')) {
169 $member_ref_id =
$id;
170 } elseif (
$id = $tree->checkForParentType($ref_id,
'crs')) {
171 $member_ref_id =
$id;
177 $member_obj_id = $a_obj_id;
181 return $member_obj->getMembers();
194 $a_user_ids = self::getMembers($a_obj_id);
199 return self::_lookupStatusForObject($a_obj_id, self::LP_STATUS_COMPLETED_NUM, $a_user_ids);
224 $a_user_ids = self::getMembers($a_obj_id);
229 return self::_lookupStatusForObject($a_obj_id, self::LP_STATUS_IN_PROGRESS_NUM, $a_user_ids);
static _getRegistered($a_event_id)
static _getParticipated($a_event_id)
static _getInProgress($a_obj_id)
Static function to read users who have the status 'in_progress'.
static getMembers($a_obj_id, $a_is_crs_id=false)
Get members for object.
static _getCompleted($a_obj_id)
Static function to read the users who have the status 'completed'.
static _getNotAttempted($a_obj_id)
$GLOBALS['loaded']
Global hash that tracks already loaded includes.
if(!array_key_exists('StateId', $_REQUEST)) $id
static _lookupTitle($a_id)
lookup object title
static _lookupInProgressForObject($a_obj_id, $a_user_ids=null)
Get in progress users for object.
static _isRegistered($a_usr_id, $a_event_id)
static _getAllReferences($a_id)
get all reference ids of object
static _hasParticipated($a_usr_id, $a_event_id)
static _lookupRegistrationEnabled($a_obj_id)
lookup registration enabled
static _lookupDescription($a_id)
lookup object description
static _lookupObjId($a_id)
determineStatus($a_obj_id, $a_user_id, $a_obj=null)
Determine status.
static _lookupCompletedForObject($a_obj_id, $a_user_ids=null)
Get completed users for object.
static _getStatusInfo($a_obj_id)
static _getInProgress($a_obj_id)
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 _getCompleted($a_obj_id)
static _lookupAppointment($a_obj_id)
lookup appointment
Abstract class ilLPStatus for all learning progress modes E.g ilLPStatusManual, ilLPStatusObjectives ...
Add data(end) time
Method that wraps PHPs time in order to allow simulations with the workflow.
static _lookupFailedForObject($a_obj_id, $a_user_ids=null)
Get failed users for object.
static getInstanceByObjId($a_obj_id)
Get instance by obj type.