protected function getObjectivesStatus($a_set_errors = true)
 {
     if (!$this->getObjectivesAvailableStatus($a_set_errors)) {
         return false;
     }
     include_once './Modules/Course/classes/class.ilCourseObjective.php';
     $num_active = ilCourseObjective::_getCountObjectives($this->getParentObject()->getId(), true);
     if (!$num_active) {
         if ($a_set_errors) {
             $this->appendFailure(self::SECTION_OBJECTIVES, 'crs_loc_err_no_active_lo');
         }
         return false;
     }
     foreach (ilCourseObjective::_getObjectiveIds($this->getParentObject()->getId(), true) as $objective_id) {
         include_once './Modules/Course/classes/class.ilCourseObjectiveMaterials.php';
         $obj = new ilCourseObjectiveMaterials($objective_id);
         if (!count($obj->getMaterials())) {
             if ($a_set_errors) {
                 $this->appendFailure(self::SECTION_OBJECTIVES, 'crs_loc_err_no_active_mat');
             }
             return false;
         }
     }
     // check for assigned initial test questions
     if ($this->getSettings()->worksWithInitialTest() && !$this->getSettings()->hasSeparateInitialTests()) {
         // check for assigned questions
         if (!$this->lookupQuestionsAssigned($this->getSettings()->getInitialTest())) {
             if ($a_set_errors) {
                 $this->appendFailure(self::SECTION_OBJECTIVES, 'crs_loc_err_no_active_qst');
             }
             return false;
         }
     }
     // check for assigned questions
     if (!$this->getSettings()->hasSeparateQualifiedTests() and !$this->lookupQuestionsAssigned($this->getSettings()->getQualifiedTest())) {
         if ($a_set_errors) {
             $this->appendFailure(self::SECTION_OBJECTIVES, 'crs_loc_err_no_active_qst');
         }
         return false;
     }
     // @deprecated
     /*
     if(!$this->checkNumberOfTries())
     {
     	if($a_set_errors)
     	{
     		$this->appendFailure(self::SECTION_OBJECTIVES, 'crs_loc_err_nr_tries_exceeded');
     	}
     	return false;
     }
     */
     return true;
 }
 /**
  * Get tabs
  */
 function getTabs(&$tabs_gui)
 {
     global $rbacsystem, $ilAccess, $ilUser, $lng, $ilHelp;
     $ilHelp->setScreenIdComponent("crs");
     $this->ctrl->setParameter($this, "ref_id", $this->ref_id);
     if ($ilAccess->checkAccess('read', '', $this->ref_id)) {
         $tabs_gui->addTab('view_content', $lng->txt("content"), $this->ctrl->getLinkTarget($this, ''));
     }
     // learning objectives
     if ($ilAccess->checkAccess('write', '', $this->ref_id)) {
         include_once './Modules/Course/classes/class.ilCourseObjective.php';
         if ($this->object->getViewMode() == IL_CRS_VIEW_OBJECTIVE or ilCourseObjective::_getCountObjectives($this->object->getId())) {
             $tabs_gui->addTarget('crs_objectives', $this->ctrl->getLinkTargetByClass('illoeditorgui', ''), 'illoeditorgui');
         }
     }
     if ($ilAccess->checkAccess('visible', '', $this->ref_id)) {
         //$next_class = $this->ctrl->getNextClass($this);
         // this is not nice. tabs should be displayed in ilcoursegui
         // not via ilrepositorygui, then next_class == ilinfoscreengui
         // could be checked
         $force_active = strtolower($_GET["cmdClass"]) == "ilinfoscreengui" || strtolower($_GET["cmdClass"]) == "ilnotegui" ? true : false;
         $tabs_gui->addTarget("info_short", $this->ctrl->getLinkTargetByClass(array("ilobjcoursegui", "ilinfoscreengui"), "showSummary"), "infoScreen", "", "", $force_active);
     }
     if ($ilAccess->checkAccess('write', '', $this->ref_id)) {
         $force_active = strtolower($_GET["cmdClass"]) == "ilconditionhandlergui" && $_GET["item_id"] == "" ? true : false;
         $tabs_gui->addTarget("settings", $this->ctrl->getLinkTarget($this, "edit"), array("edit", "editMapSettings", "editCourseIcons", "listStructure"), "", "", $force_active);
     }
     $is_participant = ilCourseParticipants::_isParticipant($this->ref_id, $ilUser->getId());
     include_once './Services/Mail/classes/class.ilMail.php';
     $mail = new ilMail($GLOBALS['ilUser']->getId());
     // member list
     if ($ilAccess->checkAccess('write', '', $this->ref_id)) {
         $tabs_gui->addTarget("members", $this->ctrl->getLinkTarget($this, "members"), "members", get_class($this));
     } elseif ($this->object->getShowMembers() == $this->object->SHOW_MEMBERS_ENABLED and $is_participant) {
         $tabs_gui->addTarget("members", $this->ctrl->getLinkTarget($this, "membersGallery"), "members", get_class($this));
     } elseif ($this->object->getMailToMembersType() == ilCourseConstants::MAIL_ALLOWED_ALL and $GLOBALS['rbacsystem']->checkAccess('internal_mail', $mail->getMailObjectReferenceId()) and $is_participant) {
         $tabs_gui->addTarget("members", $this->ctrl->getLinkTarget($this, "mailMembers"), "members", get_class($this));
     }
     // learning progress
     include_once './Services/Tracking/classes/class.ilLearningProgressAccess.php';
     if (ilLearningProgressAccess::checkAccess($this->object->getRefId(), $is_participant)) {
         $tabs_gui->addTarget('learning_progress', $this->ctrl->getLinkTargetByClass(array('ilobjcoursegui', 'illearningprogressgui'), ''), '', array('illplistofobjectsgui', 'illplistofsettingsgui', 'illearningprogressgui', 'illplistofprogressgui'));
     }
     // license overview
     include_once "Services/License/classes/class.ilLicenseAccess.php";
     if ($ilAccess->checkAccess('edit_permission', '', $this->ref_id) and ilLicenseAccess::_isEnabled()) {
         $tabs_gui->addTarget("licenses", $this->ctrl->getLinkTargetByClass('illicenseoverviewgui', ''), "", "illicenseoverviewgui");
     }
     // lom meta data
     if ($ilAccess->checkAccess('write', '', $this->ref_id)) {
         $tabs_gui->addTarget("meta_data", $this->ctrl->getLinkTargetByClass(array('ilobjcoursegui', 'ilmdeditorgui'), 'listSection'), "", "ilmdeditorgui");
     }
     if ($ilAccess->checkAccess('write', '', $this->object->getRefId())) {
         $tabs_gui->addTarget('export', $this->ctrl->getLinkTargetByClass('ilexportgui', ''), 'export', 'ilexportgui');
     }
     if ($ilAccess->checkAccess('edit_permission', '', $this->ref_id)) {
         $tabs_gui->addTarget("perm_settings", $this->ctrl->getLinkTargetByClass(array(get_class($this), 'ilpermissiongui'), "perm"), array("perm", "info", "owner"), 'ilpermissiongui');
     }
     if ($this->ctrl->getTargetScript() == "adm_object.php") {
         $tabs_gui->addTarget("show_owner", $this->ctrl->getLinkTarget($this, "owner"), "owner", get_class($this));
         if ($this->tree->getSavedNodeData($this->ref_id)) {
             $tabs_gui->addTarget("trash", $this->ctrl->getLinkTarget($this, "trash"), "trash", get_class($this));
         }
     }
     // Join/Leave
     if ($ilAccess->checkAccess('join', '', $this->ref_id) and !$this->object->getMemberObject()->isAssigned()) {
         include_once './Modules/Course/classes/class.ilCourseWaitingList.php';
         if (ilCourseWaitingList::_isOnList($ilUser->getId(), $this->object->getId())) {
             $tabs_gui->addTab('leave', $this->lng->txt('membership_leave'), $this->ctrl->getLinkTargetByClass('ilcourseregistrationgui', 'show', ''));
         } else {
             $tabs_gui->addTarget("join", $this->ctrl->getLinkTargetByClass('ilcourseregistrationgui', "show"), 'show', "");
         }
     }
     if ($ilAccess->checkAccess('leave', '', $this->object->getRefId()) and $this->object->getMemberObject()->isMember()) {
         $tabs_gui->addTarget("crs_unsubscribe", $this->ctrl->getLinkTarget($this, "unsubscribe"), 'leave', "");
     }
 }