37 bool $a_call_by_reference =
true,
38 bool $a_prepare_output =
true 42 $this->error = $DIC[
"ilErr"];
43 $this->
access = $DIC->access();
44 $this->rbacsystem = $DIC->rbac()->system();
46 $this->folder_settings =
new ilSetting(
'fold');
47 $this->
ctrl = $DIC->ctrl();
48 $this->
lng = $DIC->language();
49 $this->
toolbar = $DIC->toolbar();
53 $this->
lng->loadLanguageModule(
'rep');
54 $this->
lng->loadLanguageModule(
'cmps');
56 $this->admin_gui_request = $DIC
69 $next_class = $this->
ctrl->getNextClass($this);
70 $cmd = $this->
ctrl->getCmd();
74 if (!$ilAccess->checkAccess(
'read',
'', $this->object->getRefId())) {
78 switch ($next_class) {
79 case 'ilpermissiongui':
80 $this->tabs_gui->setTabActive(
'perm_settings');
82 $this->
ctrl->forwardCommand($perm_gui);
95 $this->tabs_gui->addTab(
97 $this->
lng->txt(
"settings"),
98 $this->
ctrl->getLinkTarget($this,
"view")
101 $this->tabs_gui->addTab(
103 $this->
lng->txt(
"rep_custom_icons"),
104 $this->
ctrl->getLinkTarget($this,
"customIcons")
107 $this->tabs_gui->addTab(
109 $this->
lng->txt(
"cmps_repository_object_types"),
110 $this->
ctrl->getLinkTarget($this,
"listModules")
113 if ($rbacsystem->
checkAccess(
'edit_permission', $this->object->getRefId())) {
114 $this->tabs_gui->addTab(
116 $this->
lng->txt(
"perm_settings"),
117 $this->
ctrl->getLinkTargetByClass(
'ilpermissiongui',
"perm")
124 $this->tabs_gui->activateTab(
"settings");
130 $this->tpl->setContent($a_form->getHTML());
139 $form->setTitle($this->
lng->txt(
"settings"));
140 $form->setFormAction($this->
ctrl->getFormAction($this,
'saveSettings'));
160 "" => $this->
lng->txt(
"adm_rep_tree_only_container"),
161 "tree" => $this->
lng->txt(
"adm_all_resource_types")
168 $this->
lng->txt(
"adm_rep_tree_only_cntr"),
170 $this->
lng->txt(
"adm_rep_tree_only_cntr_info")
172 $radg->addOption($op1);
175 $this->
lng->txt(
"adm_rep_tree_all_types"),
177 $this->
lng->txt(
"adm_rep_tree_all_types_info")
181 $cb =
new ilCheckboxInputGUI($this->
lng->txt(
"adm_rep_tree_limit_grp_crs"),
"rep_tree_limit_grp_crs");
182 $cb->setChecked((
bool)
$ilSetting->get(
"rep_tree_limit_grp_crs"));
183 $cb->
setInfo($this->
lng->txt(
"adm_rep_tree_limit_grp_crs_info"));
184 $op2->addSubItem($cb);
186 $radg->addOption($op2);
188 $form->addItem($radg);
193 $tree_limit->setInfo($this->
lng->txt(
"rep_tree_limit_info"));
194 $form->addItem($tree_limit);
197 $tree_limit_number =
new ilNumberInputGUI($this->
lng->txt(
"rep_tree_limit_number"),
"rep_tree_limit_number");
199 $tree_limit_number->setSize(3);
200 $tree_limit_number->setValue(
$ilSetting->get(
"rep_tree_limit_number"));
201 $tree_limit_number->setInfo($this->
lng->txt(
"rep_tree_limit_number_info"));
202 $tree_limit->addSubItem($tree_limit_number);
206 $cb->setChecked((
bool)
$ilSetting->get(
"rep_breadcr_crs"));
212 $op0 =
new ilRadioOption($this->
lng->txt(
"rep_breadcr_crs_overwrite"),
'1');
213 $cb0 =
new ilCheckboxInputGUI($this->
lng->txt(
"rep_crs_default_shortened"),
"rep_breadcr_crs_default");
214 $cb0->setChecked((
bool)
$ilSetting->get(
"rep_breadcr_crs_default"));
216 $radg->addOption($op0);
218 $op1 =
new ilRadioOption($this->
lng->txt(
"rep_breadcr_crs_overwrite_not"),
'0');
219 $radg->addOption($op1);
228 $cb->
setInfo($this->
lng->txt(
"enable_trash_info"));
230 $cb->setChecked(
true);
235 $this->
lng->loadLanguageModule(
"trac");
236 $event =
new ilCheckboxInputGUI($this->
lng->txt(
'trac_show_repository_views'),
'change_event_tracking');
237 $event->
setInfo($this->
lng->txt(
"trac_show_repository_views_info"));
239 $form->addItem($event);
251 $exp_limit->
setValue((
string) $limiter->getLimitationMode());
252 $exp_limit->setInfo($this->
lng->txt(
"rep_export_limitation_info"));
255 $this->
lng->txt(
"rep_export_limitation_disabled"),
258 $exp_limit->addOption($op_disabled);
261 $this->
lng->txt(
"rep_export_limitation_limited"),
264 $exp_limit->addOption($op_limited);
267 $exp_limit_num =
new ilNumberInputGUI($this->
lng->txt(
"rep_export_limit_number"),
"rep_export_limit_number");
269 $exp_limit_num->setSize(6);
270 $exp_limit_num->setValue(
$ilSetting->get(
"rep_export_limit_number"));
271 $op_limited->addSubItem($exp_limit_num);
273 $form->addItem($exp_limit);
276 $dl_prop =
new ilCheckboxInputGUI($this->
lng->txt(
"enable_download_folder"),
"enable_download_folder");
279 $dl_prop->setChecked((
int) $this->folder_settings->get(
"enable_download_folder",
'0') === 1);
280 $dl_prop->setInfo($this->
lng->txt(
'enable_download_folder_info'));
281 $form->addItem($dl_prop);
284 $dl_prop =
new ilCheckboxInputGUI($this->
lng->txt(
"enable_multi_download"),
"enable_multi_download");
287 $dl_prop->setChecked((
int) $this->folder_settings->get(
"enable_multi_download",
'1') === 1);
288 $dl_prop->setInfo($this->
lng->txt(
'enable_multi_download_info'));
289 $form->addItem($dl_prop);
293 $cb->
setInfo($this->
lng->txt(
"rep_favourites_info"));
294 $cb->setChecked((
bool)
$ilSetting->get(
"rep_favourites"));
301 $lists->setTitle($this->
lng->txt(
"rep_object_lists"));
302 $form->addItem($lists);
304 $sdesc =
new ilCheckboxInputGUI($this->
lng->txt(
"adm_rep_shorten_description"),
"rep_shorten_description");
305 $sdesc->
setInfo($this->
lng->txt(
"adm_rep_shorten_description_info"));
306 $sdesc->setChecked((
bool)
$ilSetting->get(
"rep_shorten_description"));
307 $form->addItem($sdesc);
309 $sdesclen =
new ilNumberInputGUI($this->
lng->txt(
"adm_rep_shorten_description_length"),
"rep_shorten_description_length");
311 $sdesclen->setSize(3);
312 $sdesc->addSubItem($sdesclen);
316 $cb->
setInfo($this->
lng->txt(
"adm_item_cmd_asynch_info"));
317 $cb->setChecked((
bool)
$ilSetting->get(
"item_cmd_asynch"));
321 $pl =
new ilCheckboxInputGUI($this->
lng->txt(
'adm_show_comments_tagging_in_lists'),
'comments_tagging_in_lists');
323 $pl->setChecked((
bool)
$ilSetting->get(
'comments_tagging_in_lists'));
326 $pltags =
new ilCheckboxInputGUI($this->
lng->txt(
'adm_show_comments_tagging_in_lists_tags'),
'comments_tagging_in_lists_tags');
328 $pltags->setChecked((
bool)
$ilSetting->get(
'comments_tagging_in_lists_tags'));
329 $pl->addSubItem($pltags);
331 if ($ilAccess->checkAccess(
'write',
'', $this->object->getRefId())) {
332 $form->addCommandButton(
'saveSettings', $this->
lng->txt(
'save'));
343 if (!$ilAccess->checkAccess(
'write',
'', $this->object->getRefId())) {
344 $this->
ctrl->redirect($this,
"view");
348 if ($form->checkInput()) {
350 "default_repository_view",
351 $form->getInput(
"default_rep_view")
354 "repository_tree_pres",
355 $form->getInput(
"tree_pres")
357 $rep_tree_limit_grp_crs = $form->getInput(
"rep_tree_limit_grp_crs");
358 if ($form->getInput(
"tree_pres") ==
"") {
359 $rep_tree_limit_grp_crs =
"";
362 "rep_tree_limit_grp_crs",
363 $rep_tree_limit_grp_crs
368 $form->getInput(
"rep_favourites")
372 "rep_export_limitation",
373 $form->getInput(
"rep_export_limitation")
376 "rep_export_limit_number",
377 (
string) $form->getInput(
"rep_export_limit_number")
381 $form->getInput(
"enable_trash")
384 "rep_breadcr_crs_overwrite",
385 (
string) ((
int) $form->getInput(
"rep_breadcr_crs_overwrite"))
389 (
string) ((
int) $form->getInput(
"rep_breadcr_crs"))
392 "rep_breadcr_crs_default",
393 (
string) ((
int) $form->getInput(
"rep_breadcr_crs_default"))
396 "rep_shorten_description",
397 $form->getInput(
'rep_shorten_description')
400 "rep_shorten_description_length",
401 (
string) ((
int) $form->getInput(
'rep_shorten_description_length'))
405 (
string) ((
int) $form->getInput(
'item_cmd_asynch'))
408 'comments_tagging_in_lists',
409 (
string) ((
int) $form->getInput(
'comments_tagging_in_lists'))
412 'comments_tagging_in_lists_tags',
413 $form->getInput(
'comments_tagging_in_lists_tags')
417 $limit_number = ($form->getInput(
'rep_tree_limit') &&
418 $form->getInput(
'rep_tree_limit_number') > 0)
419 ? (
int) $form->getInput(
'rep_tree_limit_number')
421 $ilSetting->set(
'rep_tree_limit_number', (
string) $limit_number);
423 $this->folder_settings->set(
424 "enable_download_folder",
425 (
string) ((
int) $form->getInput(
"enable_download_folder") === 1)
427 $this->folder_settings->set(
428 "enable_multi_download",
429 (
string) ((
int) $form->getInput(
"enable_multi_download") === 1)
431 if ($form->getInput(
'change_event_tracking')) {
437 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"msg_obj_modified"),
true);
438 $this->
ctrl->redirect($this,
"view");
441 $form->setValuesByPost();
447 $this->tabs_gui->activateTab(
"icons");
453 $this->tpl->setContent($a_form->getHTML());
462 $form->setTitle($this->
lng->txt(
"rep_custom_icons"));
463 $form->setFormAction($this->
ctrl->getFormAction($this,
'saveCustomIcons'));
466 $cb->
setInfo($this->
lng->txt(
"enable_custom_icons_info"));
467 $cb->setChecked((
bool)
$ilSetting->get(
"custom_icons"));
470 if ($ilAccess->checkAccess(
'write',
'', $this->object->getRefId())) {
471 $form->addCommandButton(
'saveCustomIcons', $this->
lng->txt(
'save'));
482 if (!$ilAccess->checkAccess(
'write',
'', $this->object->getRefId())) {
483 $this->
ctrl->redirect($this,
"customIcons");
487 if ($form->checkInput()) {
488 $ilSetting->set(
"custom_icons", (
string) ((
int) $form->getInput(
"custom_icons")));
489 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"msg_obj_modified"),
true);
490 $this->
ctrl->redirect($this,
"customIcons");
493 $form->setValuesByPost();
499 $this->tabs_gui->activateTab(
'modules');
501 $this->tabs_gui->addSubTab(
503 $this->
lng->txt(
"rep_new_item_menu"),
504 $this->
ctrl->getLinkTarget($this,
"listModules")
507 $this->tabs_gui->addSubTab(
509 $this->
lng->txt(
"rep_new_item_groups"),
510 $this->
ctrl->getLinkTarget($this,
"listNewItemGroups")
513 $this->tabs_gui->activateSubTab($a_active);
522 $has_write = $ilAccess->checkAccess(
'write',
'', $this->
object->getRefId());
526 $this->tpl->setContent($comp_table->getHTML());
536 $item_groups = $this->admin_gui_request->getNewItemGroups();
537 $item_positions = $this->admin_gui_request->getNewItemPositions();
539 if (count($item_groups) === 0 || count($item_positions) === 0 ||
540 !$ilAccess->checkAccess(
'write',
'', $this->object->getRefId())) {
541 $ilCtrl->redirect($this,
"listModules");
544 $grp_pos_map = [0 => 9999];
546 $grp_pos_map[$item[
"id"]] = $item[
"pos"];
550 $item_enablings = $this->admin_gui_request->getNewItemEnablings();
551 foreach ($item_positions as $obj_type => $pos) {
552 $grp_id = ($item_groups[$obj_type] ?? 0);
553 $type_pos_map[$grp_id][$obj_type] = $pos;
557 "obj_dis_creation_" . $obj_type,
558 (
string) ((
int) (!($item_enablings[$obj_type] ??
false)))
562 foreach ($type_pos_map as $grp_id => $obj_types) {
563 $grp_pos = str_pad($grp_pos_map[$grp_id], 4,
"0", STR_PAD_LEFT);
567 foreach (array_keys($obj_types) as $obj_type) {
569 $type_pos = $grp_pos . str_pad((
string) $pos, 4,
"0", STR_PAD_LEFT);
570 $ilSetting->set(
"obj_add_new_pos_" . $obj_type, $type_pos);
571 $ilSetting->set(
"obj_add_new_pos_grp_" . $obj_type, $grp_id);
575 $this->tpl->setOnScreenMessage(
'success',
$lng->
txt(
"msg_obj_modified"),
true);
576 $ilCtrl->redirect($this,
"listModules");
586 $has_write = $ilAccess->checkAccess(
'write',
'', $this->
object->getRefId());
589 $ilToolbar->addButton(
590 $this->
lng->txt(
"rep_new_item_group_add"),
591 $this->
ctrl->getLinkTarget($this,
"addNewItemGroup")
594 $ilToolbar->addButton(
595 $this->
lng->txt(
"rep_new_item_group_add_separator"),
596 $this->
ctrl->getLinkTarget($this,
"addNewItemGroupSeparator")
602 $this->tpl->setContent($grp_table->getHTML());
611 $this->
lng->loadLanguageModule(
"meta");
612 $def_lng = $this->
lng->getDefaultLanguage();
615 $title->setInfo($this->
lng->txt(
"meta_l_" . $def_lng) .
616 " (" . $this->
lng->txt(
"default_language") .
")");
617 $title->setRequired(
true);
618 $form->addItem($title);
620 foreach ($this->
lng->getInstalledLanguages() as $lang_id) {
621 if ($lang_id !== $def_lng) {
622 $title =
new ilTextInputGUI($this->
lng->txt(
"translation"),
"title_" . $lang_id);
623 $title->setInfo($this->
lng->txt(
"meta_l_" . $lang_id));
624 $form->addItem($title);
629 $form->setTitle($this->
lng->txt(
"rep_new_item_group_add"));
630 $form->setFormAction($this->
ctrl->getFormAction($this,
"saveNewItemGroup"));
632 $form->addCommandButton(
"saveNewItemGroup", $this->
lng->txt(
"save"));
634 $form->setTitle($this->
lng->txt(
"rep_new_item_group_edit"));
635 $form->setFormAction($this->
ctrl->getFormAction($this,
"updateNewItemGroup"));
638 $grp = $grp[$a_grp_id];
640 foreach ($grp[
"titles"] as
$id => $value) {
641 $field = $form->getItemByPostVar(
"title_" .
$id);
643 $field->setValue($value);
647 $form->addCommandButton(
"updateNewItemGroup", $this->
lng->txt(
"save"));
649 $form->addCommandButton(
"listNewItemGroups", $this->
lng->txt(
"cancel"));
660 $this->tpl->setContent($a_form->getHTML());
666 if ($form->checkInput()) {
668 foreach ($this->
lng->getInstalledLanguages() as $lang_id) {
669 $titles[$lang_id] = $form->getInput(
"title_" . $lang_id);
673 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"settings_saved"),
true);
674 $this->
ctrl->redirect($this,
"listNewItemGroups");
678 $form->setValuesByPost();
684 $grp_id = $this->admin_gui_request->getNewItemGroupId();
686 $this->
ctrl->redirect($this,
"listNewItemGroups");
690 $this->
ctrl->setParameter($this,
"grp_id", $grp_id);
694 $this->tpl->setContent($a_form->getHTML());
699 $grp_id = $this->admin_gui_request->getNewItemGroupId();
701 $this->
ctrl->redirect($this,
"listNewItemGroups");
704 $this->
ctrl->setParameter($this,
"grp_id", $grp_id);
707 if ($form->checkInput()) {
709 foreach ($this->
lng->getInstalledLanguages() as $lang_id) {
710 $titles[$lang_id] = $form->getInput(
"title_" . $lang_id);
714 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"settings_saved"),
true);
715 $this->
ctrl->redirect($this,
"listNewItemGroups");
719 $form->setValuesByPost();
726 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"settings_saved"),
true);
728 $this->
ctrl->redirect($this,
"listNewItemGroups");
735 $group_order = $this->admin_gui_request->getNewItemGroupOrder();
736 if (count($group_order) > 0) {
741 $grp_pos_map[$item[
"id"]] = str_pad((
string) $item[
"pos"], 4,
"0", STR_PAD_LEFT);
748 foreach ($subitems as $obj_type) {
749 $old_pos =
$ilSetting->get(
"obj_add_new_pos_" . $obj_type);
750 if (strlen($old_pos) === 8) {
751 $new_pos = $grp_pos_map[$grp_id] . substr($old_pos, 4);
752 $ilSetting->set(
"obj_add_new_pos_" . $obj_type, $new_pos);
758 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"settings_saved"),
true);
760 $this->
ctrl->redirect($this,
"listNewItemGroups");
765 $group_ids = $this->admin_gui_request->getNewItemGroupIds();
766 if (count($group_ids) === 0) {
767 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
"select_one"));
775 $cgui->setHeaderText($this->
lng->txt(
"rep_new_item_group_delete_sure"));
777 $cgui->setFormAction($this->
ctrl->getFormAction($this));
778 $cgui->setCancel($this->
lng->txt(
"cancel"),
"listNewItemGroups");
779 $cgui->setConfirm($this->
lng->txt(
"confirm"),
"deleteNewItemGroup");
783 foreach ($group_ids as $grp_id) {
784 $cgui->addItem(
"grp_ids[]", (
string) $grp_id, $groups[$grp_id][
"title"]);
787 $this->tpl->setContent($cgui->getHTML());
792 $group_ids = $this->admin_gui_request->getNewItemGroupIds();
793 if (count($group_ids) === 0) {
798 foreach ($group_ids as $grp_id) {
802 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"settings_saved"),
true);
803 $this->
ctrl->redirect($this,
"listNewItemGroups");
810 switch ($a_form_id) {
815 return [[
"view", $fields]];
821 'adm_show_comments_tagging_in_lists' => [
827 return [[
"view", $fields]];
view(ilPropertyFormGUI $a_form=null)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static _activate()
Activates change event tracking.
static addNewItemGroupSeparator()
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
addToExternalSettingsForm(int $a_form_id)
confirmDeleteNewItemGroup()
prepareOutput(bool $show_sub_objects=true)
static getNewItemGroups()
customIcons(ilPropertyFormGUI $a_form=null)
AdministrationGUIRequest $admin_gui_request
addNewItemGroupSeparator()
setModuleSubTabs(string $a_active)
static getNewItemGroupSubItems()
initNewItemGroupForm(int $a_grp_id=0)
checkAccess(string $a_operations, int $a_ref_id, string $a_type="")
checkAccess represents the main method of the RBAC-system in ILIAS3 developers want to use With this ...
static deleteNewItemGroup(int $a_id)
Class ilObjectGUI Basic methods of all Output classes.
__construct( $a_data, int $a_id, bool $a_call_by_reference=true, bool $a_prepare_output=true)
static updateNewItemGroup(int $a_id, array $a_titles)
ilSetting $folder_settings
static updateNewItemGroupOrder(array $a_order)
static addNewItemGroup(array $a_titles)
Error Handling & global info handling uses PEAR error class.
const SET_EXPORT_DISABLED
static _isActive()
Returns true, if change event tracking is active.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
__construct(Container $dic, ilPlugin $plugin)
static _deactivate()
Deactivates change event tracking.
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
addNewItemGroup(ilPropertyFormGUI $a_form=null)
editNewItemGroup(ilPropertyFormGUI $a_form=null)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...