コード例 #1
0
 /**
  * material assignment
  *
  * @access protected
  * @return
  */
 protected function materialAssignment()
 {
     global $ilAccess, $ilErr, $tpl;
     if (!$ilAccess->checkAccess('write', '', $this->course_obj->getRefId())) {
         $ilErr->raiseError($this->lng->txt('permission_denied'), $ilErr->WARNING);
     }
     if (!$_GET['objective_id']) {
         ilUtil::sendFailure($this->lng->txt('crs_no_objective_selected'), true);
         $this->ctrl->redirect($this, 'listObjectives');
     }
     $this->ctrl->saveParameter($this, 'objective_id');
     $this->objective = new ilCourseObjective($this->course_obj, (int) $_GET['objective_id']);
     include_once './Modules/Course/classes/class.ilCourseObjectiveMaterialAssignmentTableGUI.php';
     $table = new ilCourseObjectiveMaterialAssignmentTableGUI($this, $this->course_obj, (int) $_GET['objective_id']);
     $table->setTitle($this->lng->txt('crs_objective_wiz_materials'), 'icon_lobj.png', $this->lng->txt('crs_objectives'));
     include_once 'Modules/Course/classes/class.ilCourseObjectiveMaterials.php';
     $table->parse(ilCourseObjectiveMaterials::_getAssignableMaterials($this->course_obj->getRefId()));
     $this->__initQuestionObject((int) $_GET['objective_id']);
     $w_tpl = $this->initWizard(2);
     $w_tpl->setVariable('WIZ_CONTENT', $table->getHTML());
     $tpl->setContent($w_tpl->get());
 }