/**
  * execute command
  */
 public function executeCommand()
 {
     global $ilCtrl;
     $ilCtrl->saveParameter($this, 'mode');
     $cmd = $this->ctrl->getCmd();
     switch ($cmd) {
         case 'listRecords':
             $this->setSubTabs();
             $this->listRecords();
             break;
         case 'confirmDeleteRecords':
             $this->confirmDeleteRecords();
             break;
         case 'cancelDelete':
             $this->setSubTabs();
             $this->listRecords();
             break;
         case 'deleteRecords':
             $this->deleteRecords();
             break;
         default:
             $this->{$cmd}();
             break;
     }
 }
 /**
  * execute command
  */
 public function executeCommand()
 {
     $cmd = $this->ctrl->getCmd();
     $next_class = $this->ctrl->getNextClass($this);
     switch ($next_class) {
         default:
             return $this->dispatchCommand($cmd);
     }
 }
 /**
  * @return bool
  * @throws Exception
  * @throws ilCtrlException
  * @throws ilException
  */
 public function executeCommand()
 {
     $next_class = $this->ctrl->getNextClass($this);
     $cmd = $this->ctrl->getCmd();
     switch ($next_class) {
         case 'ilrepositorysearchgui':
             switch ($cmd) {
                 case 'addUserFromAutoComplete':
                     if ($_GET['addusertype'] == "staff") {
                         $this->addStaff();
                     } elseif ($_GET['addusertype'] == "other") {
                         $this->addOtherRoles();
                     }
                     break;
                 default:
                     $repo = new ilRepositorySearchGUI();
                     $this->ctrl->forwardCommand($repo);
                     break;
             }
             break;
         default:
             switch ($cmd) {
                 case 'showStaff':
                     $this->tabs_gui->activateSubTab("show_staff");
                     $this->showStaff();
                     break;
                 case 'showOtherRoles':
                     $this->tabs_gui->activateSubTab("show_other_roles");
                     $this->showOtherRoles();
                     break;
                 case 'showStaffRec':
                     $this->tabs_gui->activateSubTab("show_staff_rec");
                     $this->showStaffRec();
                     break;
                 case 'confirmRemoveFromRole':
                 case 'confirmRemoveFromEmployees':
                 case 'confirmRemoveFromSuperiors':
                     $this->confirmRemoveUser($cmd);
                     break;
                 case 'addStaff':
                 case 'addOtherRoles':
                 case 'fromSuperiorToEmployee':
                 case 'fromEmployeeToSuperior':
                 case 'removeFromSuperiors':
                 case 'removeFromEmployees':
                 case 'removeFromRole':
                     $this->{$cmd}();
                     break;
                 default:
                     throw new ilException("Unknown command for command class ilOrgUnitStaffGUI: " . $cmd);
                     break;
             }
             break;
     }
     return true;
 }
 /**
  * execute command
  */
 function &executeCommand()
 {
     $cmd = $this->ctrl->getCmd();
     $next_class = $this->ctrl->getNextClass($this);
     $cmd = $this->getCommand($cmd);
     switch ($next_class) {
         default:
             $ret =& $this->{$cmd}();
             break;
     }
     return $ret;
 }
 public function executeCommand()
 {
     switch ($this->myCtrl->getNextClass()) {
         case strtolower(__CLASS__):
         case '':
             $command = $this->myCtrl->getCmd(self::CMD_SHOW) . 'Cmd';
             $this->{$command}();
             break;
         default:
             throw new ilTestQuestionPoolException('unsupported next class');
     }
 }
 public function executeCommand()
 {
     $forward_class = $this->ctrl->getNextClass($this);
     switch ($forward_class) {
         default:
             if (!($cmd = $this->ctrl->getCmd())) {
                 $cmd = 'showAttachments';
             }
             $this->{$cmd}();
             break;
     }
     return true;
 }
 /**
  * @return bool
  */
 public function executeCommand()
 {
     $cmd = $this->ctrl->getCmd();
     switch ($cmd) {
         case 'importScreen':
             $this->importScreen();
             break;
         case 'startImport':
             $this->startImport();
             break;
     }
     return true;
 }
 /**
  * @return bool
  */
 public function executeCommand()
 {
     $cmd = $this->ctrl->getCmd();
     switch ($cmd) {
         case "assignRoles":
             $this->tabs_gui->clearTargets();
             $this->tabs_gui->setBackTarget($this->lng->txt("back"), $this->ctrl->getLinkTargetByClass("illocalusergui", 'index'));
         default:
             $this->{$cmd}();
             break;
     }
     return true;
 }
 public function executeCommand()
 {
     $this->ctrl->saveParameter($this, 'nextCommand');
     $nextCommand = explode('::', $_GET['nextCommand']);
     $this->setNextCommandClass($nextCommand[0]);
     $this->setNextCommandCmd($nextCommand[1]);
     $this->ctrl->saveParameter($this->parentGUI, 'lock');
     switch ($this->ctrl->getNextClass()) {
         default:
             $cmd = $this->ctrl->getCmd() . 'Cmd';
             $this->{$cmd}();
     }
 }
 /**
  * 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);
     }
 }
Beispiel #11
0
 /**
  * @return bool
  */
 public function executeCommand()
 {
     $cmd = $this->ctrl->getCmd();
     switch ($cmd) {
         case 'edit':
             $this->edit();
             break;
         case 'update':
             $this->update();
             break;
     }
     return true;
 }
 /**
  * execute command
  */
 public function executeCommand()
 {
     $cmd = $this->ctrl->getCmd();
     $this->tpl->getStandardTemplate();
     switch ($cmd) {
         case 'update':
             $this->save("update");
             break;
         default:
             $this->{$cmd}();
             break;
     }
     return true;
 }
 public function executeCommand()
 {
     $cmd = $this->ctrl->getCmd();
     $next_class = $this->ctrl->getNextClass($this);
     switch ($next_class) {
         case '':
             switch ($cmd) {
                 case '':
                 case 'listTypes':
                     $this->listTypes();
                     break;
                 case 'add':
                     $this->add();
                     break;
                 case 'edit':
                     $this->setSubTabsEdit('general');
                     $this->edit();
                     break;
                 case 'editCustomIcons':
                     $this->setSubTabsEdit('custom_icons');
                     $this->editCustomIcons();
                     break;
                 case 'editAMD':
                     $this->setSubTabsEdit('amd');
                     $this->editAMD();
                     break;
                 case 'updateAMD':
                     $this->setSubTabsEdit('amd');
                     $this->updateAMD();
                     break;
                 case 'updateCustomIcons':
                     $this->setSubTabsEdit('custom_icons');
                     $this->updateCustomIcons();
                     break;
                 case 'create':
                     $this->create();
                     break;
                 case 'update':
                     $this->setSubTabsEdit('general');
                     $this->update();
                     break;
                 case 'delete':
                     $this->delete();
                     break;
             }
             break;
     }
 }
 /**
  * @return mixed
  */
 public function executeCommand()
 {
     // check hack attempts
     if (!$this->settings->get('password_assistance')) {
         if (empty($_SESSION['AccountId']) && $_SESSION['AccountId'] !== false) {
             $this->ilias->error_obj->raiseError($this->lng->txt('permission_denied'), $this->ilias->error_obj->WARNING);
         }
     }
     // check correct setup
     if (!$this->settings->get('setup_ok')) {
         die('Setup is not completed. Please run setup routine again.');
     }
     // Change the language, if necessary.
     // And load the 'pwassist' language module
     $lang = $_GET['lang'];
     if ($lang != null && $lang != '' && $this->lng->getLangKey() != $lang) {
         $lng = new ilLanguage($lang);
     }
     $this->lng->loadLanguageModule('pwassist');
     $cmd = $this->ctrl->getCmd();
     $next_class = $this->ctrl->getNextClass($this);
     switch ($next_class) {
         default:
             if ($cmd != '') {
                 return $this->{$cmd}();
             } else {
                 if (!empty($_GET['key'])) {
                     $this->showAssignPasswordForm();
                 } else {
                     $this->showAssistanceForm();
                 }
             }
             break;
     }
 }
 /**
  * @param $active_tab_id
  */
 protected function setSubTabsSettings($active_tab_id)
 {
     $next_class = $this->ctrl->getNextClass($this);
     $cmd = $this->ctrl->getCmd();
     $this->tabs_gui->addSubTab('edit_settings', $this->lng->txt('settings'), $this->ctrl->getLinkTarget($this, 'editSettings'));
     $this->tabs_gui->addSubTab("edit_translations", $this->lng->txt("obj_multilinguality"), $this->ctrl->getLinkTargetByClass("iltranslationgui", "editTranslations"));
     $ilOrgUnitType = $this->object->getOrgUnitType();
     if ($ilOrgUnitType instanceof ilOrgUnitType) {
         if (count($ilOrgUnitType->getAssignedAdvancedMDRecords(true))) {
             $this->tabs_gui->addSubTab('edit_advanced_settings', $this->lng->txt('orgu_adv_settings'), $this->ctrl->getLinkTarget($this, 'editAdvancedSettings'));
         }
     }
     $this->tabs_gui->setSubTabActive($active_tab_id);
     switch ($next_class) {
         case 'iltranslationgui':
             $this->tabs_gui->setSubTabActive("edit_translations");
             break;
         case '':
             switch ($cmd) {
                 case 'editSettings':
                     $this->tabs_gui->setSubTabActive('edit_settings');
                     break;
                 case 'editAdvancedSettings':
                 case 'updateAdvancedSettings':
                     $this->tabs_gui->setSubTabActive('edit_advanced_settings');
                     break;
             }
             break;
     }
     return;
 }
 /**
  * @return bool
  */
 public function executeCommand()
 {
     if ($_GET['mode']) {
         $this->ctrl->saveParameter($this, 'mode');
         $this->ctrl->setParameterByClass("ildatacollectionrecordlistgui", "mode", $_GET['mode']);
     }
     $this->ctrl->saveParameter($this, 'redirect');
     if ($this->record_id) {
         $this->record = ilDataCollectionCache::getRecordCache($this->record_id);
         if (!$this->record->hasPermissionToEdit($this->parent_obj->ref_id) or !$this->record->hasPermissionToView($this->parent_obj->ref_id)) {
             $this->accessDenied();
         }
         $this->table = $this->record->getTable();
         $this->table_id = $this->table->getId();
     } else {
         $this->table = ilDataCollectionCache::getTableCache($this->table_id);
         if (!ilObjDataCollectionAccess::hasAddRecordAccess($_GET['ref_id'])) {
             $this->accessDenied();
         }
     }
     $cmd = $this->ctrl->getCmd();
     switch ($cmd) {
         default:
             $this->{$cmd}();
             break;
     }
     return true;
 }
 /**
  * list fields
  */
 public function listFields()
 {
     // Show tables
     require_once "./Modules/DataCollection/classes/class.ilDataCollectionTable.php";
     $tables = $this->parent_obj->object->getTables();
     foreach ($tables as $table) {
         $options[$table->getId()] = $table->getTitle();
     }
     include_once './Services/Form/classes/class.ilSelectInputGUI.php';
     $table_selection = new ilSelectInputGUI('', 'table_id');
     $table_selection->setOptions($options);
     $table_selection->setValue($this->table_id);
     $this->toolbar->setFormAction($this->ctrl->getFormActionByClass("ilDataCollectionFieldListGUI", "doTableSwitch"));
     $this->toolbar->addText($this->lng->txt("dcl_table"));
     $this->toolbar->addInputItem($table_selection);
     $this->toolbar->addFormButton($this->lng->txt('change'), 'doTableSwitch');
     $this->toolbar->addSeparator();
     $this->toolbar->addButton($this->lng->txt("dcl_add_new_table"), $this->ctrl->getLinkTargetByClass("ildatacollectiontableeditgui", "create"));
     $this->toolbar->addSeparator();
     $this->ctrl->setParameterByClass("ildatacollectiontableeditgui", "table_id", $this->table_id);
     $this->toolbar->addButton($this->lng->txt("dcl_table_settings"), $this->ctrl->getLinkTargetByClass("ildatacollectiontableeditgui", "edit"));
     $this->toolbar->addButton($this->lng->txt("dcl_delete_table"), $this->ctrl->getLinkTargetByClass("ildatacollectiontableeditgui", "confirmDelete"));
     $this->toolbar->addButton($this->lng->txt("dcl_add_new_field"), $this->ctrl->getLinkTargetByClass("ildatacollectionfieldeditgui", "create"));
     // requested not to implement this way...
     //        $tpl->addJavaScript("Modules/DataCollection/js/fastTableSwitcher.js");
     require_once './Modules/DataCollection/classes/class.ilDataCollectionFieldListTableGUI.php';
     $list = new ilDataCollectionFieldListTableGUI($this, $this->ctrl->getCmd(), $this->table_id);
     $this->tpl->setContent($list->getHTML());
 }
 /**
  * execute command
  */
 public function &executeCommand()
 {
     global $ilCtrl;
     // determine next class in the call structure
     $next_class = $this->ilCtrl->getNextClass($this);
     switch ($next_class) {
         case 'ilrepositorysearchgui':
             include_once './Services/Search/classes/class.ilRepositorySearchGUI.php';
             $rep_search =& new ilRepositorySearchGUI();
             $this->ilCtrl->setReturn($this, 'perminfo');
             $this->ilCtrl->forwardCommand($rep_search);
             break;
         default:
             $cmd = $this->ilCtrl->getCmd();
             $this->{$cmd}();
             break;
     }
 }
 public function executeCommand()
 {
     $cmd = $this->ctrl->getCmd(self::CMD_INDEX);
     switch ($cmd) {
         case self::CMD_INDEX:
         case self::CMD_CANCEL:
         case self::CMD_CREATE:
         case self::CMD_UPDATE:
         case self::CMD_ADD:
         case self::CMD_EDIT:
         case self::CMD_ACTIVATE:
         case self::CMD_DEACTIVATE:
         case self::CMD_CONFIRM_DELETE:
         case self::CMD_DELETE:
             $this->{$cmd}();
             break;
     }
     return true;
 }
