/** * Get objective items * * @param int $a_objective_id * @return array */ public static function getItemsByObjective($a_objective_id) { include_once './Modules/Course/classes/class.ilCourseObjectiveMaterials.php'; $item_ids = ilCourseObjectiveMaterials::_getAssignedMaterials($a_objective_id); return self::processListItems($item_ids); }
protected function buildObjectiveMap() { $objective_map = array(); include_once './Modules/Course/classes/class.ilCourseObjective.php'; // begin-patch lok if (count($objective_ids = ilCourseObjective::_getObjectiveIds($this->getContainerObject()->getId(), true))) { include_once './Modules/Course/classes/class.ilCourseObjectiveMaterials.php'; foreach ($objective_ids as $objective_id) { foreach (ilCourseObjectiveMaterials::_getAssignedMaterials($objective_id) as $mat_ref_id) { $objective_map["material"][$mat_ref_id][] = $objective_id; if (!isset($objective_map["names"][$objective_id])) { $objective = new ilCourseObjective($this->getContainerObject(), $objective_id); $objective_map["names"][$objective_id] = $objective->getTitle(); } } } // initial/qualifying test $tst = $this->loc_settings->getInitialTest(); if ($tst) { $objective_map["test_i"] = $tst; } $tst = $this->loc_settings->getQualifiedTest(); if ($tst) { $objective_map["test_q"] = $tst; } // patch LOK // objective test assignments include_once 'Modules/Course/classes/Objectives/class.ilLOSettings.php'; include_once 'Modules/Course/classes/Objectives/class.ilLOTestAssignments.php'; $ass_test = new ilLOTestAssignments($this->getContainerObject()->getId()); foreach ($ass_test->getAssignmentsByType(ilLOSettings::TYPE_TEST_INITIAL) as $ass) { $title = ilCourseObjective::lookupObjectiveTitle($ass->getObjectiveId()); $objective_map["test_ass"][$ass->getTestRefId()][$ass->getAssignmentType()][] = $title; } foreach ($ass_test->getAssignmentsByType(ilLOSettings::TYPE_TEST_QUALIFIED) as $ass) { $title = ilCourseObjective::lookupObjectiveTitle($ass->getObjectiveId()); $objective_map["test_ass"][$ass->getTestRefId()][$ass->getAssignmentType()][] = $title; } } return $objective_map; }
protected function buildObjectiveMap() { $objective_map = array(); include_once './Modules/Course/classes/class.ilCourseObjective.php'; // begin-patch lok if (count($objective_ids = ilCourseObjective::_getObjectiveIds($this->getContainerObject()->getId(), true))) { include_once './Modules/Course/classes/class.ilCourseObjectiveMaterials.php'; foreach ($objective_ids as $objective_id) { foreach (ilCourseObjectiveMaterials::_getAssignedMaterials($objective_id) as $mat_ref_id) { $objective_map["material"][$mat_ref_id][] = $objective_id; if (!isset($objective_map["names"][$objective_id])) { $objective = new ilCourseObjective($this->getContainerObject(), $objective_id); $objective_map["names"][$objective_id] = $objective->getTitle(); } } } // initial/qualifying test $tst = $this->loc_settings->getInitialTest(); if ($tst) { $objective_map["test_i"] = $tst; } $tst = $this->loc_settings->getQualifiedTest(); if ($tst) { $objective_map["test_q"] = $tst; } } return $objective_map; }