46 public function __construct($a_parent_gui, $a_obj_id, $a_modes)
50 $this->ctrl = $DIC->ctrl();
51 $this->gui = $a_parent_gui;
52 $this->modes = $a_modes;
53 $this->obj_id = $a_obj_id;
66 $next_class =
$ilCtrl->getNextClass($this);
67 $cmd =
$ilCtrl->getCmd(
'editSettings');
69 switch ($next_class) {
87 $lng = $DIC->language();
89 $lng->loadLanguageModule(
"obj");
92 if (in_array(self::INFO_TAB_VISIBILITY, $services)) {
97 self::INFO_TAB_VISIBILITY,
101 $info->setInfo(
$lng->txt(
'obj_tool_setting_info_tab_info'));
106 if (in_array(self::CALENDAR_VISIBILITY, $services)) {
107 include_once
'./Services/Calendar/classes/class.ilObjCalendarSettings.php';
112 include_once
'./Services/Calendar/classes/class.ilObjCalendarSettings.php';
115 $cal->setInfo(
$lng->txt(
'obj_tool_setting_calendar_info'));
121 if (in_array(self::USE_NEWS, $services)) {
129 $news->setChecked($checked);
130 $info =
$lng->txt(
'obj_tool_setting_use_news_info');
132 $info .=
" <a href='" .
$ilCtrl->getLinkTargetByClass(
"ilcontainernewssettingsgui",
"") .
133 "'>ยป " .
$lng->txt(
'obj_tool_setting_use_news_open_settings') .
"</a>";
135 $news->setInfo(
$info);
138 if (in_array(self::NEWS_VISIBILITY, $services)) {
139 if (
$ilSetting->get(
'block_activated_news')) {
145 self::NEWS_VISIBILITY,
149 $news->setInfo(
$lng->txt(
'obj_tool_setting_news_info'));
155 include_once
'Services/Membership/classes/class.ilMembershipNotifications.php';
162 if (in_array(self::CUSTOM_METADATA, $services)) {
164 $md->
setInfo(
$lng->txt(
'obj_tool_setting_custom_metadata_info'));
168 self::CUSTOM_METADATA,
175 if (in_array(self::TAG_CLOUD, $services)) {
177 if ($tags_active->get(
"enable",
false)) {
179 $tag->setInfo(
$lng->txt(
'obj_tool_setting_tag_cloud_info'));
191 if (in_array(self::TAXONOMIES, $services)) {
203 if (in_array(self::AUTO_RATING_NEW_OBJECTS, $services)) {
204 $lng->loadLanguageModule(
"rating");
210 $rate->setInfo(
$lng->txt(
'rating_new_objects_auto_info'));
213 self::AUTO_RATING_NEW_OBJECTS,
220 if (in_array(self::BADGES, $services)) {
221 include_once
'Services/Badge/classes/class.ilBadgeHandler.php';
224 $bdg->
setInfo(
$lng->txt(
'obj_tool_setting_badges_info'));
234 if (in_array(self::ORGU_POSITION_ACCESS, $services)) {
239 $position_settings->isActive()
243 self::ORGU_POSITION_ACCESS
245 $lia->setInfo(
$GLOBALS[
'DIC']->
language()->txt(
'obj_orgunit_positions_info'));
250 if (!$position_settings->isChangeableForObject()) {
251 $lia->setDisabled(
true);
258 if (in_array(self::SKILLS, $services)) {
260 if ($skmg_set->get(
"enable_skmg")) {
262 $skill->
setInfo(
$lng->txt(
'obj_tool_setting_skills_info'));
289 if (in_array(self::INFO_TAB_VISIBILITY, $services)) {
290 include_once
'./Services/Container/classes/class.ilContainer.php';
295 if (in_array(self::CALENDAR_VISIBILITY, $services)) {
296 include_once
'./Services/Calendar/classes/class.ilCalendarSettings.php';
298 include_once
'./Services/Container/classes/class.ilContainer.php';
304 if (in_array(self::USE_NEWS, $services)) {
305 include_once
'./Services/Container/classes/class.ilContainer.php';
308 if (in_array(self::NEWS_VISIBILITY, $services)) {
309 include_once
'./Services/Container/classes/class.ilContainer.php';
315 include_once
"Services/Membership/classes/class.ilMembershipNotifications.php";
321 if (in_array(self::AUTO_RATING_NEW_OBJECTS, $services)) {
322 include_once
'./Services/Container/classes/class.ilContainer.php';
327 if (in_array(self::TAXONOMIES, $services)) {
328 include_once
'./Services/Container/classes/class.ilContainer.php';
333 if (in_array(self::TAG_CLOUD, $services)) {
334 include_once
'./Services/Container/classes/class.ilContainer.php';
339 if (in_array(self::CUSTOM_METADATA, $services)) {
340 include_once
'./Services/Container/classes/class.ilContainer.php';
345 if (in_array(self::BADGES, $services)) {
346 include_once
'Services/Badge/classes/class.ilBadgeHandler.php';
348 include_once
'./Services/Container/classes/class.ilContainer.php';
354 if (in_array(self::ORGU_POSITION_ACCESS, $services)) {
359 if ($position_settings->isActive() && $position_settings->isChangeableForObject()) {
361 $orgu_object_settings->setActive(
362 (
int) $form->
getInput(self::ORGU_POSITION_ACCESS)
364 $orgu_object_settings->update();
369 if (in_array(self::SKILLS, $services)) {
371 if ($skmg_set->get(
"enable_skmg")) {
372 include_once
'./Services/Container/classes/class.ilContainer.php';
402 $ilCtrl->returnToParent($this);
413 $tpl = $DIC->ui()->mainTemplate();
416 $form = $this->initSettingsForm();
429 $lng = $DIC->language();
432 $form = $this->initSettingsForm();
433 if (
$form->checkInput()) {
434 include_once
'./Services/Calendar/classes/class.ilCalendarSettings.php';
440 ilUtil::sendSuccess(
$lng->txt(
'settings_saved'),
true);
441 $ctrl->redirect($this);
445 $form->setValuesByPost();
456 return in_array($a_mode, $this->
getModes());
static _getInstance()
get singleton instance
Stores object activation status of orgunit position settings.
executeCommand()
Control class handling.
const CALENDAR_VISIBILITY
isModeActive($a_mode)
Check if specific mode is active.
static lookupCalendarActivated($a_obj_id)
updateToolSettings()
Update settings.
static _getAllReferences($a_id)
get all reference ids of object
static getInstance()
Get instance.
__construct($a_parent_gui, $a_obj_id, $a_modes)
Constructor.
static addToSettingsForm($a_ref_id, ilPropertyFormGUI $a_form=null, ilFormPropertyGUI $a_input=null)
Add notification settings to form.
if(isset($_POST['submit'])) $form
static updateServiceSettingsForm($a_obj_id, ilPropertyFormGUI $form, $services)
Update service settings.
static _lookupType($a_id, $a_reference=false)
lookup object type
const AUTO_RATING_NEW_OBJECTS
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
static initServiceSettingsForm($a_obj_id, ilPropertyFormGUI $form, $services)
Init service settings form.
const INFO_TAB_VISIBILITY
static _writeContainerSetting($a_id, $a_keyword, $a_value)
editSettings(ilPropertyFormGUI $form=null)
Edit tool settings (calendar, news, comments, ...)
GUI class for service settings (calendar, notes, comments)
const ORGU_POSITION_ACCESS
static importFromForm($a_ref_id, ilPropertyFormGUI $a_form=null)
Import notification settings from form.
if(function_exists('posix_getuid') &&posix_getuid()===0) if(!array_key_exists('t', $options)) $tag
$GLOBALS['JPEG_Segment_Names']
Global Variable: XMP_tag_captions.
static _lookupContainerSetting($a_id, $a_keyword, $a_default_value=null)
Lookup a container setting.
getModes()
Get active modes.
static getInstance()
Constructor.