function getPossibleStarters() { include_once "Services/Object/classes/class.ilObjectActivation.php"; foreach (ilObjectActivation::getItems($this->getRefId(), false) as $node) { switch ($node['type']) { case 'lm': case 'sahs': case 'svy': case 'tst': $poss_items[] = $node['ref_id']; break; } } return $poss_items ? $poss_items : array(); }
function setColumnSettings($column_gui) { global $ilAccess, $lng; $column_gui->setRepositoryMode(true); $column_gui->setEnableEdit(false); $column_gui->setBlockProperty("news", "title", $lng->txt("crs_news")); include_once "Services/Object/classes/class.ilObjectActivation.php"; $grouped_items = array(); foreach (ilObjectActivation::getItems($this->container_obj->getRefId()) as $item) { $grouped_items[$item["type"]][] = $item; } $column_gui->setRepositoryItems($grouped_items); if ($ilAccess->checkAccess("write", "", $this->container_obj->getRefId())) { $column_gui->setEnableEdit(true); } // Allow movement of blocks for tutors if ($this->is_tutor && $this->container_gui->isActiveAdministrationPanel()) { $column_gui->setEnableMovement(true); } // Configure Settings, if administration panel is on if ($this->is_tutor) { $column_gui->setBlockProperty("news", "settings", true); //$column_gui->setBlockProperty("news", "public_notifications_option", true); $column_gui->setBlockProperty("news", "default_visibility_option", true); $column_gui->setBlockProperty("news", "hide_news_block_option", true); } if ($this->container_gui->isActiveAdministrationPanel()) { $column_gui->setAdminCommands(true); } }
function __getOtherResources() { include_once 'Modules/Course/classes/class.ilCourseObjectiveMaterials.php'; $assigned = ilCourseObjectiveMaterials::_getAllAssignedMaterials($this->course_obj->getId()); foreach (ilObjectActivation::getItems($this->course_obj->getRefId(), false) as $node) { if (in_array($node['ref_id'], $assigned)) { continue; } if ($node['type'] == 'tst') { continue; } $all_lms[] = $node['ref_id']; } return $all_lms ? $all_lms : array(); }