public function executeCommand()
 {
     if ($this->isAccessDenied()) {
         $this->ilias->raiseError($this->lng->txt("permission_denied"), $this->ilias->error_obj->MESSAGE);
     }
     $nextClass = $this->ctrl->getNextClass();
     $this->manageTabs($nextClass);
     switch ($nextClass) {
         case 'ilassquestionskillassignmentsgui':
             $questionContainerId = $this->getQuestionContainerId();
             require_once 'Modules/TestQuestionPool/classes/class.ilAssQuestionList.php';
             $questionList = new ilAssQuestionList($this->db, $this->lng, $this->pluginAdmin);
             $questionList->setParentObjId($questionContainerId);
             $questionList->setQuestionInstanceTypeFilter($this->getRequiredQuestionInstanceTypeFilter());
             $questionList->load();
             $gui = new ilAssQuestionSkillAssignmentsGUI($this->ctrl, $this->access, $this->tpl, $this->lng, $this->db);
             $gui->setAssignmentEditingEnabled($this->isAssignmentEditingRequired());
             $gui->setQuestionContainerId($questionContainerId);
             $gui->setQuestionList($questionList);
             if ($this->testOBJ->isFixedTest()) {
                 $gui->setQuestionOrderSequence($this->testOBJ->getQuestions());
             } else {
                 $gui->setAssignmentConfigurationHintMessage($this->buildAssignmentConfigurationInPoolHintMessage());
             }
             $this->ctrl->forwardCommand($gui);
             break;
         case 'iltestskilllevelthresholdsgui':
             $gui = new ilTestSkillLevelThresholdsGUI($this->ctrl, $this->tpl, $this->lng, $this->db, $this->testOBJ->getTestId());
             $gui->setQuestionAssignmentColumnsEnabled(!$this->testOBJ->isRandomTest());
             $gui->setQuestionContainerId($this->getQuestionContainerId());
             $this->ctrl->forwardCommand($gui);
             break;
     }
 }
 public function executeCommand()
 {
     if ($this->isAccessDenied()) {
         $this->ilias->raiseError($this->lng->txt("permission_denied"), $this->ilias->error_obj->MESSAGE);
     }
     $nextClass = $this->ctrl->getNextClass();
     $this->manageTabs($nextClass);
     switch ($nextClass) {
         case 'ilassquestionskillassignmentsgui':
             require_once 'Modules/TestQuestionPool/classes/class.ilAssQuestionList.php';
             $questionList = new ilAssQuestionList($this->db, $this->lng, $this->pluginAdmin);
             $questionList->setParentObjId($this->poolOBJ->getId());
             $questionList->setQuestionInstanceTypeFilter(ilAssQuestionList::QUESTION_INSTANCE_TYPE_ORIGINALS);
             $questionList->load();
             $gui = new ilAssQuestionSkillAssignmentsGUI($this->ctrl, $this->access, $this->tpl, $this->lng, $this->db);
             $gui->setAssignmentEditingEnabled(true);
             $gui->setQuestionContainerId($this->poolOBJ->getId());
             $gui->setQuestionList($questionList);
             $this->ctrl->forwardCommand($gui);
             break;
         case 'ilassquestionskillusagestablegui':
             $gui = new ilAssQuestionSkillUsagesTableGUI($this->ctrl, $this->tpl, $this->lng, $this->db, $this->poolOBJ->getId());
             $this->ctrl->forwardCommand($gui);
             break;
     }
 }
예제 #3
0
 /**
  * 
  */
 public function performMergeThreadsObject()
 {
     /**
      * @var $lng ilLanguage
      */
     global $lng;
     if (!$this->is_moderator) {
         $this->ilias->raiseError($this->lng->txt('permission_denied'), $this->ilias->error_obj->MESSAGE);
     }
     if (!isset($_POST['thread_ids']) || !is_array($_POST['thread_ids']) || count($_POST['thread_ids']) != 2) {
         ilUtil::sendFailure($this->lng->txt('select_one'));
         $this->showThreadsObject();
         return;
     }
     if ((int) $_POST['thread_ids'][0] == (int) $_POST['thread_ids'][1]) {
         ilUtil::sendFailure($this->lng->txt('error_same_thread_ids'));
         $this->showThreadsObject();
         return;
     }
     try {
         ilForum::mergeThreads($this->object->id, (int) $_POST['thread_ids'][0], (int) $_POST['thread_ids'][1]);
         ilUtil::sendSuccess($this->lng->txt('merged_threads_successfully'));
     } catch (ilException $e) {
         return ilUtil::sendFailure($lng->txt($e->getMessage()));
     }
     $this->showThreadsObject();
 }
 public function executeCommand()
 {
     if ($this->isAccessDenied()) {
         $this->ilias->raiseError($this->lng->txt("permission_denied"), $this->ilias->error_obj->MESSAGE);
     }
     $nextClass = $this->ctrl->getNextClass();
     $this->manageTabs($nextClass);
     switch ($nextClass) {
         case 'iltestskillquestionassignmentsgui':
             $gui = new ilTestSkillQuestionAssignmentsGUI($this->ctrl, $this->tpl, $this->lng, $this->db, $this->testOBJ);
             $this->ctrl->forwardCommand($gui);
             break;
         case 'iltestskilllevelthresholdsgui':
             $gui = new ilTestSkillLevelThresholdsGUI($this->ctrl, $this->tpl, $this->lng, $this->db, $this->testOBJ);
             $this->ctrl->forwardCommand($gui);
             break;
     }
 }
 public function infoScreen()
 {
     /**
      * @var $ilAccess ilAccessHandler
      */
     global $ilAccess;
     if (!$ilAccess->checkAccess('visible', '', $this->object->getRefId())) {
         $this->ilias->raiseError($this->lng->txt('msg_no_perm_read'), $this->ilias->error_obj->MESSAGE);
     }
     include_once 'Services/InfoScreen/classes/class.ilInfoScreenGUI.php';
     $info = new ilInfoScreenGUI($this);
     $info->enablePrivateNotes();
     // standard meta data
     $info->addMetaDataSections($this->object->getId(), 0, $this->object->getType());
     // forward the command
     $this->ctrl->forwardCommand($info);
 }