/** * Command Execution */ public function executeCommand() { // allow only write access if (!$this->access->checkAccess('write', '', $this->testGUI->ref_id)) { ilUtil::sendInfo($this->lng->txt('cannot_edit_test'), true); $this->ctrl->redirect($this->testGUI, 'infoScreen'); } // process command $nextClass = $this->ctrl->getNextClass(); switch ($nextClass) { default: $cmd = $this->ctrl->getCmd(self::CMD_SHOW_FORM) . 'Cmd'; $this->{$cmd}(); } }
/** * Command Execution */ public function executeCommand() { // allow only write access if (!$this->access->checkAccess('write', '', $this->poolGUI->ref_id)) { ilUtil::sendInfo($this->lng->txt('cannot_edit_question_pool'), true); $this->ctrl->redirectByClass('ilObjQuestionPoolGUI', 'infoScreen'); } // activate corresponding tab (auto activation does not work in ilObjTestGUI-Tabs-Salad) $this->tabs->activateTab('settings'); // process command $nextClass = $this->ctrl->getNextClass(); switch ($nextClass) { default: $cmd = $this->ctrl->getCmd(self::CMD_SHOW_FORM) . 'Cmd'; $this->{$cmd}(); } }
/** * returns the fact wether the feedback editing form has to be saveable or not. * this depends on the additional content editing mode and the current question type, * as well as on fact wether the question is writable for current user or not, * or the fact if we are in self assessment mode or not * * @access private * @return boolean $isFormSaveable */ private function isFormSaveable() { $isAdditionalContentEditingModePageObject = $this->questionOBJ->isAdditionalContentEditingModePageObject(); $isSaveableInPageObjectEditingMode = $this->feedbackOBJ->isSaveableInPageObjectEditingMode(); if ($isAdditionalContentEditingModePageObject && !$isSaveableInPageObjectEditingMode) { return false; } $hasWriteAccess = $this->access->checkAccess("write", "", $_GET['ref_id']); $isSelfAssessmentEditingMode = $this->questionOBJ->getSelfAssessmentEditingMode(); return $hasWriteAccess || $isSelfAssessmentEditingMode; }
/** * Command Execution */ public function executeCommand() { // allow only write access if (!$this->access->checkAccess("write", "", $this->testOBJ->getRefId())) { ilUtil::sendInfo($this->lng->txt("cannot_edit_test"), true); $this->ctrl->redirectByClass('ilObjTestGUI', "infoScreen"); } // activate corresponding tab (auto activation does not work in ilObjTestGUI-Tabs-Salad) $this->tabs->activateTab('assQuestions'); // process command $nextClass = $this->ctrl->getNextClass(); switch ($nextClass) { default: $cmd = $this->ctrl->getCmd(self::CMD_SHOW_FORM) . 'Cmd'; $this->{$cmd}(); } }
public function executeCommand() { if (!$this->access->checkAccess("write", "", $this->testOBJ->getRefId())) { ilUtil::sendFailure($this->lng->txt("cannot_edit_test"), true); $this->ctrl->redirectByClass('ilObjTestGUI', "infoScreen"); } if ($this->isAvoidManipulationRedirectRequired()) { ilUtil::sendFailure($this->lng->txt("tst_msg_cannot_modify_random_question_set_conf_due_to_part"), true); $this->ctrl->redirect($this); } $this->handleTabs(); $nextClass = $this->ctrl->getNextClass(); switch ($nextClass) { case 'ilTestRandomQuestionSetPoolDefinitionFormGUI': $formGUI = new ilTestRandomQuestionSetPoolDefinitionFormGUI($this->ctrl, $this->lng, $this->testOBJ, $this, $this->questionSetConfig); $this->ctrl->forwardCommand($formGUI); break; default: $cmd = $this->ctrl->getCmd(self::CMD_SHOW_GENERAL_CONFIG_FORM) . 'Cmd'; $this->{$cmd}(); } }