/** * @return mixed */ public function executeCommand() { /** * @var $ilAccessHandler */ global $ilAccess; if (!$ilAccess->checkAccess('write', '', $this->ref_id)) { ilUtil::sendFailure($this->lng->txt('cannot_edit_test'), true); $this->ctrl->redirectByClass('ilobjtestgui', 'infoScreen'); } require_once 'Modules/Test/classes/class.ilObjAssessmentFolder.php'; if (!ilObjAssessmentFolder::_mananuallyScoreableQuestionTypesExists()) { ilUtil::sendFailure($this->lng->txt('manscoring_not_allowed'), true); $this->ctrl->redirectByClass('ilobjtestgui', 'infoScreen'); } $cmd = $this->ctrl->getCmd(); $next_class = $this->ctrl->getNextClass($this); if (strlen($cmd) == 0) { $this->ctrl->redirect($this, 'manscoring'); } $cmd = $this->getCommand($cmd); $this->buildSubTabs('man_scoring_by_qst'); switch ($next_class) { default: $ret = $this->{$cmd}(); break; } return $ret; }
/** * execute command */ function &executeCommand() { global $ilAccess; if (!$ilAccess->checkAccess("write", "", $this->ref_id)) { // allow only write access ilUtil::sendFailure($this->lng->txt("cannot_edit_test"), true); $this->ctrl->redirectByClass("ilobjtestgui", "infoScreen"); } require_once 'Modules/Test/classes/class.ilObjAssessmentFolder.php'; if (!ilObjAssessmentFolder::_mananuallyScoreableQuestionTypesExists()) { // allow only if at least one question type is marked for manual scoring ilUtil::sendFailure($this->lng->txt("manscoring_not_allowed"), true); $this->ctrl->redirectByClass("ilobjtestgui", "infoScreen"); } $cmd = $this->ctrl->getCmd(); $next_class = $this->ctrl->getNextClass($this); if (strlen($cmd) == 0) { $this->ctrl->redirect($this, "manscoring"); } $cmd = $this->getCommand($cmd); switch ($next_class) { default: $ret =& $this->{$cmd}(); break; } return $ret; }