3 declare(strict_types=0);
38 $members = self::getMembers($status_info[
'crs_id'],
true);
59 if (!$status_info[
'registration']) {
63 if ($status_info[
'starting_time'] < time()) {
68 return $status_info[
'registered_users'] ?: array();
74 return $status_info[
'participated_users'] ?: array();
79 $tree =
$GLOBALS[
'DIC']->repositoryTree();
84 $member_ref_id = null;
85 if (
$id = $tree->checkForParentType(
$ref_id,
'grp')) {
87 } elseif (
$id = $tree->checkForParentType(
$ref_id,
'crs')) {
91 $status_info = array();
100 $status_info[
'starting_time'] = $time_info[
'start'];
101 $status_info[
'ending_time'] = $time_info[
'end'];
102 $status_info[
'fullday'] = $time_info[
'fullday'];
123 $status = self::LP_STATUS_NOT_ATTEMPTED_NUM;
124 switch ($this->ilObjDataCache->lookupType($a_obj_id)) {
136 if ($registration && $time_info[
'start'] >= time()) {
142 $status = self::LP_STATUS_IN_PROGRESS_NUM;
149 $status = self::LP_STATUS_COMPLETED_NUM;
161 bool $a_is_crs_id =
false 164 $tree =
$GLOBALS[
'DIC']->repositoryTree();
168 $member_ref_id = null;
169 if (
$id = $tree->checkForParentType(
$ref_id,
'grp')) {
170 $member_ref_id =
$id;
171 } elseif (
$id = $tree->checkForParentType(
$ref_id,
'crs')) {
172 $member_ref_id =
$id;
178 $member_obj_id = $a_obj_id;
182 return $member_obj->getMembers();
190 ?array $a_user_ids = null
193 $a_user_ids = self::getMembers($a_obj_id);
198 return self::_lookupStatusForObject(
200 self::LP_STATUS_COMPLETED_NUM,
210 ?array $a_user_ids = null
220 ?array $a_user_ids = null
223 $a_user_ids = self::getMembers($a_obj_id);
228 return self::_lookupStatusForObject(
230 self::LP_STATUS_IN_PROGRESS_NUM,
static _getCompleted(int $a_obj_id)
Static function to read the users who have the status 'completed'.
static getMembers(int $a_obj_id, bool $a_is_crs_id=false)
Get members for object.
static _lookupFailedForObject(int $a_obj_id, ?array $a_user_ids=null)
Get failed users for object.
static _getParticipated(int $a_event_id)
static _getStatusInfo(int $a_obj_id)
Reads informations about the object e.g test results, tlt, number of visits.
static _getAllReferences(int $id)
get all reference ids for object ID
static getInstanceByObjId(int $a_obj_id)
Get instance by obj type.
static _getInProgress(int $a_obj_id)
static _lookupRegistrationEnabled(int $a_obj_id)
static _hasParticipated(int $a_usr_id, int $a_event_id)
static _getInProgress(int $a_obj_id)
Static function to read users who have the status 'in_progress'.
static _lookupObjId(int $ref_id)
static _lookupAppointment(int $a_obj_id)
static _isRegistered(int $a_usr_id, int $a_event_id)
static _lookupTitle(int $obj_id)
determineStatus(int $a_obj_id, int $a_usr_id, object $a_obj=null)
static _getStatusInfo(int $a_obj_id)
if(!defined('PATH_SEPARATOR')) $GLOBALS['_PEAR_default_error_mode']
static _lookupInProgressForObject(int $a_obj_id, ?array $a_user_ids=null)
Get in progress users for object.
static _lookupDescription(int $obj_id)
ilObjectDataCache $ilObjDataCache
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
static _getNotAttempted(int $a_obj_id)
static _getRegistered(int $a_event_id)
static _lookupCompletedForObject(int $a_obj_id, ?array $a_user_ids=null)
Get completed users for object.
static _getCompleted(int $a_obj_id)