3 declare(strict_types=0);
    18         $members = self::getMembers($a_obj_id);
    40         $usr_ids = (array) ($objective_results[
'user_status'][self::LP_STATUS_IN_PROGRESS_NUM] ?? []);
    44             $usr_ids = array_intersect(self::getMembers($a_obj_id), $usr_ids);
    57         $usr_ids = (array) ($objective_results[
'user_status'][self::LP_STATUS_COMPLETED_NUM] ?? []);
    61             $usr_ids = array_intersect(self::getMembers($a_obj_id), $usr_ids);
    64         return $usr_ids ?: array();
    70         $usr_ids = (array) ($objective_results[
'user_status'][self::LP_STATUS_FAILED_NUM] ?? []);
    74             $usr_ids = array_intersect(self::getMembers($a_obj_id), $usr_ids);
    86         $status_info = array();
    87         $status_info[
'user_status'] = array();
    92         $status_info[
'num_objectives'] = count($status_info[
'objectives']);
    94         if ($status_info[
'num_objectives']) {
    97                 $status_info[
'objectives'],
   104                 $status_info[
'objectives']
   105             ) as $user_id => $user_status) {
   106                 $status_info[
'user_status'][$user_status][] = $user_id;
   118                         $status_info[
'user_status'][ilLPStatus::LP_STATUS_IN_PROGRESS_NUM]
   125             $query = 
"SELECT * FROM crs_objectives WHERE " . $in;
   128                 $status_info[
'objective_title'][$row->objective_id] = $row->title;
   129                 $status_info[
'objective_description'][$row->objective_id] = $row->description;
   150         $status = self::LP_STATUS_NOT_ATTEMPTED_NUM;
   151         switch ($this->ilObjDataCache->lookupType($a_obj_id)) {
   155                     $status = self::LP_STATUS_IN_PROGRESS_NUM;
   168                         if ($objtv_status !== null) {
   169                             $status = $objtv_status;
   185         return $member_obj->getMembers();
   193         ?array $a_user_ids = null
   196             $a_user_ids = self::getMembers($a_obj_id);
   201         return self::_lookupStatusForObject(
   203             self::LP_STATUS_COMPLETED_NUM,
   213         ?array $a_user_ids = null
   223         ?array $a_user_ids = null
   226             $a_user_ids = self::getMembers($a_obj_id);
   231         return self::_lookupStatusForObject(
   233             self::LP_STATUS_IN_PROGRESS_NUM,
 
static _getFailed(int $a_obj_id)
 
static _getCompleted(int $a_obj_id)
 
static getSummarizedObjectiveStatusForLP(int $a_obj_id, array $a_objective_ids, int $a_user_id=0)
 
static _getCompleted(int $a_obj_id)
Static function to read the users who have the status 'completed'. 
 
static _getStatusInfo(int $a_obj_id)
Reads informations about the object e.g test results, tlt, number of visits. 
 
const LP_STATUS_IN_PROGRESS_NUM
 
static hasAccessed(int $a_obj_id, int $a_usr_id)
Has accessed. 
 
static _getObjectiveIds(int $course_id, bool $a_activated_only=false)
 
static _getStatusInfo(int $a_obj_id)
 
static _getInProgress(int $a_obj_id)
Static function to read users who have the status 'in_progress'. 
 
static lookupUsersInProgress(int $a_obj_id)
 
determineStatus(int $a_obj_id, int $a_usr_id, object $a_obj=null)
 
static _getInProgress(int $a_obj_id)
 
static _getInstanceByObjId(int $a_obj_id)
 
static _getFailed(int $a_obj_id)
Static function to read the users who have the status 'completed'. 
 
static getMembers(int $a_obj_id)
 
static _lookupCompletedForObject(int $a_obj_id, ?array $a_user_ids=null)
Get completed users for object. 
 
static _getNotAttempted(int $a_obj_id)
 
static _lookupInProgressForObject(int $a_obj_id, ?array $a_user_ids=null)
Get in progress users for object. 
 
static _lookupFailedForObject(int $a_obj_id, ?array $a_user_ids=null)
Get failed users for object.