本文整理汇总了PHP中ilCtrl::redirectByClass方法的典型用法代码示例。如果您正苦于以下问题:PHP ilCtrl::redirectByClass方法的具体用法?PHP ilCtrl::redirectByClass怎么用?PHP ilCtrl::redirectByClass使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ilCtrl
的用法示例。
在下文中一共展示了ilCtrl::redirectByClass方法的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: executeCommand
/**
* execute command
*/
public function executeCommand()
{
$setting = new ilSetting('assessment');
if (!(bool) $setting->get('assessment_adjustments_enabled', false)) {
$this->ctrl->redirectByClass('ilObjTestGUI');
}
$cmd = $this->ctrl->getCmd();
$next_class = $this->ctrl->getNextClass($this);
switch ($next_class) {
default:
return $this->dispatchCommand($cmd);
}
}
示例2: checkPermission
/**
* Check permission of user
* Redirect to course if permission check fails
*
*/
protected function checkPermission()
{
if (!$this->access->checkAccess('write', '', $this->ref_id)) {
$this->ctrl->setParameterByClass('ilrepositorygui', 'ref_id', $this->ref_id);
ilUtil::sendFailure($this->pl->txt('msg_no_permission_certificates'), true);
$this->ctrl->redirectByClass('ilrepositorygui');
}
}
示例3: executeCommand
/**
* 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}();
}
}
示例4: redirectToRefId
protected function redirectToRefId($a_ref_id, $a_cmd = "")
{
$obj_type = ilObject::_lookupType($a_ref_id, true);
if ($obj_type != "orgu") {
parent::redirectToRefId($a_ref_id, $a_cmd);
} else {
$this->ctrl->setParameterByClass("ilObjOrgUnitGUI", "ref_id", $a_ref_id);
$this->ctrl->redirectByClass("ilObjOrgUnitGUI", $a_cmd);
}
}
示例5: accessDenied
protected function accessDenied()
{
if (!$this->ctrl->isAsynch()) {
ilUtil::sendFailure($this->lng->txt('dcl_msg_no_perm_edit'), true);
$this->ctrl->redirectByClass('ildatacollectionrecordlistgui', 'listRecords');
} else {
echo $this->lng->txt('dcl_msg_no_perm_edit');
exit;
}
}
示例6: delete
public function delete()
{
$mainTableId = $this->table->getCollectionObject()->getMainTableId();
if ($mainTableId == $this->table->getId()) {
ilUtil::sendFailure($this->lng->txt("dcl_cant_delete_main_table"), true);
} else {
$this->ctrl->setParameterByClass("ildatacollectionfieldlistgui", "table_id", $mainTableId);
}
$this->table->doDelete();
$this->ctrl->redirectByClass("ildatacollectionfieldlistgui", "listFields");
}
示例7: executeCommand
public function executeCommand()
{
if (!$this->checkPermission()) {
ilUtil::sendFailure($this->pl->txt('msg_no_permission'), true);
$this->ctrl->redirectByClass('ilpersonaldesktopgui');
}
if (iLCertificatePlugin::getBaseClass() == 'ilUIPluginRouterGUI') {
$this->tpl->getStandardTemplate();
}
$cmd = $this->ctrl->getCmd('index');
switch ($cmd) {
case 'index':
$this->index();
break;
case 'applyFilter':
$this->applyFilter();
break;
case 'resetFilter':
$this->resetFilter();
break;
case 'downloadCertificate':
$this->downloadCertificate();
break;
case 'downloadCertificates':
$this->downloadCertificates();
break;
case 'buildActions':
$this->buildActions();
break;
default:
$this->performCommand($cmd);
}
if (iLCertificatePlugin::getBaseClass() == 'ilUIPluginRouterGUI') {
$this->tpl->show();
}
}
示例8: executeCommand
/**
* 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}();
}
}
示例9: outCorrectSolution
/**
* Creates an output of the solution of an answer compared to the correct solution
*
* @access public
*/
protected function outCorrectSolution()
{
if (!$this->object->getShowSolutionDetails()) {
ilUtil::sendInfo($this->lng->txt("no_permission"), true);
$this->ctrl->redirectByClass("ilobjtestgui", "infoScreen");
}
$testSession = $this->testSessionFactory->getSession();
$activeId = $testSession->getActiveId();
if (!($activeId > 0)) {
$this->ctrl->redirectByClass("ilobjtestgui", "infoScreen");
}
$this->ctrl->saveParameter($this, "pass");
$pass = (int) $_GET['pass'];
$questionId = (int) $_GET['evaluation'];
if ($this->getObjectiveOrientedContainer()->isObjectiveOrientedPresentationRequired()) {
$testSequence = $this->testSequenceFactory->getSequenceByActiveIdAndPass($activeId, $pass);
$testSequence->loadFromDb();
$testSequence->loadQuestions();
require_once 'Modules/Course/classes/Objectives/class.ilLOTestQuestionAdapter.php';
$objectivesAdapter = ilLOTestQuestionAdapter::getInstance($testSession);
$objectivesList = $this->buildQuestionRelatedObjectivesList($objectivesAdapter, $testSequence);
$objectivesList->loadObjectivesTitles();
} else {
$objectivesList = null;
}
global $ilTabs;
if ($this instanceof ilTestEvalObjectiveOrientedGUI) {
$ilTabs->setBackTarget($this->lng->txt("tst_back_to_virtual_pass"), $this->ctrl->getLinkTarget($this, 'showVirtualPass'));
} else {
$ilTabs->setBackTarget($this->lng->txt("tst_back_to_pass_details"), $this->ctrl->getLinkTarget($this, 'outUserPassDetails'));
}
include_once "./Services/Style/classes/class.ilObjStyleSheet.php";
$this->tpl->setCurrentBlock("ContentStyle");
$this->tpl->setVariable("LOCATION_CONTENT_STYLESHEET", ilObjStyleSheet::getContentStylePath(0));
$this->tpl->parseCurrentBlock();
$this->tpl->setCurrentBlock("SyntaxStyle");
$this->tpl->setVariable("LOCATION_SYNTAX_STYLESHEET", ilObjStyleSheet::getSyntaxStylePath());
$this->tpl->parseCurrentBlock();
$this->tpl->addCss(ilUtil::getStyleSheetLocation("output", "test_print.css", "Modules/Test"), "print");
if ($this->object->getShowSolutionAnswersOnly()) {
$this->tpl->addCss(ilUtil::getStyleSheetLocation("output", "test_print_hide_content.css", "Modules/Test"), "print");
}
$solution = $this->getCorrectSolutionOutput($questionId, $activeId, $pass, $objectivesList);
$this->tpl->setContent($solution);
}
示例10: executeCommand
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}();
}
}
示例11: executeCommand
public function executeCommand()
{
if (!$this->checkPermission()) {
ilUtil::sendFailure($this->pl->txt('msg_no_permission'), true);
$this->ctrl->redirectByClass('ilpersonaldesktopgui');
}
global $ilMainMenu;
$ilMainMenu->setActive('none');
$cmd = $this->ctrl->getCmd();
$next_class = $this->ctrl->getNextClass($this);
if (!in_array($cmd, array('addType', ''))) {
$this->ctrl->saveParameter($this, 'type_id');
$this->ctrl->saveParameter($this, 'signature_id');
}
// needed for ILIAS >= 4.5
if (ilCertificatePlugin::getBaseClass() != 'ilRouterGUI') {
$this->tpl->getStandardTemplate();
}
switch ($next_class) {
case '':
switch ($cmd) {
case 'showTypes':
$this->showTypes();
break;
case 'editType':
$this->editType();
$this->setTabs('general');
break;
case 'addType':
$this->addType();
$this->setTabs('general');
break;
case 'saveType':
$this->saveType();
$this->setTabs('general');
break;
case 'editTemplate':
$this->editTemplate();
$this->setTabs('template');
break;
case 'updateTemplate':
$this->updateTemplate();
$this->setTabs('template');
break;
case 'downloadDefaultTemplate':
$this->downloadDefaultTemplate();
$this->setTabs('template');
break;
case 'downloadTemplate':
$this->downloadTemplate();
$this->setTabs('template');
break;
case 'showSettings':
$this->showSettings();
$this->setTabs('settings');
break;
case 'editSetting':
$this->editSetting();
$this->setTabs('settings');
break;
case 'updateSetting':
$this->updateSetting();
$this->setTabs('settings');
break;
case 'addCustomSetting':
$this->addCustomSetting();
$this->setTabs('settings');
break;
case 'editCustomSetting':
$this->editCustomSetting();
$this->setTabs('settings');
break;
case 'confirmDeleteCustomSetting':
$this->confirmDeleteCustomSetting();
$this->setTabs('settings');
break;
case 'deleteCustomSetting':
$this->deleteCustomSetting();
break;
case 'saveCustomSetting':
$this->saveCustomSetting();
$this->setTabs('settings');
break;
case 'showPlaceholders':
$this->showPlaceholders();
$this->setTabs('placeholders');
break;
case 'addPlaceholder':
$this->addPlaceholder();
$this->setTabs('placeholders');
break;
case 'editPlaceholder':
$this->editPlaceholder();
$this->setTabs('placeholders');
break;
case 'updatePlaceholder':
$this->updatePlaceholder();
$this->setTabs('placeholders');
break;
case 'createPlaceholder':
//.........这里部分代码省略.........
示例12: doTableSwitch
public function doTableSwitch()
{
$this->ctrl->setParameterByClass("ilObjDataCollectionGUI", "table_id", $_POST['table_id']);
$this->ctrl->redirectByClass("ilDataCollectionFieldListGUI", "listFields");
}
示例13: backToInfoScreenCmd
private function backToInfoScreenCmd()
{
$this->ctrl->redirectByClass('ilObjTestGUI', 'infoScreen');
}
示例14: gatewayShowHintListCmd
public function gatewayShowHintListCmd()
{
$this->saveQuestionSolution();
require_once 'Modules/TestQuestionPool/classes/class.ilAssQuestionHintRequestGUI.php';
$this->ctrl->redirectByClass('ilAssQuestionHintRequestGUI', ilAssQuestionHintRequestGUI::CMD_SHOW_LIST);
}