Example #1
0
 /**
  * List all abvailable objectives
  */
 protected function listObjectives()
 {
     global $ilToolbar;
     $GLOBALS['ilTabs']->activateSubTab('objectives');
     $objectives = ilCourseObjective::_getObjectiveIds($this->getParentObject()->getId(), FALSE);
     if (!count($objectives)) {
         return $this->showObjectiveCreation();
     }
     $ilToolbar->addButton($this->lng->txt('crs_add_objective'), $this->ctrl->getLinkTargetByClass('ilcourseobjectivesgui', "create"));
     include_once './Modules/Course/classes/class.ilCourseObjectivesTableGUI.php';
     $table = new ilCourseObjectivesTableGUI($this, $this->getParentObject());
     $table->setTitle($this->lng->txt('crs_objectives'), '', $this->lng->txt('crs_objectives'));
     $table->parse($objectives);
     $GLOBALS['tpl']->setContent($table->getHTML());
     $this->showStatus(ilLOEditorStatus::SECTION_OBJECTIVES);
 }
 /**
  * list objectives
  *
  * @access protected
  * @param
  * @return
  */
 protected function listObjectives()
 {
     global $ilAccess, $ilErr, $ilObjDataCache, $ilToolbar;
     $_SESSION['objective_mode'] = self::MODE_UNDEFINED;
     if (!$ilAccess->checkAccess("write", '', $this->course_obj->getRefId())) {
         $this->ilErr->raiseError($this->lng->txt("msg_no_perm_write"), $this->ilErr->MESSAGE);
     }
     $this->tpl->addBlockFile('ADM_CONTENT', 'adm_content', 'tpl.crs_objectives.html', 'Modules/Course');
     $ilToolbar->addButton($this->lng->txt('crs_add_objective'), $this->ctrl->getLinkTarget($this, "'create"));
     include_once './Modules/Course/classes/class.ilCourseObjectivesTableGUI.php';
     $table = new ilCourseObjectivesTableGUI($this, $this->course_obj);
     $table->setTitle($this->lng->txt('crs_objectives'), 'icon_lobj.png', $this->lng->txt('crs_objectives'));
     $table->parse(ilCourseObjective::_getObjectiveIds($this->course_obj->getId()));
     $this->tpl->setVariable('OBJECTIVES_TABLE', $table->getHTML());
 }