private function save() { global $tpl, $ilCtrl; $form = $this->BuildForm(); // Formular bauen // Eingaben prüfen (Abhängig von SetRequired) if ($form->CheckInput()) { $form->setValuesByPost(); // Lade die Benutzereingaben $emails = $form->getInput('emails'); // Speichere die E-Mails in eine Variable require_once "Customizing/global/plugins/Services/UIComponent/UserInterfaceHook/UIExample/classes/class.ilEmailSubscriber.php"; $subscriber = new ilEmailSubscriber($_GET['ref_id']); $emails = $subscriber->getEmailsFromString($emails); foreach ($emails as $email) { $subscriber->subscribeEmail($email); } //var_dump($subscriber->getEmailsFromString($emails)); //exit; //$emails_untereinander = ""; //$eintremails_untereinander = ; ilUtil::sendSuccess("Die Nutzer folgender E-Mail-Adressen sind jetzt Kursmitglieder: " . $this->werteuntereinander($subscriber->getEmailsFound()), true); ilUtil::sendInfo("Die Nutzer folgender E-Mail-Adressen konnten nicht gefunden werden: " . $this->werteuntereinander($subscriber->getEmailsNotFound()), true); $this->ctrl->redirect($this, 'show'); /* $ausgabestr .= "Die Nutzer folgender E-Mail-Adressen sind jetzt Kursmitglieder: ".$this->werteuntereinander($subscriber->getEmailsFound()); $ausgabestr .= "<br /><br /><br />Die Nutzer folgender E-Mail-Adressen konnten nicht gefunden werden: ".$this->werteuntereinander($subscriber->getEmailsNotFound()); $this->tpl->setContent($ausgabestr); //Zeige die E-Mails im Content an */ } else { $this->tpl->setContent("Nicht Speichern"); } }
private function saveSkillThresholdsCmd() { require_once 'Modules/Test/classes/class.ilTestSkillLevelThreshold.php'; if (is_array($_POST['threshold'])) { $threshold = $_POST['threshold']; $assignmentList = $this->buildSkillQuestionAssignmentList(); $assignmentList->loadFromDb(); foreach ($assignmentList->getUniqueAssignedSkills() as $data) { $skill = $data['skill']; $skillKey = $data['skill_base_id'] . ':' . $data['skill_tref_id']; $levels = $skill->getLevelData(); foreach ($levels as $level) { if (isset($threshold[$skillKey]) && isset($threshold[$skillKey][$level['id']])) { $skillLevelThreshold = new ilTestSkillLevelThreshold($this->db); $skillLevelThreshold->setTestId($this->testOBJ->getTestId()); $skillLevelThreshold->setSkillBaseId($data['skill_base_id']); $skillLevelThreshold->setSkillTrefId($data['skill_tref_id']); $skillLevelThreshold->setSkillLevelId($level['id']); $skillLevelThreshold->setThreshold($threshold[$skillKey][$level['id']]); $skillLevelThreshold->saveToDb(); } } } } ilUtil::sendSuccess($this->lng->txt('tst_msg_skl_lvl_thresholds_saved'), true); $this->ctrl->redirect($this, self::CMD_SHOW_SKILL_THRESHOLDS); }
/** * @param int $id * @param bool $for_CRUD * @return assFormulaQuestionUnitCategory */ protected function getCategoryById($id, $for_CRUD = true) { $category = $this->repository->getUnitCategoryById($id); if ($for_CRUD && $category->getQuestionFi() != $this->repository->getConsumerId()) { ilUtil::sendFailure($this->lng->txt('change_adm_categories_not_allowed'), true); $this->ctrl->redirect($this, $this->getDefaultCommand()); } return $category; }
/** * Save config */ public function save() { $form = new ilCertificateConfigFormGUI($this); if ($form->saveObject()) { ilUtil::sendSuccess($this->pl->txt('msg_save_config'), true); $this->ctrl->redirect($this, 'configure'); } else { $form->setValuesByPost(); $this->tpl->setContent($form->getHTML()); } }
function __showRolesTable($a_result_set, $a_from = "") { if (!$this->ilAccess->checkAccess("cat_administrate_users", "", $_GET["ref_id"])) { ilUtil::sendFailure($this->lng->txt("permission_denied"), true); $this->ctrl->redirect($this, ""); } $tbl =& $this->parent_gui->__initTableGUI(); $tpl =& $tbl->getTemplateObject(); // SET FORMAACTION $tpl->setCurrentBlock("tbl_form_header"); $this->ctrl->setParameter($this, 'obj_id', $_GET['obj_id']); $tpl->setVariable("FORMACTION", $this->ctrl->getFormAction($this)); $tpl->parseCurrentBlock(); // SET FOOTER BUTTONS $tpl->setVariable("COLUMN_COUNTS", 4); $tpl->setVariable("IMG_ARROW", ilUtil::getImagePath("arrow_downright.svg")); $tpl->setCurrentBlock("tbl_action_button"); $tpl->setVariable("BTN_NAME", "assignSave"); $tpl->setVariable("BTN_VALUE", $this->lng->txt("change_assignment")); $tpl->parseCurrentBlock(); $tpl->setCurrentBlock("tbl_action_row"); $tpl->setVariable("TPLPATH", $this->tpl->tplPath); $tpl->parseCurrentBlock(); $tmp_obj =& ilObjectFactory::getInstanceByObjId($_GET['obj_id']); $title = $this->lng->txt('role_assignment') . ' (' . $tmp_obj->getFullname() . ')'; $tbl->setTitle($title, "icon_role.svg", $this->lng->txt("role_assignment")); $tbl->setHeaderNames(array('', $this->lng->txt("title"), $this->lng->txt('description'), $this->lng->txt("type"))); $tbl->setHeaderVars(array("", "title", "description", "type"), array("ref_id" => $this->object->getRefId(), "cmd" => "assignRoles", "obj_id" => $_GET['obj_id'], "cmdClass" => "ilobjcategorygui", "cmdNode" => $_GET["cmdNode"])); $tbl->setColumnWidth(array("4%", "35%", "45%", "16%")); $this->set_unlimited = true; $this->parent_gui->__setTableGUIBasicData($tbl, $a_result_set, $a_from, true); $tbl->render(); $this->tpl->setVariable("ROLES_TABLE", $tbl->tpl->get()); return true; }
/** * */ public function addModerator($users = array()) { global $ilUser; if (!$users) { ilUtil::sendFailure($this->lng->txt('frm_moderators_select_one')); return; } include_once "Modules/Forum/classes/class.ilForumNotification.php"; $isCrsGrp = ilForumNotification::_isParentNodeGrpCrs($this->ref_id); include_once "Modules/Forum/classes/class.ilForumProperties.php"; $objFrmProps = ilForumProperties::getInstance(ilObject::_lookupObjId($this->ref_id)); $frm_noti_type = $objFrmProps->getNotificationType(); foreach ($users as $user_id) { $this->oForumModerators->addModeratorRole((int) $user_id); if ($isCrsGrp && $frm_noti_type != 'default') { $tmp_frm_noti = new ilForumNotification($this->ref_id); $tmp_frm_noti->setUserId((int) $user_id); $tmp_frm_noti->setUserIdNoti($ilUser->getId()); $tmp_frm_noti->setUserToggle((int) $objFrmProps->getUserToggleNoti()); $tmp_frm_noti->setAdminForce((int) $objFrmProps->getAdminForceNoti()); $tmp_frm_noti->insertAdminForce(); } } ilUtil::sendSuccess($this->lng->txt('frm_moderator_role_added_successfully'), true); $this->ctrl->redirect($this, 'showModerators'); }
private function saveFormCmd($isConfirmedSave = false) { $form = $this->buildForm(); // form validation and initialisation $errors = !$form->checkInput(); // ALWAYS CALL BEFORE setValuesByPost() $form->setValuesByPost(); // NEVER CALL THIS BEFORE checkInput() // return to form when any form validation errors exist if ($errors) { ilUtil::sendFailure($this->lng->txt('form_input_not_valid')); return $this->showFormCmd($form); } // check for required confirmation and redirect if neccessary if (!$isConfirmedSave && $this->isScoreRecalculationRequired($form)) { return $this->showConfirmation($form); } // perform save $this->performSaveForm($form); if ($this->isScoreRecalculationRequired($form)) { $this->testOBJ->recalculateScores(); } // redirect to form output ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"), true); $this->ctrl->redirect($this, self::CMD_SHOW_FORM); }
public function startImport() { $form = $this->initForm("startImport"); if (!$form->checkInput()) { $this->tpl->setContent($form->getHTML()); } else { $file = $form->getInput("import_file"); $importer = new ilOrgUnitSimpleImport(); try { $file_path = $file["tmp_name"]; $file_type = pathinfo($file["name"], PATHINFO_EXTENSION); $file_name = pathinfo($file["name"], PATHINFO_FILENAME); if ($file_type == "zip") { $extract_path = $file_path . '_extracted/'; $extracted_file = $extract_path . $file_name . '/manifest.xml'; $zip = new ZipArchive(); $res = $zip->open($file_path); if ($res === true) { $zip->extractTo($extract_path); $zip->close(); if (file_exists($extracted_file)) { $file_path = $extracted_file; } } } $importer->simpleImport($file_path); } catch (Exception $e) { $this->ilLog->write($e->getMessage() . " - " . $e->getTraceAsString()); ilUtil::sendFailure($this->lng->txt("import_failed"), true); $this->ctrl->redirect($this, "render"); } $this->displayImportResults($importer); } }
/** * Enable all settings - remove template */ private function confirmedResetTemplateCmd() { $this->object->setTemplate(null); $this->object->saveToDB(); ilUtil::sendSuccess($this->lng->txt("test_template_reset"), true); $this->ctrl->redirect($this, "properties"); }
protected function deactivate() { $page = $this->getPageObject(); $page->setActive(false); $page->update(); $this->ctrl->redirect($this, 'edit'); }
/** * Save title and translations */ function saveTranslations() { // default language set? if (!isset($_POST["default"])) { ilUtil::sendFailure($this->lng->txt("msg_no_default_language")); return $this->editTranslations(true); } // all languages set? if (array_key_exists("", $_POST["lang"])) { ilUtil::sendFailure($this->lng->txt("msg_no_language_selected")); return $this->editTranslations(true); } // no single language is selected more than once? if (count(array_unique($_POST["lang"])) < count($_POST["lang"])) { ilUtil::sendFailure($this->lng->txt("msg_multi_language_selected")); return $this->editTranslations(true); } // save the stuff $this->ilObjectOrgUnit->removeTranslations(); foreach ($_POST["title"] as $k => $v) { // update object data if default $is_default = $_POST["default"] == $k; if ($is_default) { $this->ilObjectOrgUnit->setTitle(ilUtil::stripSlashes($v)); $this->ilObjectOrgUnit->setDescription(ilUtil::stripSlashes($_POST["desc"][$k])); $this->ilObjectOrgUnit->update(); } $this->ilObjectOrgUnit->addTranslation(ilUtil::stripSlashes($v), ilUtil::stripSlashes($_POST["desc"][$k]), ilUtil::stripSlashes($_POST["lang"][$k]), $is_default); } ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"), true); $this->ctrl->redirect($this, "editTranslations"); }
private function saveSkillPointsCmd() { if (is_array($_POST['quantifiers'])) { require_once 'Modules/Test/classes/class.ilTestSkillQuestionAssignment.php'; $success = false; foreach ($_POST['quantifiers'] as $assignmentKey => $quantifier) { $assignmentKey = explode(':', $assignmentKey); $skillBaseId = (int) $assignmentKey[0]; $skillTrefId = (int) $assignmentKey[1]; $questionId = (int) $assignmentKey[2]; if ($this->isTestQuestion($questionId) && (int) $quantifier > 0) { $assignment = new ilTestSkillQuestionAssignment($this->db); $assignment->setTestId($this->testOBJ->getTestId()); $assignment->setQuestionId($questionId); $assignment->setSkillBaseId($skillBaseId); $assignment->setSkillTrefId($skillTrefId); if ($assignment->dbRecordExists()) { $assignment->setSkillPoints((int) $quantifier); $assignment->saveToDb(); } } } } ilUtil::sendSuccess($this->lng->txt('tst_msg_skl_qst_assign_points_saved'), true); $this->ctrl->redirect($this, self::CMD_SHOW_SKILL_QUEST_ASSIGNS); }
private function saveEditSourcePoolDefinitionFormCmd() { $this->questionSetConfig->loadFromDb(); $defId = $this->fetchSingleSourcePoolDefinitionIdParameter(); $sourcePoolDefinition = $this->sourcePoolDefinitionFactory->getSourcePoolDefinitionByDefinitionId($defId); $availableTaxonomyIds = ilObjTaxonomy::getUsageOfObject($sourcePoolDefinition->getPoolId()); $form = $this->buildEditSourcePoolDefinitionFormGUI(); $form->build($sourcePoolDefinition, $availableTaxonomyIds); $errors = !$form->checkInput(); // ALWAYS CALL BEFORE setValuesByPost() $form->setValuesByPost(); // NEVER CALL THIS BEFORE checkInput() if ($errors) { return $this->showSourcePoolDefinitionListCmd($form); } $form->applySubmit($sourcePoolDefinition, $availableTaxonomyIds); $sourcePoolDefinition->saveToDb(); $this->sourcePoolDefinitionList->loadDefinitions(); $this->stagingPool->rebuild($this->sourcePoolDefinitionList); $this->questionSetConfig->setLastQuestionSyncTimestamp(time()); $this->questionSetConfig->saveToDb(); $this->sourcePoolDefinitionList->saveDefinitions(); $this->testOBJ->saveCompleteStatus($this->questionSetConfig); ilUtil::sendSuccess($this->lng->txt("tst_msg_random_question_set_config_modified"), true); $this->ctrl->redirect($this, self::CMD_SHOW_SRC_POOL_DEF_LIST); }
/** * Enable all settings - remove template */ private function confirmedResetTemplateCmd() { $this->testOBJ->setTemplate(null); $this->testOBJ->saveToDB(); ilUtil::sendSuccess($this->lng->txt("test_template_reset"), true); $this->ctrl->redirect($this, self::CMD_SHOW_FORM); }
/** * */ public function detachModeratorRole() { if (!isset($_POST['usr_id']) || !is_array($_POST['usr_id'])) { ilUtil::sendFailure($this->lng->txt('frm_moderators_select_at_least_one')); return $this->showModerators(); } $entries = $this->oForumModerators->getCurrentModerators(); if (count($_POST['usr_id']) == count($entries)) { ilUtil::sendFailure($this->lng->txt('frm_at_least_one_moderator')); return $this->showModerators(); } include_once "Modules/Forum/classes/class.ilForumNotification.php"; $isCrsGrp = ilForumNotification::_isParentNodeGrpCrs($this->ref_id); if ($isCrsGrp) { global $tree; $parent_ref_id = $tree->getParentId($this->ref_id); include_once "Services/Membership/classes/class.ilParticipants.php"; } include_once "Modules/Forum/classes/class.ilForumProperties.php"; $objFrmProps = ilForumProperties::getInstance(ilObject::_lookupObjId($this->ref_id)); $frm_noti_type = $objFrmProps->getNotificationType(); foreach ($_POST['usr_id'] as $usr_id) { $this->oForumModerators->detachModeratorRole((int) $usr_id); if ($isCrsGrp && $frm_noti_type != 'default') { if (!ilParticipants::_isParticipant($this->ref_id, $usr_id)) { $tmp_frm_noti = new ilForumNotification($this->ref_id); $tmp_frm_noti->setUserId((int) $usr_id); $tmp_frm_noti->setForumId(ilObject::_lookupObjId($this->ref_id)); $tmp_frm_noti->deleteAdminForce(); } } } ilUtil::sendSuccess($this->lng->txt('frm_moderators_detached_role_successfully'), true); $this->ctrl->redirect($this, 'showModerators'); }
protected function questionsObject() { /** @var $ilAccess ilAccessHandler */ global $ilAccess; if (!$ilAccess->checkAccess("write", "", $this->ref_id)) { // allow only write access ilUtil::sendInfo($this->lng->txt("cannot_edit_test"), true); $this->ctrl->redirect($this, "infoScreen"); } if ($_GET['browse']) { exit('Browse??'); return $this->object->questionbrowser(); } if ($_GET["eqid"] && $_GET["eqpl"]) { $this->ctrl->setParameter($this, 'q_id', $_GET["eqid"]); $this->ctrl->setParameter($this, 'qpl_id', $_GET["eqpl"]); $this->ctrl->redirect($this, 'adjustscoringfortest'); } $this->tpl->addBlockFile("ADM_CONTENT", "adm_content", "tpl.il_as_tst_questions.html", "Modules/Test"); $this->tpl->setCurrentBlock("adm_content"); include_once "./Modules/Test/classes/tables/class.ilTestQuestionsTableGUI.php"; $checked_move = is_array($_SESSION['tst_qst_move_' . $this->object->getTestId()]) && count($_SESSION['tst_qst_move_' . $this->object->getTestId()]); $table_gui = new ilTestQuestionsTableGUI($this, 'showquestionlist', $ilAccess->checkAccess("write", "", $this->ref_id) ? true : false, $checked_move, 0); $data = $this->object->getTestQuestions(); // @TODO Ask object for random test. if (!$data) { $this->object->getPotentialRandomTestQuestions(); } $filtered_data = array(); foreach ($data as $question) { $question_object = assQuestion::instantiateQuestionGUI($question['question_id']); if ($this->supportsAdjustment($question_object) && $this->allowedInAdjustment($question_object)) { $filtered_data[] = $question; } } $table_gui->setData($filtered_data); $table_gui->clearActionButtons(); $table_gui->clearCommandButtons(); $table_gui->multi = array(); $table_gui->setRowTemplate('tpl.il_as_tst_adjust_questions_row.html', 'Modules/Test'); $table_gui->header_commands = array(); $table_gui->setSelectAllCheckbox(null); $this->tpl->setVariable('QUESTIONBROWSER', $table_gui->getHTML()); $this->tpl->setVariable("ACTION_QUESTION_FORM", $this->ctrl->getFormAction($this, 'showquestionlist')); $this->tpl->parseCurrentBlock(); }
protected function resetFilter() { $table = new ilDataCollectionRecordListTableGUI($this, "listRecords", $this->table_obj); $table->resetOffset(); $table->resetFilter(); $this->ctrl->redirect($this, 'listRecords'); // $this->listRecords(); }
/** * Update type of definition * */ public function updateType() { $new_type_id = (int) $_POST['type_id']; if ($new_type_id && $new_type_id != $this->definition->getTypeId()) { $this->definition->setTypeId($new_type_id); $this->definition->update(); ilUtil::sendSuccess($this->pl->txt('msg_type_updated'), true); } $this->ctrl->redirect($this, 'showDefinition'); }
private function syncOriginalCmd() { $questionId = (int) $_POST['question_id']; if ($this->isTestQuestion($questionId) && $this->isSyncOriginalPossibleAndAllowed($questionId)) { $question = assQuestion::_instantiateQuestion($questionId); $question->syncSkillAssignments($question->getObjId(), $question->getId(), $question->lookupParentObjId($question->getOriginalId()), $question->getOriginalId()); ilUtil::sendSuccess($this->lng->txt('qpl_qst_skl_assign_synced_to_orig'), true); } $this->ctrl->redirect($this, self::CMD_SHOW_SKILL_QUEST_ASSIGNS); }
/** * Delete multiple fields */ public function deleteFields() { $field_ids = isset($_POST['dcl_field_ids']) ? $_POST['dcl_field_ids'] : array(); $table = ilDataCollectionCache::getTableCache($this->table_id); foreach ($field_ids as $field_id) { $table->deleteField($field_id); } ilUtil::sendSuccess($this->lng->txt('dcl_msg_fields_deleted'), true); $this->ctrl->redirect($this, 'listFields'); }
/** * create library */ public function create() { $form = new ilObjBibliographicAdminLibrariesFormGUI($this, new ilBibliographicSetting()); $form->setValuesByPost(); if ($form->saveObject()) { ilUtil::sendSuccess($this->lng->txt("settings_saved"), true); $this->ctrl->redirect($this, 'view'); } $this->parent_gui->tpl->setContent($form->getHTML()); }
public function removeFromRole() { if (!$this->ilAccess->checkAccess("write", "", $this->parent_object->getRefId())) { ilUtil::sendFailure($this->lng->txt("permission_denied"), true); $this->ctrl->redirect($this->parent_gui, ""); } $arrObjIdRolId = explode("-", $_POST["obj_id-role_id"]); $this->parent_object->deassignUserFromLocalRole($arrObjIdRolId[1], $arrObjIdRolId[0]); ilUtil::sendSuccess($this->lng->txt("deassign_user_successful"), true); $this->ctrl->redirect($this, "showOtherRoles"); }
/** * Delete a type */ protected function delete() { $type = new ilOrgUnitType((int) $_GET['type_id']); try { $type->delete(); ilUtil::sendSuccess($this->lng->txt('orgu_type_msg_deleted'), true); $this->ctrl->redirect($this); } catch (ilException $e) { ilUtil::sendFailure($e->getMessage(), true); $this->ctrl->redirect($this); } }
/** * Create or update a type */ public function saveType() { $type = $this->type === NULL ? new srCertificateType() : $this->type; $form = new srCertificateTypeFormGUI($this, $type); if ($form->saveObject()) { ilUtil::sendSuccess($this->pl->txt('msg_type_saved'), true); $this->ctrl->setParameter($this, 'type_id', $type->getId()); $this->ctrl->redirect($this, 'editType'); } else { $this->tpl->setContent($form->getHTML()); } }
public function update() { $form = $this->initForm(); $form->setValuesByPost(); if ($form->checkInput()) { $this->parent_object->setImportId($form->getItemByPostVar("ext_id")->getValue()); $this->parent_object->update(); ilUtil::sendSuccess($this->lng->txt("ext_id_updated"), true); $this->ctrl->redirect($this, "edit"); } else { $this->tpl->setContent($form->getHTML()); } }
protected function save() { global $tpl; $form = $this->buildForm(); if ($form->checkInput()) { $form->setValuesByPost(); $emails = $form->getInput('emails'); require_once "Customizing/global/plugins/Services/UIComponent/UserInterfaceHook/CourseEmailSubscription/classes/class.ilEmailSubscriber.php"; $subscriber = new ilEmailSubscriber($this->courseObject->getRefId()); $emails = $subscriber->getEmailsFromString($emails); foreach ($emails as $email) { $subscriber->subscribeEmail($email); } //$emailsFound = $subscriber->getEmailsFound(); //$emailsNotFound = $subscriber->getEmailsNotFound(); ilUtil::sendSuccess('Folgende Benutzer wurden eingeschrieben: ' . implode(', ', $subscriber->getEmailsFound()), true); ilUtil::sendInfo('Folgende E-Mail adressen konnten nicht gefunden werden: ' . implode(', ', $subscriber->getEmailsNotFound()), true); $this->ctrl->redirect($this, 'show'); } else { $tpl->setContent($form->getHTML()); } }
public function updateProperties() { $this->initPropertiesForm(); if ($this->form->checkInput()) { $this->object->setTitle($this->form->getInput('title')); $this->object->setDescription($this->form->getInput('desc')); $this->object->update(); ilUtil::sendSuccess($this->lng->txt('msg_obj_modified'), true); $this->ctrl->redirect($this, 'editProperties'); } $this->form->setValuesByPost(); $this->tpl->setContent($this->form->getHtml()); }
public function updateSettings() { if (!$this->ilAccess->checkAccess("write", "", $this->ref_id)) { ilUtil::sendFailure($this->lng->txt("permission_denied"), true); $this->ctrl->redirect($this); } $form = new ilObjOrgUnitSettingsFormGUI($this, $this->object); if ($form->saveObject()) { ilUtil::sendSuccess($this->lng->txt('msg_obj_modified'), true); $this->ctrl->redirect($this, 'editSettings'); } else { $this->tpl->setContent($form->getHTML()); } }
private function showLocalRoleSelection() { if ($this->rule->getRoleId() > 0) { return false; } $_SESSION['shib_role_ass']['rule_id'] = $_REQUEST['rule_id'] ? $_REQUEST['rule_id'] : 0; $_SESSION['shib_role_ass']['search'] = $this->form->getInput('role_search'); $_SESSION['shib_role_ass']['add_on_update'] = $this->rule->isAddOnUpdateEnabled(); $_SESSION['shib_role_ass']['remove_on_update'] = $this->rule->isRemoveOnUpdateEnabled(); $_SESSION['shib_role_ass']['name'] = $this->rule->getName(); $_SESSION['shib_role_ass']['value'] = $this->rule->getValue(); $_SESSION['shib_role_ass']['plugin'] = $this->rule->isPluginActive(); $_SESSION['shib_role_ass']['plugin_id'] = $this->rule->getPluginId(); $this->ctrl->redirect($this, 'chooseRole'); }
function deleteItems() { $nr_ids = $_POST['nr_ids']; for ($i = 0; $i < $nr_ids; $i++) { $id = $_POST['delete_id_' . $i]; $record = $this->ar->find($id); $record->delete(); } if ($i == 1) { ilUtil::sendSuccess($this->getDeleteRecordMessage(), true); } else { ilUtil::sendSuccess($this->getDeleteRecordsMessage(), true); } $this->ctrl->redirect($this, "index"); }