private function getDeveloperRubricCardFormCommandRow($form_action) { global $ilUser; include_once "./Services/Form/classes/class.ilPropertyFormGUI.php"; //configure the command row $rubric_commandrow_tpl = new ilTemplate('tpl.lp_rubricform_commandrow.html', true, true, 'Services/Tracking'); $select_prop = new ilSelectInputGUI('Title', 'selected_cmdrubric'); $options = array('behavior_1' => $this->lng->txt('rubric_option_behavior_1'), 'behavior_2' => $this->lng->txt('rubric_option_behavior_2'), 'behavior_3' => $this->lng->txt('rubric_option_behavior_3'), 'behavior_4' => $this->lng->txt('rubric_option_behavior_4'), 'behavior_5' => $this->lng->txt('rubric_option_behavior_5'), 'add_group' => $this->lng->txt('rubric_option_add_group'), 'del_group' => $this->lng->txt('rubric_option_del_group'), 'add_criteria' => $this->lng->txt('rubric_option_add_criteria'), 'del_criteria' => $this->lng->txt('rubric_option_del_criteria')); $select_prop->setOptions($options); $rubric_commandrow_tpl->setVariable('RURBRIC_COMMANDROW_SELECT', $select_prop->render()); $rubric_commandrow_tpl->setVariable('RUBRIC_SAVE', $this->lng->txt('save')); $rubric_commandrow_tpl->setVariable('RUBRIC_EXECUTE', $this->lng->txt('execute')); $rubric_commandrow_tpl->setVariable('FORM_ACTION', $form_action); $rubric_commandrow_tpl->setVariable('PASSING_GRADE_VALUE', "{$this->passing_grade}"); if (!is_null($this->rubric_locked)) { $rubric_commandrow_tpl->setVariable('RUBRIC_DISABLED', 'disabled'); $rubric_commandrow_tpl->setVariable('RUBRIC_LOCK', $this->lng->txt('rubric_card_unlock')); $tmp_user = ilObjectFactory::getInstanceByObjId($this->rubric_owner, false); if ($this->rubric_owner !== $ilUser->getId()) { $rubric_commandrow_tpl->setVariable('USER_LOCK', 'disabled'); } ilUtil::sendInfo($this->lng->txt('rubric_locked_info') . ' ' . $tmp_user->getFullName() . ' ' . $this->rubric_locked); } else { $rubric_commandrow_tpl->setVariable('RUBRIC_LOCK', $this->lng->txt('rubric_card_lock')); } $rubric_commandrow_tpl->setVariable('EXPORT', $this->lng->txt('rubric_option_export_pdf')); return $rubric_commandrow_tpl; }
/** * Activate multi language (-> master language selection) */ function activateMultilinguality() { global $tpl, $lng; ilUtil::sendInfo($lng->txt("cont_select_master_lang")); $form = $this->getMultiLangForm(); $tpl->setContent($form->getHTML()); }
/** * Fill table row */ protected function fillRow($a_set) { global $lng; $this->tpl->setVariable("VAL_TITLE", $a_set["title"]); $this->tpl->setVariable("PAGE_ID", $a_set["obj_id"]); $exp_id = ilLMPageObject::getExportId($this->parent_obj->object->getId(), $a_set["obj_id"], $a_set["type"]); if ($this->validation) { if (!preg_match("/^[a-zA-Z_]*\$/", trim($_POST["exportid"][$a_set["obj_id"]]))) { // @todo: move to style $this->tpl->setVariable("STYLE", " style='background-color: #FCEAEA;' "); $this->tpl->setVariable("ALERT_IMG", ilUtil::img(ilUtil::getImagePath("icon_alert.svg"), $lng->txt("alert"))); } $this->tpl->setVariable("EXPORT_ID", ilUtil::prepareFormOutput(ilUtil::stripSlashes($_POST["exportid"][$a_set["obj_id"]]))); } else { $this->tpl->setVariable("EXPORT_ID", ilUtil::prepareFormOutput($exp_id)); } if ($this->cnt_exp_ids[$exp_id] > 1) { $this->tpl->setVariable("ITEM_ADD_TXT", $lng->txt("cont_exp_id_used_multiple")); $this->tpl->setVariable("ALERT_IMG", ilUtil::img(ilUtil::getImagePath("icon_alert.svg"), $lng->txt("alert"))); if (!$this->dup_info_given) { ilUtil::sendInfo($lng->txt("content_some_export_ids_multiple_times")); $this->dup_info_given = true; } } }
/** * Prepares and displays settings form. * @param ilPropertyFormGUI $settingsForm */ public function general(ilPropertyFormGUI $settingsForm = null) { /** * @var $lng ilLanguage * @var $tpl ilTemplate * @var $ilCtrl ilCtrl */ global $lng, $tpl, $ilCtrl; if (!ilChatroom::checkUserPermissions(array('read', 'write'), $this->gui->ref_id)) { $ilCtrl->setParameterByClass('ilrepositorygui', 'ref_id', ROOT_FOLDER_ID); $ilCtrl->redirectByClass('ilrepositorygui', ''); } $chatSettings = new ilSetting('chatroom'); if (!$chatSettings->get('chat_enabled')) { ilUtil::sendInfo($lng->txt('server_disabled'), true); } $this->gui->switchToVisibleMode(); $formFactory = new ilChatroomFormFactory(); if (!$settingsForm) { $settingsForm = $formFactory->getSettingsForm(); } $room = ilChatRoom::byObjectId($this->gui->object->getId()); $settings = array('title' => $this->gui->object->getTitle(), 'desc' => $this->gui->object->getDescription()); if ($room) { ilChatroomFormFactory::applyValues($settingsForm, array_merge($settings, $room->getSettings())); } else { ilChatroomFormFactory::applyValues($settingsForm, $settings); } $settingsForm->setTitle($lng->txt('settings_title')); $settingsForm->addCommandButton('settings-saveGeneral', $lng->txt('save')); $settingsForm->setFormAction($ilCtrl->getFormAction($this->gui, 'settings-saveGeneral')); $tpl->setVariable('ADM_CONTENT', $settingsForm->getHtml()); }
protected function confirmTemplateSwitch() { global $ilCtrl, $ilTabs, $tpl; include_once './Services/DidacticTemplate/classes/class.ilDidacticTemplateObjSettings.php'; // Check if template is changed $new_tpl_id = (int) $_REQUEST['tplid']; if ($new_tpl_id == ilDidacticTemplateObjSettings::lookupTemplateId($this->getParentObject()->object->getRefId())) { $GLOBALS['ilLog']->write(__METHOD__ . ': Template id: ' . $new_tpl_id); ilUtil::sendInfo($this->lng->txt('didactic_not_changed'), true); $ilCtrl->returnToParent($this); } $ilTabs->clearTargets(); $ilTabs->clearSubTabs(); include_once './Services/Utilities/classes/class.ilConfirmationGUI.php'; $confirm = new ilConfirmationGUI(); $confirm->setFormAction($ilCtrl->getFormAction($this)); $confirm->setHeaderText($this->lng->txt('didactic_confirm_apply_new_template')); $confirm->setConfirm($this->lng->txt('apply'), 'switchTemplate'); $confirm->setCancel($this->lng->txt('cancel'), 'cancel'); if ($new_tpl_id) { include_once './Services/DidacticTemplate/classes/class.ilDidacticTemplateSetting.php'; $dtpl = new ilDidacticTemplateSetting($new_tpl_id); $confirm->addItem('tplid', $new_tpl_id, $dtpl->getTitle() . '<div class="il_Description">' . $dtpl->getDescription() . ' ' . '</div>'); } else { $confirm->addItem('tplid', $new_tpl_id, $this->lng->txt('default') . ' ' . '<div class="il_Description">' . sprintf($this->lng->txt('didactic_default_type_info'), $this->lng->txt('objs_' . $this->getParentObject()->object->getType())) . '</div>'); } $tpl->setContent($confirm->getHTML()); }
/** * Suggest a range for a result * * @access public */ function suggestRange() { if ($this->writePostData()) { ilUtil::sendInfo($this->getErrorMessage()); } $this->editQuestion(); }
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"); } }
/** * Constructor * @access public */ function ilObjectStatusGUI(&$a_obj) { global $ilUser, $ilCtrl, $ilias, $ilErr, $lng, $rbacreview; $this->ctrl =& $ilCtrl; $this->object =& $a_obj; $this->tpl = new ilTemplate("tpl.info_layout.html", false, false, "Services/AccessControl"); $this->tpl->setVariable("INFO_REMARK_INTERRUPTED", $lng->txt('info_remark_interrupted')); if (empty($_POST['Fuserid'])) { $this->user =& $ilUser; } else { if ($_POST['Fselect_type'] == "id") { $this->user = $ilias->obj_factory->getInstanceByObjId($_POST['Fuserid'], false); } else { include_once 'Services/User/classes/class.ilObjUser.php'; $user_id = ilObjUser::_lookupId($_POST['Fuserid']); $this->user = $ilias->obj_factory->getInstanceByObjId($user_id, false); } if ($this->user === false or $this->user->getType() != 'usr') { $this->user =& $ilUser; ilUtil::sendFailure($lng->txt('info_err_user_not_exist')); } else { ilUtil::sendInfo($lng->txt('info_user_view_changed')); } } // get all user roles and all valid roles in scope $this->user_roles = $rbacreview->assignedRoles($this->user->getId()); $this->global_roles = $rbacreview->getGlobalRoles(); $this->valid_roles = $rbacreview->getParentRoleIds($this->object->getRefId()); $this->assigned_valid_roles = $this->getAssignedValidRoles(); $this->getPermissionInfo(); $this->getRoleAssignmentInfo(); $this->getObjectSummary(); }
/** * Save the license form * @access public */ function updateLicense() { $this->license->setLicenses((int) $_REQUEST["licenses"]); $this->license->setRemarks($_REQUEST["remarks"]); $this->license->update(); ilUtil::sendInfo($this->lng->txt('license_updated'), true); $this->ctrl->redirect($this, "editLicense"); }
/** * Configure screen */ function configure() { global $tpl; $pl = $this->getPluginObject(); ilUtil::sendInfo($pl->txt("nothing_to_configure"), false); return; $form = $this->initConfigurationForm(); $tpl->setContent($form->getHTML()); }
/** * Constructor * * @param object $a_parent_obj parent gui object * @param string $a_parent_cmd parent default command * @param object $a_handler workspace access handler * @param bool $a_load_data * @param int $a_parent_node_id */ function __construct($a_parent_obj, $a_parent_cmd, $a_handler, $a_parent_node_id = null, $a_load_data = false) { global $ilCtrl, $lng; $this->handler = $a_handler; if (stristr(get_class($a_parent_obj), "portfolio")) { $this->parent_node_id = $a_parent_node_id; $this->portfolio_mode = true; } parent::__construct($a_parent_obj, $a_parent_cmd); $this->setId("il_tbl_wspsh"); $this->setTitle($lng->txt("wsp_shared_resources")); $this->addColumn($this->lng->txt("lastname"), "lastname"); $this->addColumn($this->lng->txt("firstname"), "firstname"); $this->addColumn($this->lng->txt("login"), "login"); if (!$this->portfolio_mode) { $this->addColumn($this->lng->txt("wsp_shared_object_type"), "obj_type"); } $this->addColumn($this->lng->txt("wsp_shared_date"), "acl_date"); $this->addColumn($this->lng->txt("wsp_shared_title"), "title"); $this->addColumn($this->lng->txt("wsp_shared_type")); if (!$this->portfolio_mode) { $this->addColumn($this->lng->txt("action")); } $this->setDefaultOrderField("acl_date"); $this->setDefaultOrderDirection("desc"); $this->setFormAction($ilCtrl->getFormAction($a_parent_obj)); $this->setRowTemplate("tpl.shared_row.html", "Services/PersonalWorkspace"); $this->setDisableFilterHiding(true); $this->setResetCommand("resetsharefilter", $this->lng->txt("wsp_shared_filter_reset_button")); $this->setFilterCommand("applysharefilter", $this->lng->txt("wsp_shared_filter_button")); $this->initFilter(); // reset will remove all filters if ($this->portfolio_mode && !$this->filter["obj_type"]) { $this->filter["obj_type"] = "prtf"; } if ($a_load_data) { /* if(($this->filter["user"] && strlen($this->filter["user"]) > 3) || ($this->filter["title"] && strlen($this->filter["title"]) > 3) || $this->filter["acl_date"] || $this->filter["obj_type"] || $this->filter["acl_type"] || $this->filter["crsgrp"]) { */ // #16630 $this->importData(); include_once "Services/User/classes/class.ilUserUtil.php"; return; } else { ilUtil::sendInfo($lng->txt("wsp_shared_mandatory_filter_info")); } // initial state: show filters only $this->disable("header"); $this->disable("content"); }
function postOutputProcessing($a_output) { global $lng; if ($this->getOutputMode() == IL_PAGE_PREVIEW) { if (!$this->getPageObject()->getActive()) { ilUtil::sendInfo($lng->txt("adm_imprint_inactive")); } } return $a_output; }
/** * Evaluates a posted edit form and writes the form data in the question object * * @return integer A positive value, if one of the required fields wasn't set, else 0 * @access private */ function writePostData($always = false) { $hasErrors = !$always ? $this->editQuestion(true) : false; if (!$hasErrors) { $this->object->setTitle($_POST["title"]); $this->object->setAuthor($_POST["author"]); $this->object->setComment($_POST["comment"]); include_once "./Services/AdvancedEditing/classes/class.ilObjAdvancedEditing.php"; $questiontext = $_POST["question"]; $this->object->setQuestion($questiontext); $this->object->setShuffle($_POST["shuffle"]); $this->object->setEstimatedWorkingTime($_POST["Estimated"]["hh"], $_POST["Estimated"]["mm"], $_POST["Estimated"]["ss"]); $this->object->setFeedbackSetting($_POST['feedback_setting']); if ($this->getSelfAssessmentEditingMode()) { $this->object->setNrOfTries($_POST['nr_of_tries']); } $this->object->setMultilineAnswerSetting($_POST["types"]); if (is_array($_POST['choice']['imagename']) && $_POST["types"] == 1) { $this->object->isSingleline = true; ilUtil::sendInfo($this->lng->txt('info_answer_type_change'), true); } else { $this->object->isSingleline = $_POST["types"] == 0 ? true : false; } $this->object->setThumbSize(strlen($_POST["thumb_size"]) ? $_POST["thumb_size"] : ""); // Delete all existing answers and create new answers from the form data $this->object->flushAnswers(); if ($this->object->isSingleline) { foreach ($_POST['choice']['answer'] as $index => $answertext) { $picturefile = $_POST['choice']['imagename'][$index]; $file_org_name = $_FILES['choice']['name']['image'][$index]; $file_temp_name = $_FILES['choice']['tmp_name']['image'][$index]; if (strlen($file_temp_name)) { // check suffix $suffix = strtolower(array_pop(explode(".", $file_org_name))); if (in_array($suffix, array("jpg", "jpeg", "png", "gif"))) { // upload image $filename = $this->object->createNewImageFileName($file_org_name); if ($this->object->setImageFile($filename, $file_temp_name) == 0) { $picturefile = $filename; } } } $this->object->addAnswer($answertext, $_POST['choice']['points'][$index], $_POST['choice']['points_unchecked'][$index], $index, $picturefile); } } else { foreach ($_POST['choice']['answer'] as $index => $answer) { $answertext = $answer; $this->object->addAnswer($answertext, $_POST['choice']['points'][$index], $_POST['choice']['points_unchecked'][$index], $index); } } return 0; } else { return 1; } }
public function saveSorting() { if (count($_POST['sorting'])) { foreach ($_POST['sorting'] as $topic_id => $sorting_value) { $oTopic = new ilShopTopic($topic_id); $oTopic->setCustomSorting((int) $sorting_value); $oTopic->saveCustomSorting(); } } ilUtil::sendInfo($this->lng->txt('saved_successfully')); return $this->showTopicsSortingTable(); }
/** * On feedback editing forwarding */ function onFeedbackEditingForwarding() { global $lng; if (strtolower($_GET["cmdClass"]) == "ilassquestionfeedbackeditinggui") { include_once "./Modules/LearningModule/classes/class.ilObjContentObject.php"; if (ilObjContentObject::_lookupDisableDefaultFeedback($this->getPageObject()->getParentId())) { ilUtil::sendInfo($lng->txt("cont_def_feedb_deactivated")); } else { ilUtil::sendInfo($lng->txt("cont_def_feedb_activated")); } } }
/** * Show subscription info */ protected function show() { $token = $this->createToken(); ilUtil::sendInfo($GLOBALS['lng']->txt('cal_subscription_info')); include_once './Services/InfoScreen/classes/class.ilInfoScreenGUI.php'; $info = new ilInfoScreenGUI($this); $info->setFormAction($GLOBALS['ilCtrl']->getFormAction($this)); $hash = $this->createToken(); $url = ILIAS_HTTP_PATH . '/calendar.php?client_id=' . CLIENT_ID . '&token=' . $hash; $info->addSection($this->getCalendar()->getTitle()); $info->addProperty('Abonnieren', $url, $url); $GLOBALS['tpl']->setContent($info->getHTML()); }
function render() { global $tpl, $ilSetting, $lng; if ($ilSetting->get('last_cronjob_start_ts')) { $tstamp = ilDatePresentation::formatDate(new ilDateTime($ilSetting->get('last_cronjob_start_ts'), IL_CAL_UNIX)); } else { $tstamp = $lng->txt('cronjob_last_start_unknown'); } ilUtil::sendInfo($lng->txt('cronjob_last_start') . ": " . $tstamp); include_once "Services/Cron/classes/class.ilCronManagerTableGUI.php"; $tbl = new ilCronManagerTableGUI($this, "render"); $tpl->setContent($tbl->getHTML()); }
public function decryptSignature() { $form = new certCheckSignatureFormGUI(); if (!$form->checkInput()) { ilUtil::sendFailure($this->pl->txt('decrypt_failed'), true); } $public_key = openssl_get_publickey('file://' . ilCertificateConfig::get('signature_publickey')); openssl_public_decrypt(base64_decode($form->getInput('signature')), $decrypted, $public_key); if ($decrypted) { ilUtil::sendInfo($this->pl->txt('decrypt_successful') . '<br/>' . $decrypted, true); } else { ilUtil::sendFailure($this->pl->txt('decrypt_failed'), true); } }
/** * Get pages for list. */ function getGroups() { global $lng; $data = array(); $subitems = ilObjRepositorySettings::getNewItemGroupSubItems(); if ($subitems[0]) { ilUtil::sendInfo(sprintf($lng->txt("rep_new_item_group_unassigned_subitems"), sizeof($subitems[0]))); unset($subitems[0]); } foreach (ilObjRepositorySettings::getNewItemGroups() as $item) { $data[] = array("id" => $item["id"], "pos" => $item["pos"], "title" => $item["title"], "type" => $item["type"], "subitems" => sizeof($subitems[$item["id"]])); } $data = ilUtil::sortArray($data, "pos", "asc", true); $this->setData($data); }
/** * List skills */ function listSkills() { global $tpl, $ilToolbar, $ilCtrl, $lng, $ilTabs; $skmg_set = new ilSetting("skmg"); $enable_skmg = $skmg_set->get("enable_skmg"); if (!$enable_skmg) { ilUtil::sendInfo($lng->txt("skmg_skill_management_deactivated")); } $this->getParentGUI()->showTree(false, $this, "listSkills"); $ilTabs->activateTab("skills"); include_once "./Services/Skill/classes/class.ilSkillCategoryGUI.php"; ilSkillCategoryGUI::addCreationButtons(); include_once "./Services/Skill/classes/class.ilSkillCatTableGUI.php"; $table = new ilSkillCatTableGUI($this, "listSkills", (int) $_GET["obj_id"], ilSkillCatTableGUI::MODE_SCAT); $tpl->setContent($table->getHTML()); }
/** * Unbans users fetched from $_REQUEST['banned_user_id']. * * @global ilCtrl2 $ilCtrl */ public function delete() { /** * @var $ilCtrl ilCtrl * @var $lng ilLanguage */ global $ilCtrl, $lng; $users = $_REQUEST['banned_user_id']; if (!is_array($users)) { ilUtil::sendInfo($lng->txt('no_checkbox'), true); $ilCtrl->redirect($this->gui, 'ban-show'); } $room = ilChatroom::byObjectId($this->gui->object->getId()); $room->unbanUser($users); $ilCtrl->redirect($this->gui, 'ban-show'); }
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, 'questions', $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)); $this->tpl->parseCurrentBlock(); }
/** * 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}(); } }
/** * Render list of booking schedules * * uses ilBookingSchedulesTableGUI */ function render() { global $tpl, $lng, $ilCtrl, $ilAccess; include_once 'Modules/BookingManager/classes/class.ilBookingSchedulesTableGUI.php'; $table = new ilBookingSchedulesTableGUI($this, 'render', $this->ref_id); if ($ilAccess->checkAccess('write', '', $this->ref_id)) { // if we have schedules but no objects - show info if (sizeof($table->getData())) { include_once "Modules/BookingManager/classes/class.ilBookingObject.php"; if (!sizeof(ilBookingObject::getList(ilObject::_lookupObjId($this->ref_id)))) { ilUtil::sendInfo($lng->txt("book_type_warning")); } } include_once 'Services/UIComponent/Toolbar/classes/class.ilToolbarGUI.php'; $bar = new ilToolbarGUI(); $bar->addButton($lng->txt('book_add_schedule'), $ilCtrl->getLinkTarget($this, 'create')); $bar = $bar->getHTML(); } $tpl->setContent($bar . $table->getHTML()); }
private function forwardToDefault() { global $ilCtrl, $lng; $is_vendor = ilPaymentVendors::_isVendor($this->user_obj->getId()); $has_stat_perm = ilPaymentTrustees::_hasStatisticPermission($this->user_obj->getId()); $has_obj_perm = ilPaymentTrustees::_hasObjectPermission($this->user_obj->getId()); $has_coup_perm = ilPaymentTrustees::_hasCouponsPermission($this->user_obj->getId()); if ($is_vendor || $has_stat_perm) { $ilCtrl->redirectByClass('ilpaymentstatisticgui'); } else { if ($has_obj_perm) { $ilCtrl->redirectByClass('ilpaymentobjectgui'); } else { if ($has_coup_perm) { $ilCtrl->redirectByClass('ilpaymentcoupongui'); } } } ilUtil::sendInfo($lng->txt("no_permission")); return false; }
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()); } }
/** * Constructor */ function __construct($a_parent_obj, $a_parent_cmd, $a_survey, $a_base_skill_id, $a_tref_id) { global $ilCtrl, $lng, $ilAccess, $lng; $this->object = $a_survey; $this->base_skill_id = $a_base_skill_id; $this->tref_id = $a_tref_id; $this->determineMaxScalesAndQuestions(); ilUtil::sendInfo($lng->txt("survey_skill_nr_q") . ": " . count($this->question_ids) . ", " . $lng->txt("survey_skill_max_scale_points") . ": " . $this->scale_sum); include_once "./Modules/Survey/classes/class.ilSurveySkillThresholds.php"; $this->skill_thres = new ilSurveySkillThresholds($this->object); $this->thresholds = $this->skill_thres->getThresholds(); parent::__construct($a_parent_obj, $a_parent_cmd); include_once "./Modules/Survey/classes/class.ilSurveySkill.php"; $this->skill_survey = new ilSurveySkill($a_survey); $this->setData($this->getLevels()); $this->setTitle(ilBasicSkill::_lookupTitle($this->base_skill_id)); $this->addColumn($this->lng->txt("survey_skill_level")); $this->addColumn($this->lng->txt("survey_up_to_x_points")); $this->setRowTemplate("tpl.svy_skill_threshold_row.html", "Modules/Survey"); // $this->addMultiCommand("saveThresholds", $lng->txt("save")); $this->addCommandButton("saveThresholds", $lng->txt("save")); $this->setFormAction($ilCtrl->getFormAction($this->parent_obj)); }
/** * confirm delete for multiple entries */ public function confirmDelete() { global $tpl; if (!isset($_REQUEST['apps'])) { ilUtil::sendFailure($this->lng->txt('select_one')); return $this->appointmentList(); } include_once './Services/Utilities/classes/class.ilConfirmationGUI.php'; $this->ctrl->saveParameter($this, array('seed', 'app_id', 'dt')); $confirm = new ilConfirmationGUI(); $confirm->setFormAction($this->ctrl->getFormAction($this)); $confirm->setHeaderText($this->lng->txt('cal_delete_app_sure')); $confirm->setCancel($this->lng->txt('cancel'), 'cancel'); include_once 'Services/Calendar/classes/class.ilCalendarEntry.php'; $bookings_available = array(); foreach ((array) $_REQUEST['apps'] as $entry_id) { $entry = new ilCalendarEntry($entry_id); $confirm->addItem('apps[]', $entry_id, ilDatePresentation::formatDate($entry->getStart()) . ', ' . $entry->getTitle()); include_once './Services/Booking/classes/class.ilBookingEntry.php'; if (ilBookingEntry::lookupBookingsForAppointment($entry_id)) { $bookings_available[] = ilDatePresentation::formatDate($entry->getStart()) . ', ' . $entry->getTitle(); } } if ($bookings_available) { ilUtil::sendInfo($this->lng->txt('cal_ch_delete_app_booking_info') . '<br />' . implode('<br />', $bookings_available)); } $confirm->setConfirm($this->lng->txt('delete'), 'delete'); $confirm->setCancel($this->lng->txt('cancel'), 'appointmentList'); $tpl->setContent($confirm->getHTML()); }
function index($show_delete = false) { global $ilUser, $rbacreview, $rbacsystem; $this->tpl->addBlockfile('ADM_CONTENT', 'adm_content', 'tpl.cat_admin_users.html', "Modules/Category"); if (count($rbacreview->getGlobalAssignableRoles()) or in_array(SYSTEM_ROLE_ID, $rbacreview->assignedRoles($ilUser->getId()))) { $this->toolbar->addButton($this->lng->txt('add_user'), $this->ctrl->getLinkTargetByClass('ilobjusergui', 'create')); $this->toolbar->addButton($this->lng->txt('import_users'), $this->ctrl->getLinkTargetByClass('ilobjuserfoldergui', 'importUserForm')); } else { ilUtil::sendInfo($this->lng->txt('no_roles_user_can_be_assigned_to')); } if ($show_delete) { $this->tpl->setCurrentBlock("confirm_delete"); $this->tpl->setVariable("CONFIRM_FORMACTION", $this->ctrl->getFormAction($this)); $this->tpl->setVariable("TXT_CANCEL", $this->lng->txt('cancel')); $this->tpl->setVariable("CONFIRM_CMD", 'performDeleteUsers'); $this->tpl->setVariable("TXT_CONFIRM", $this->lng->txt('delete')); $this->tpl->parseCurrentBlock(); } $table = new ilUserTableGUI($this, 'index', ilUserTableGUI::MODE_LOCAL_USER); $this->tpl->setVariable('USERS_TABLE', $table->getHTML()); return true; }
/** * Show multi-feedback screen * * @param * @return */ function showMultiFeedbackObject(ilPropertyFormGUI $a_form = null) { global $ilTabs, $ilToolbar, $lng, $tpl; $ass_id = (int) $_GET["ass_id"]; ilUtil::sendInfo($lng->txt("exc_multi_feedb_info")); $ilTabs->activateTab("grades"); $this->checkPermission("write"); $this->addSubmissionSubTabs("assignment"); // #13719 include_once "./Services/UIComponent/Button/classes/class.ilLinkButton.php"; $button = ilLinkButton::getInstance(); $button->setCaption("exc_download_zip_structure"); $button->setUrl($this->ctrl->getLinkTarget($this, "downloadMultiFeedbackZip")); $button->setOmitPreventDoubleSubmission(true); $ilToolbar->addButtonInstance($button); if (!$a_form) { $a_form = $this->initMultiFeedbackForm($ass_id); } $tpl->setContent($a_form->getHTML()); }