protected function addItemDetails(ilObjectListGUI $a_item_list_gui, array $a_item)
 {
     global $lng, $ilCtrl;
     $item_ref_id = $a_item["ref_id"];
     if (is_array($this->objective_map)) {
         $details = array();
         if (isset($this->objective_map["material"][$item_ref_id])) {
             // #12965
             foreach ($this->objective_map["material"][$item_ref_id] as $objective_id) {
                 $ilCtrl->setParameterByClass('ilcourseobjectivesgui', 'objective_id', $objective_id);
                 $url = $ilCtrl->getLinkTargetByClass(array('illoeditorgui', 'ilcourseobjectivesgui'), 'edit');
                 $ilCtrl->setParameterByClass('ilcourseobjectivesgui', 'objective_id', '');
                 $details[] = array('desc' => $lng->txt('crs_loc_tab_materials') . ': ', 'target' => '_top', 'link' => $url, 'name' => $this->objective_map["names"][$objective_id]);
             }
         }
         if ($this->objective_map["test_i"] == $item_ref_id) {
             $ilCtrl->setParameterByClass('illoeditorgui', 'tt', 1);
             $details[] = array('desc' => '', 'target' => '_top', 'link' => $ilCtrl->getLinkTargetByClass('illoeditorgui', 'testOverview'), 'name' => $lng->txt('crs_loc_tab_itest'));
             $ilCtrl->setParameterByClass('illoeditorgui', 'tt', 0);
         }
         if ($this->objective_map["test_q"] == $item_ref_id) {
             $ilCtrl->setParameterByClass('illoeditorgui', 'tt', 2);
             $details[] = array('desc' => '', 'target' => '_top', 'link' => $ilCtrl->getLinkTargetByClass('illoeditorgui', 'testOverview'), 'name' => $lng->txt('crs_loc_tab_qtest'));
             $ilCtrl->setParameterByClass('illoeditorgui', 'tt', 0);
         }
         // #15367 - patch LOK
         if (is_array($this->objective_map["test_ass"][$item_ref_id])) {
             foreach ($this->objective_map["test_ass"][$item_ref_id] as $type => $items) {
                 if ($type == ilLOSettings::TYPE_TEST_INITIAL) {
                     $caption = $lng->txt('crs_loc_tab_itest');
                     $ilCtrl->setParameterByClass('illoeditorgui', 'tt', 1);
                 } else {
                     $caption = $lng->txt('crs_loc_tab_qtest');
                     $ilCtrl->setParameterByClass('illoeditorgui', 'tt', 2);
                 }
                 foreach ($items as $objtv_title) {
                     $details[] = array('desc' => '', 'target' => '_top', 'link' => $ilCtrl->getLinkTargetByClass('illoeditorgui', 'testsOverview'), 'name' => $caption . " (" . $this->lng->txt("crs_loc_learning_objective") . ": " . $objtv_title . ")");
                 }
                 $ilCtrl->setParameterByClass('illoeditorgui', 'tt', 0);
             }
         }
         if (sizeof($details)) {
             $a_item_list_gui->enableItemDetailLinks(true);
             $a_item_list_gui->setItemDetailLinks($details, $lng->txt('crs_loc_settings_tbl') . ': ');
         } else {
             $a_item_list_gui->enableItemDetailLinks(false);
         }
     }
     // order
     if ($this->getContainerGUI()->isActiveOrdering()) {
         $a_item_list_gui->enableCommands(true, true);
         $a_item_list_gui->enableProperties(false);
     } else {
         if (!$this->getContainerGUI()->isActiveAdministrationPanel()) {
             $a_item_list_gui->enableCommands(true, true);
             $a_item_list_gui->enableProperties(false);
         }
     }
     if ($a_item['objective_id']) {
         $a_item_list_gui->setDefaultCommandParameters(array('objective_id' => $a_item['objective_id']));
         if ($this->loc_settings->getQualifiedTest() == $a_item['ref_id']) {
             $a_item_list_gui->setConditionTarget($this->getContainerObject()->getRefId(), $a_item['objective_id'], 'lobj');
             // check conditions of target
             include_once './Services/AccessControl/classes/class.ilConditionHandler.php';
             $fullfilled = ilConditionHandler::_checkAllConditionsOfTarget($this->getContainerObject()->getRefId(), $a_item['objective_id'], 'lobj');
             if (!$fullfilled || $a_item['objective_status']) {
                 $a_item_list_gui->disableTitleLink(true);
             }
         }
         include_once './Modules/Course/classes/Objectives/class.ilLOUserResults.php';
         $res = ilLOUserResults::lookupResult($this->getContainerObject()->getId(), $GLOBALS['ilUser']->getId(), $a_item['objective_id'], ilLOUserResults::TYPE_QUALIFIED);
         $res = $this->updateResult($res, $a_item['ref_id'], $a_item['objective_id'], $GLOBALS['ilUser']->getId());
         if ($res['is_final']) {
             $a_item_list_gui->disableTitleLink(true);
             $a_item_list_gui->enableProperties(true);
             $a_item_list_gui->addCustomProperty($this->lng->txt('crs_loc_passes_reached'), '', true);
         } elseif ($this->loc_settings->getQualifiedTest() == $a_item['ref_id']) {
             include_once './Modules/Course/classes/class.ilCourseObjective.php';
             $poss_pass = ilCourseObjective::lookupMaxPasses($a_item['objective_id']);
             if ($poss_pass) {
                 $a_item_list_gui->enableProperties(true);
                 $a_item_list_gui->addCustomProperty($this->lng->txt('crs_loc_passes_left'), $poss_pass - $res['tries'] > 0 ? $poss_pass - $res['tries'] : 1, false);
             }
         }
     }
 }
 /**
  * Get timing details for list gui
  *
  * @param ilObjectListGUI $a_list_gui
  * @param array &$a_item
  * @return array caption, value
  */
 public static function addListGUIActivationProperty(ilObjectListGUI $a_list_gui, array &$a_item)
 {
     global $lng;
     self::addAdditionalSubItemInformation($a_item);
     if (isset($a_item['timing_type'])) {
         if (!isset($a_item['masked_start'])) {
             $start = $a_item['start'];
             $end = $a_item['end'];
         } else {
             $start = $a_item['masked_start'];
             $end = $a_item['masked_end'];
         }
         $activation = '';
         switch ($a_item['timing_type']) {
             case ilObjectActivation::TIMINGS_ACTIVATION:
                 $activation = ilDatePresentation::formatPeriod(new ilDateTime($start, IL_CAL_UNIX), new ilDateTime($end, IL_CAL_UNIX));
                 break;
             case ilObjectActivation::TIMINGS_PRESETTING:
                 $activation = ilDatePresentation::formatPeriod(new ilDate($start, IL_CAL_UNIX), new ilDate($end, IL_CAL_UNIX));
                 break;
         }
         if ($activation != "") {
             global $lng;
             $lng->loadLanguageModule('crs');
             $a_list_gui->addCustomProperty($lng->txt($a_item['activation_info']), $activation, false, true);
         }
     }
 }