Beispiel #20
0
 function executeCommand()
 {
     $cmd = $this->ctrl->getCmd();
     switch ($cmd) {
         case "edit":
         case "update":
         case "view":
         case "delete":
             $this->{$cmd}(arIndexTableGUI::domid_decode($_GET['ar_id']));
             break;
         case "multiAction":
             $action_name = $_POST["index_table_multi_action_2"];
             $this->multiAction($action_name);
             break;
         default:
             $this->{$cmd}();
             break;
     }
 }
 /**
  *
  */
 public function executeCommand()
 {
     $next_class = $this->ctrl->getNextClass($this);
     $cmd = $this->ctrl->getCmd();
     $this->prepareOutput();
     switch ($next_class) {
         case 'ilpermissiongui':
             $this->tabs_gui->setTabActive('perm_settings');
             require_once 'Services/AccessControl/classes/class.ilPermissionGUI.php';
             $perm_gui = new ilPermissionGUI($this);
             $this->ctrl->forwardCommand($perm_gui);
             break;
         default:
             if ($cmd == '' || $cmd == 'view') {
                 $cmd = 'settings';
             }
             $this->{$cmd}();
             break;
     }
 }
 /**
  *
  */
 public function executeCommand()
 {
     $next_class = $this->ctrl->getNextClass($this);
     $cmd = $this->ctrl->getCmd();
     switch ($next_class) {
         case 'ilrepositorysearchgui':
             include_once 'Services/Search/classes/class.ilRepositorySearchGUI.php';
             $rep_search = new ilRepositorySearchGUI();
             $rep_search->setCallback($this, 'addModerator');
             $this->ctrl->setReturn($this, 'showModerators');
             $this->ctrl->forwardCommand($rep_search);
             break;
         default:
             if (!$cmd) {
                 $cmd = 'showModerators';
             }
             $this->{$cmd}();
             break;
     }
 }
 public function executeCommand()
 {
     $this->checkPermission();
     $this->initHeader();
     $this->setSubTabs();
     $cmd = $this->ctrl->getCmd();
     $next_class = $this->ctrl->getNextClass($this);
     // needed for ILIAS >= 4.5
     if (ilCertificatePlugin::getBaseClass() != 'ilRouterGUI') {
         $this->tpl->getStandardTemplate();
     }
     switch ($next_class) {
         case '':
             switch ($cmd) {
                 case 'showDefinition':
                 case 'showPlaceholders':
                 case 'showCertificates':
                 case 'downloadCertificate':
                 case 'downloadCertificates':
                 case 'updateDefinition':
                 case 'confirmTypeChange':
                 case 'updateType':
                 case 'createDefinition':
                 case 'updatePlaceholders':
                 case 'previewCertificate':
                 case 'buildActions':
                     $this->{$cmd}();
                     break;
                 case 'updatePlaceholdersPreview':
                     $this->updatePlaceholders('previewCertificate');
                     break;
                 case 'callBack':
                 case 'undoCallBack':
                 case 'retryGeneration':
                     /** @var srCertificate $certificate */
                     $certificate = srCertificate::find((int) $_GET['cert_id']);
                     if ($certificate->getDefinitionId() == $this->definition->getId()) {
                         $this->{$cmd}($certificate);
                     }
                     break;
                 case '':
                     if ($this->definition) {
                         $this->showCertificates();
                     } else {
                         $this->showDefinition();
                     }
             }
             break;
     }
     // needed for ILIAS >= 4.5
     if (ilCertificatePlugin::getBaseClass() != 'ilRouterGUI') {
         $this->tpl->show();
     }
 }
 /**
  *
  */
 public function executeCommand()
 {
     $this->ctrl->saveParameter($this, 'category_id');
     $cmd = $this->ctrl->getCmd($this->getDefaultCommand());
     $nextClass = $this->ctrl->getNextClass($this);
     switch ($nextClass) {
         default:
             $this->checkPermissions($cmd);
             $this->{$cmd}();
             break;
     }
     $this->handleSubtabs();
 }
 function executeCommand()
 {
     global $tpl;
     $cmd = $this->ctrl->getCmd('show');
     switch ($cmd) {
         case self::cmd_show:
         case self::cmd_subscribe:
             $this->{$cmd}();
             break;
         case 'save':
             $this->save();
             break;
     }
     $tpl->show();
     /*global $tpl, $ilCtrl;
     
             $tpl->getStandardTemplate();
             $tpl->setContent("hallo world");
             $this->initHeader();
             $tpl->show();
             //echo "hello world";*/
 }
 /**
  * Execute Command
  *
  * @return void
  */
 public function executeCommand()
 {
     global $ilAccess, $ilErr, $ilCtrl;
     $next_class = $this->ctrl->getNextClass($this);
     $cmd = $this->ctrl->getCmd();
     if (!$ilAccess->checkAccess('read', '', $this->ref_id)) {
         $ilErr->raiseError($this->lng->txt('msg_no_perm_read'), $ilErr->WARNING);
     }
     if (!$ilAccess->checkAccess('write', '', $this->ref_id) && $cmd != "settings") {
         ilUtil::sendFailure($this->lng->txt('msg_no_perm_write'), true);
         $ilCtrl->redirect($this, "settings");
     }
     $this->setSubTabs();
     switch ($next_class) {
         default:
             if (!$cmd) {
                 $cmd = "settings";
             }
             $this->{$cmd}();
             break;
     }
     return true;
 }
 /**
  * execute command
  */
 public function executeCommand()
 {
     $cmd = $this->ctrl->getCmd();
     switch ($cmd) {
         case 'listRecords':
             $this->setSubTabs();
             $this->listRecords();
             break;
         case 'confirmDeleteRecords':
             $this->confirmDeleteRecords();
             break;
         case 'cancelDelete':
             $this->setSubTabs();
             $this->listRecords();
             break;
         case 'deleteRecords':
             $this->deleteRecords();
             break;
         default:
             $this->{$cmd}();
             break;
     }
 }
 function executeCommand()
 {
     global $tpl, $ilCtrl, $ilLocator, $ilAccess;
     // Rechteprüfung
     if (!$ilAccess->checkAccess('write', '', $_GET['ref_id'])) {
         ilUtil::sendFailure("Access Denied!");
         return;
     }
     $cmd = $this->ctrl->getCmd();
     $this->buildheader($ilLocator);
     //echo $cmd;
     //exit;
     switch ($cmd) {
         case 'show':
             $this->show();
             // Falls $cmd "view" ist, führe Funktion view() aus.
             break;
         case 'save':
             $this->save();
             // Falls $cmd "goodbye" ist, führe Funktion goodbye() aus.
             break;
     }
     $tpl->show();
 }
 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();
     }
 }
 /**
  * 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}();
     }
 }