function getItems() { include_once "Services/Tracking/classes/class.ilTrQuery.php"; $res = ilTrQuery::getObjectTypeStatisticsPerMonth($this->filter["aggregation"], $this->filter["year"]); // get plugin titles include_once "./Services/Repository/classes/class.ilRepositoryObjectPluginSlot.php"; $plugins = array(); $plugins = ilRepositoryObjectPluginSlot::addCreatableSubObjects($plugins); $data = array(); foreach ($res as $type => $months) { $data[$type]["type"] = $type; // to enable sorting by title if (array_key_exists($type, $plugins)) { include_once "./Services/Component/classes/class.ilPlugin.php"; $data[$type]["title"] = ilPlugin::lookupTxt("rep_robj", $type, "obj_" . $type); $data[$type]["icon"] = ilObject::_getIcon("", "tiny", $type); } else { $data[$type]["title"] = $this->lng->txt("objs_" . $type); $data[$type]["icon"] = ilUtil::getTypeIconPath($type, null, "tiny"); } foreach ($months as $month => $row) { $value = $row[$this->filter["measure"]]; $data[$type]["month_" . $month] = $value; } } // add live data if ($this->filter["year"] == date("Y")) { $live = ilTrQuery::getObjectTypeStatistics(); foreach ($live as $type => $item) { $data[$type]["type"] = $type; // to enable sorting by title if (array_key_exists($type, $plugins)) { include_once "./Services/Component/classes/class.ilPlugin.php"; $data[$type]["title"] = ilPlugin::lookupTxt("rep_robj", $type, "obj_" . $type); $data[$type]["icon"] = ilObject::_getIcon("", "tiny", $type); } else { $data[$type]["title"] = $this->lng->txt("objs_" . $type); $data[$type]["icon"] = ilUtil::getTypeIconPath($type, null, "tiny"); } $value = $item[$this->filter["measure"]]; $data[$type]["month_live"] = $value; } } $this->setData($data); }