function confirmedDeactivate() { global $ilCtrl, $lng; $jobs = $this->getMultiActionData(); if ($jobs) { foreach ($jobs as $job) { if (ilCronManager::isJobActive($job->getId())) { ilCronManager::deactivateJob($job, true); } } ilUtil::sendSuccess($lng->txt("cron_action_deactivate_success"), true); } $ilCtrl->redirect($this, "render"); }
/** * @return ilPropertyFormGUI */ protected function getSettingsForm() { require_once 'Services/Form/classes/class.ilPropertyFormGUI.php'; $form = new ilPropertyFormGUI(); $form->setFormAction($this->ctrl->getFormAction($this, 'saveSettings')); $form->setTitle($this->lng->txt('settings')); $frm_radio = new ilRadioGroupInputGUI($this->lng->txt('show_topics_overview'), 'forum_overview'); $frm_radio->addOption(new ilRadioOption($this->lng->txt('new') . ', ' . $this->lng->txt('is_read') . ', ' . $this->lng->txt('unread'), '0')); $frm_radio->addOption(new ilRadioOption($this->lng->txt('is_read') . ', ' . $this->lng->txt('unread'), '1')); $frm_radio->setInfo($this->lng->txt('topics_overview_info')); $form->addItem($frm_radio); $check = new ilCheckboxInputGui($this->lng->txt('enable_fora_statistics'), 'fora_statistics'); $check->setInfo($this->lng->txt('enable_fora_statistics_desc')); $form->addItem($check); $check = new ilCheckboxInputGui($this->lng->txt('enable_anonymous_fora'), 'anonymous_fora'); $check->setInfo($this->lng->txt('enable_anonymous_fora_desc')); $form->addItem($check); require_once 'Services/Cron/classes/class.ilCronManager.php'; if (ilCronManager::isJobActive('frm_notification')) { require_once 'Services/Administration/classes/class.ilAdministrationSettingsFormHandler.php'; ilAdministrationSettingsFormHandler::addFieldsToForm(ilAdministrationSettingsFormHandler::FORM_FORUM, $form, $this); } else { $notifications = new ilCheckboxInputGui($this->lng->txt('cron_forum_notification'), 'forum_notification'); $notifications->setInfo($this->lng->txt('cron_forum_notification_desc')); $notifications->setValue(1); $form->addItem($notifications); } require_once 'Services/Captcha/classes/class.ilCaptchaUtil.php'; $cap = new ilCheckboxInputGUI($this->lng->txt('adm_captcha_anonymous_short'), 'activate_captcha_anonym'); $cap->setInfo($this->lng->txt('adm_captcha_anonymous_frm')); $cap->setValue(1); if (!ilCaptchaUtil::checkFreetype()) { $cap->setAlert(ilCaptchaUtil::getPreconditionsMessage()); } $form->addItem($cap); $form->addCommandButton('saveSettings', $this->lng->txt('save')); $form->addCommandButton('cancel', $this->lng->txt('cancel')); return $form; }
function linkChecker() { global $ilias, $ilUser, $tpl; $this->__initLinkChecker(); $this->setTabs(); $this->setContentSubTabs("link_check"); require_once './Services/LinkChecker/classes/class.ilLinkCheckerTableGUI.php'; $toolbar = new ilToolbarGUI(); // #13684 include_once "Services/Cron/classes/class.ilCronManager.php"; if (ilCronManager::isJobActive("lm_link_check")) { include_once './Services/LinkChecker/classes/class.ilLinkCheckNotify.php'; include_once 'Services/Form/classes/class.ilPropertyFormGUI.php'; $chb = new ilCheckboxInputGUI($this->lng->txt('link_check_message_a'), 'link_check_message'); $chb->setValue(1); $chb->setChecked((bool) ilLinkCheckNotify::_getNotifyStatus($ilUser->getId(), $this->object->getId())); $chb->setOptionTitle($this->lng->txt('link_check_message_b')); $toolbar->addInputItem($chb); $toolbar->addFormButton($this->lng->txt('save'), 'saveLinkCheck'); $toolbar->setFormAction($this->ctrl->getLinkTarget($this, 'saveLinkCheck')); } $tgui = new ilLinkCheckerTableGUI($this, 'linkChecker'); $tgui->setLinkChecker($this->link_checker_obj)->setRowHandler($this)->setRefreshButton($this->lng->txt('refresh'), 'refreshLinkCheck'); return $tpl->setContent($tgui->prepareHTML()->getHTML() . $toolbar->getHTML()); }