function getItems() { $obj_ids = $this->obj_ids; if (!$obj_ids && !$this->details) { // restrict courses/groups to objects where current user is member $membership_ids = null; if ($this->filter["type"] == "crs" || $this->filter["type"] == "grp") { include_once "Services/Membership/classes/class.ilParticipants.php"; $membership_ids = ilParticipants::_getMembershipByType($this->tracked_user->getId(), $this->filter["type"]); } if ($membership_ids === null || sizeof($membership_ids)) { switch ($this->lp_context) { case ilLearningProgressGUI::LP_CONTEXT_ORG_UNIT: $obj_ids = $this->searchObjects($this->getCurrentFilter(true), null, $membership_ids); break; default: $obj_ids = $this->searchObjects($this->getCurrentFilter(true), "read", $membership_ids); break; } } } if ($obj_ids) { include_once "./Services/Tracking/classes/class.ilTrQuery.php"; switch ($this->mode) { case ilLPObjSettings::LP_MODE_SCORM: $data = ilTrQuery::getSCOsStatusForUser($this->tracked_user->getId(), $this->parent_obj_id, $obj_ids); break; case ilLPObjSettings::LP_MODE_OBJECTIVES: $data = ilTrQuery::getObjectivesStatusForUser($this->tracked_user->getId(), $obj_ids); break; case ilLPObjSettings::LP_MODE_COLLECTION_MANUAL: case ilLPObjSettings::LP_MODE_COLLECTION_TLT: $data = ilTrQuery::getSubItemsStatusForUser($this->tracked_user->getId(), $this->parent_obj_id, $obj_ids); break; default: $data = ilTrQuery::getObjectsStatusForUser($this->tracked_user->getId(), $obj_ids); foreach ($data as $idx => $item) { if (!$item["status"] && !$this->filter["status"] && !$this->details) { unset($data[$idx]); } else { $data[$idx]["offline"] = ilLearningProgressBaseGUI::isObjectOffline($item["obj_id"], $item["type"]); } } break; } $this->setData($data); } }