/** * Init settings property form * * @access protected */ protected function initFormSettings() { global $lng, $ilSetting; $this->tabs_gui->setTabActive('settings'); $frma_set = new ilSetting("frma"); include_once 'Services/Form/classes/class.ilPropertyFormGUI.php'; $form = new ilPropertyFormGUI(); $form->setFormAction($this->ctrl->getFormAction($this)); $form->setTitle($this->lng->txt('settings')); $form->addCommandButton('saveSettings', $this->lng->txt('save')); $form->addCommandButton('cancel', $this->lng->txt('cancel')); // forum overview $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->setValue($frma_set->get('forum_overview')); $frm_radio->setInfo($this->lng->txt('topics_overview_info')); $form->addItem($frm_radio); $this->fora_statistics = (bool) $ilSetting->get('enable_fora_statistics', false); $this->anonymous_fora = (bool) $ilSetting->get('enable_anonymous_fora', false); $check = new ilCheckboxInputGui($this->lng->txt('enable_fora_statistics'), 'fora_statistics'); $check->setInfo($this->lng->txt('enable_fora_statistics_desc')); $check->setChecked($this->fora_statistics); $form->addItem($check); $check = new ilCheckboxInputGui($this->lng->txt('enable_anonymous_fora'), 'anonymous_fora'); $check->setInfo($this->lng->txt('enable_anonymous_fora_desc')); $check->setChecked($this->anonymous_fora); $form->addItem($check); $frm_sel = new ilSelectInputGUI($this->lng->txt('cron_forum_notification'), 'forum_notification'); $notification_options = array(0 => $this->lng->txt('cron_forum_notification_never'), 1 => $this->lng->txt('cron_forum_notification_directly'), 2 => $this->lng->txt('cron_forum_notification_cron')); $frm_sel->setOptions($notification_options); $frm_sel->setValue($ilSetting->get('forum_notification')); $frm_sel->setInfo($this->lng->txt('cron_forum_notification_desc')); $form->addItem($frm_sel); $this->tpl->setContent($form->getHTML()); }
/** * Edit learning resources settings. */ public function editSettings() { global $ilCtrl, $lng, $ilSetting; $lm_set = new ilSetting("lm"); $lic_set = new ilSetting("license"); $lng->loadLanguageModule("license"); $lng->loadLanguageModule("scormdebug"); include_once "./Services/Form/classes/class.ilPropertyFormGUI.php"; $form = new ilPropertyFormGUI(); $form->setFormAction($ilCtrl->getFormAction($this)); $form->setTitle($lng->txt("cont_lrs_settings")); // Page History $cb_prop = new ilCheckboxInputGUI($lng->txt("cont_enable_page_history"), "page_history"); $cb_prop->setInfo($lng->txt("cont_enable_page_history_info")); $cb_prop->setChecked($lm_set->get("page_history", 1)); $form->addItem($cb_prop); // Time scheduled page activation $cb_prop = new ilCheckboxInputGUI($lng->txt("cont_enable_time_scheduled_page_activation"), "time_scheduled_page_activation"); $cb_prop->setInfo($lng->txt("cont_enable_time_scheduled_page_activation_info")); $cb_prop->setChecked($lm_set->get("time_scheduled_page_activation")); $form->addItem($cb_prop); // Activate replace media object function $cb_prop = new ilCheckboxInputGUI($lng->txt("cont_replace_mob_feature"), "replace_mob_feature"); $cb_prop->setInfo($lng->txt("cont_replace_mob_feature_info")); $cb_prop->setChecked($lm_set->get("replace_mob_feature")); $form->addItem($cb_prop); // Activate HTML export IDs $cb_prop = new ilCheckboxInputGUI($lng->txt("cont_html_export_ids"), "html_export_ids"); $cb_prop->setInfo($lng->txt("cont_html_export_ids_info")); $cb_prop->setChecked($lm_set->get("html_export_ids")); $form->addItem($cb_prop); // Upload dir for learning resources $tx_prop = new ilTextInputGUI($lng->txt("cont_upload_dir"), "cont_upload_dir"); $tx_prop->setInfo($lng->txt("cont_upload_dir_info")); $tx_prop->setValue($lm_set->get("cont_upload_dir")); $form->addItem($tx_prop); // license activation $cb_prop = new ilCheckboxInputGUI($lng->txt("license_counter"), "license_counter"); $cb_prop->setInfo($lng->txt("license_counter_info")); $cb_prop->setChecked($lic_set->get("license_counter")); $form->addItem($cb_prop); // license warning $tx_prop = new ilTextInputGUI($lng->txt("license_warning"), "license_warning"); $tx_prop->setSize(5); $tx_prop->setInfo($lng->txt("license_warning_info")); $tx_prop->setValue($lic_set->get("license_warning")); $form->addItem($tx_prop); // scormDebugger activation $cb_prop = new ilCheckboxInputGUI($lng->txt("scormdebug_global_activate"), "scormdebug_global_activate"); $cb_prop->setInfo($lng->txt("scormdebug_global_activate_info")); $cb_prop->setChecked($lm_set->get("scormdebug_global_activate")); $form->addItem($cb_prop); // scorm2004 login instead of userId for cmi.learner_id $cb_prop = new ilCheckboxInputGUI($lng->txt("scorm_login_as_learner_id"), "scorm_login_as_learner_id"); $cb_prop->setInfo($lng->txt("scorm_login_as_learner_id_info")); $cb_prop->setChecked($lm_set->get("scorm_login_as_learner_id")); $form->addItem($cb_prop); // scorm2004 disableRTECaching $cb_prop = new ilCheckboxInputGUI($lng->txt("scormdebug_disable_cache"), "scormdebug_disable_cache"); $cb_prop->setInfo($lng->txt("scormdebug_disable_cache_info")); $cb_prop->setChecked($lm_set->get("scormdebug_disable_cache")); $form->addItem($cb_prop); // scorm2004 without session $cb_prop = new ilCheckboxInputGUI($lng->txt("scorm_without_session"), "scorm_without_session"); $cb_prop->setInfo($lng->txt("scorm_without_session_info")); $cb_prop->setChecked($lm_set->get("scorm_without_session")); $form->addItem($cb_prop); $privacy = ilPrivacySettings::_getInstance(); $check = new ilCheckboxInputGui($lng->txt('enable_sahs_protocol_data'), 'enable_sahs_pd'); $check->setInfo($this->lng->txt('enable_sahs_protocol_data_desc')); $check->setChecked($privacy->enabledSahsProtocolData()); $form->addItem($check); // command buttons $form->addCommandButton("saveSettings", $lng->txt("save")); $form->addCommandButton("view", $lng->txt("cancel")); $this->tpl->setContent($form->getHTML()); }
/** * Show Privacy settings * * @access public */ public function showPrivacy() { $privacy = ilPrivacySettings::_getInstance(); $this->tabs_gui->setTabActive('show_privacy'); include_once "./Services/Form/classes/class.ilPropertyFormGUI.php"; $form = new ilPropertyFormGUI(); $form->setFormAction($this->ctrl->getFormAction($this)); $form->setTitle($this->lng->txt('ps_privacy_protection')); include_once 'Services/Membership/classes/class.ilMemberAgreement.php'; if (ilMemberAgreement::_hasAgreements()) { $html = new ilNonEditableValueGUI(); $html->setValue($this->lng->txt('ps_warning_modify')); $form->addItem($html); } $value = array(); if ($privacy->enabledCourseExport()) { $value[] = "export_course"; } if ($privacy->enabledGroupExport()) { $value[] = "export_group"; } if ($privacy->courseConfirmationRequired()) { $value[] = "export_confirm_course"; } if ($privacy->groupConfirmationRequired()) { $value[] = "export_confirm_group"; } if ($privacy->enabledGroupAccessTimes()) { $value[] = "grp_access_times"; } if ($privacy->enabledCourseAccessTimes()) { $value[] = "crs_access_times"; } $group = new ilCheckboxGroupInputGUI($this->lng->txt('ps_profile_export'), 'profile_protection'); $group->setValue($value); $check = new ilCheckboxOption(); $check->setTitle($this->lng->txt('ps_export_course')); $check->setValue('export_course'); $group->addOption($check); $check = new ilCheckboxOption(); $check->setTitle($this->lng->txt('ps_export_groups')); $check->setValue('export_group'); $group->addOption($check); $check = new ilCheckboxOption(); $check->setTitle($this->lng->txt('ps_export_confirm')); $check->setValue('export_confirm_course'); $group->addOption($check); $check = new ilCheckboxOption(); $check->setTitle($this->lng->txt('ps_export_confirm_group')); $check->setValue('export_confirm_group'); $group->addOption($check); $check = new ilCheckboxOption(); $check->setTitle($this->lng->txt('ps_show_grp_access')); $check->setValue('grp_access_times'); $group->addOption($check); $check = new ilCheckboxOption(); $check->setTitle($this->lng->txt('ps_show_crs_access')); $check->setValue('crs_access_times'); $group->addOption($check); $form->addItem($group); $check = new ilCheckboxInputGui($this->lng->txt('enable_fora_statistics'), 'fora_statistics'); $check->setInfo($this->lng->txt('enable_fora_statistics_desc')); $check->setChecked($privacy->enabledForaStatistics()); $form->addItem($check); $check = new ilCheckboxInputGui($this->lng->txt('enable_anonymous_fora'), 'anonymous_fora'); $check->setInfo($this->lng->txt('enable_anonymous_fora_desc')); $check->setChecked($privacy->enabledAnonymousFora()); $form->addItem($check); $check = new ilCheckboxInputGui($this->lng->txt('enable_sahs_protocol_data'), 'enable_sahs_pd'); $check->setInfo($this->lng->txt('enable_sahs_protocol_data_desc')); $check->setChecked($privacy->enabledSahsProtocolData()); $form->addItem($check); $check = new ilCheckboxInputGui($this->lng->txt('rbac_log'), 'rbac_log'); $check->setInfo($this->lng->txt('rbac_log_info')); $check->setChecked($privacy->enabledRbacLog()); $form->addItem($check); $age = new ilNumberInputGUI($this->lng->txt('rbac_log_age'), 'rbac_log_age'); $age->setInfo($this->lng->txt('rbac_log_age_info')); $age->setValue($privacy->getRbacLogAge()); $age->setMinValue(1); $age->setMaxValue(24); $age->setSize(2); $age->setMaxLength(2); $check->addSubItem($age); $form->addCommandButton('save_privacy', $this->lng->txt('save')); $this->tpl->setContent($form->getHTML()); }
protected function initSettingsForm() { global $rbacreview, $ilUser; $this->lng->loadLanguageModule('ps'); include_once './Services/PrivacySecurity/classes/class.ilPrivacySettings.php'; include_once './Services/PrivacySecurity/classes/class.ilSecuritySettings.php'; $privacy = ilPrivacySettings::_getInstance(); $security = ilSecuritySettings::_getInstance(); include_once "./Services/Form/classes/class.ilPropertyFormGUI.php"; $form = new ilPropertyFormGUI(); $form->setFormAction($this->ctrl->getFormAction($this, "saveSettings")); $form->setTitle($this->lng->txt('settings')); // protected admin $admin = new ilCheckboxInputGUI($GLOBALS['lng']->txt('adm_adm_role_protect'), 'admin_role'); $admin->setDisabled(!$rbacreview->isAssigned($ilUser->getId(), SYSTEM_ROLE_ID)); $admin->setInfo($this->lng->txt('adm_adm_role_protect_info')); $admin->setChecked((int) $security->isAdminRoleProtected()); $admin->setValue(1); $form->addItem($admin); $check = new ilCheckboxInputGui($this->lng->txt('rbac_log'), 'rbac_log'); $check->setInfo($this->lng->txt('rbac_log_info')); $check->setChecked($privacy->enabledRbacLog()); $form->addItem($check); $age = new ilNumberInputGUI($this->lng->txt('rbac_log_age'), 'rbac_log_age'); $age->setInfo($this->lng->txt('rbac_log_age_info')); $age->setValue($privacy->getRbacLogAge()); $age->setMinValue(1); $age->setMaxValue(24); $age->setSize(2); $age->setMaxLength(2); $check->addSubItem($age); $form->addCommandButton('saveSettings', $this->lng->txt('save')); return $form; }