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)) { $obj_ids = $this->searchObjects($this->getCurrentFilter(true), "read", $membership_ids); } } if ($obj_ids) { include_once "./Services/Tracking/classes/class.ilTrQuery.php"; switch ($this->mode) { case LP_MODE_SCORM: $data = ilTrQuery::getSCOsStatusForUser($this->tracked_user->getId(), $this->parent_obj_id, $obj_ids); break; case LP_MODE_OBJECTIVES: $data = ilTrQuery::getObjectivesStatusForUser($this->tracked_user->getId(), $obj_ids); break; default: $data = ilTrQuery::getObjectsStatusForUser($this->tracked_user->getId(), $obj_ids); foreach ($data as $idx => $item) { if (!$item["status"] && !$this->filter["status"]) { unset($data[$idx]); } else { $data[$idx]["offline"] = ilLearningProgressBaseGUI::isObjectOffline($item["obj_id"], $item["type"]); } } break; } $this->setData($data); } }