5 require_once
"./Services/Container/classes/class.ilContainerGUI.php";
28 function ilObjCategoryGUI($a_data, $a_id, $a_call_by_reference =
true, $a_prepare_output =
true)
35 $GLOBALS[
'lng']->loadLanguageModule(
'cat');
38 $this->
ilContainerGUI($a_data,(
int) $a_id,$a_call_by_reference,
false);
40 if (is_object($this->
object))
42 include_once(
"./Services/Container/classes/class.ilContainer.php");
43 include_once(
"./Services/Object/classes/class.ilObjectServiceSettingsGUI.php");
45 $this->object->getId(),
53 global $rbacsystem, $ilNavigationHistory, $ilAccess,
$ilCtrl,$ilTabs;
55 $next_class = $this->ctrl->getNextClass($this);
56 $cmd = $this->ctrl->getCmd();
64 include_once(
'./Services/User/classes/class.ilObjUserGUI.php');
66 $this->tabs_gui->setTabActive(
'administrate_users');
70 $this->gui_obj->setCreationMode($this->creation_mode);
71 $ret =& $this->ctrl->forwardCommand($this->gui_obj);
76 $this->gui_obj->setCreationMode($this->creation_mode);
77 $ret =& $this->ctrl->forwardCommand($this->gui_obj);
80 $ilTabs->clearTargets();
81 $ilTabs->setBackTarget($this->lng->txt(
'backto_lua'), $this->ctrl->getLinkTarget($this,
'listUsers'));
83 $ilHelp->setScreenIdComponent(
"cat");
84 $ilHelp->setScreenId(
"administrate_user");
85 $ilHelp->setSubScreenId($ilCtrl->getCmd());
88 case "ilobjuserfoldergui":
89 include_once(
'./Services/User/classes/class.ilObjUserFolderGUI.php');
92 $this->gui_obj->setUserOwnerId((
int) $_GET[
'ref_id']);
93 $this->gui_obj->setCreationMode($this->creation_mode);
94 $ret =& $this->ctrl->forwardCommand($this->gui_obj);
96 $ilTabs->clearTargets();
97 $ilTabs->setBackTarget($this->lng->txt(
'backto_lua'), $this->ctrl->getLinkTarget($this,
'listUsers'));
99 $ilHelp->setScreenIdComponent(
"cat");
100 $ilHelp->setScreenId(
"administrate_user");
101 $ilHelp->setSubScreenId($ilCtrl->getCmd());
107 include_once(
"./Services/Style/classes/class.ilObjStyleSheet.php");
108 $this->tpl->setVariable(
"LOCATION_CONTENT_STYLESHEET",
113 case 'ilpermissiongui':
115 $this->tabs_gui->setTabActive(
'perm_settings');
116 include_once(
"Services/AccessControl/classes/class.ilPermissionGUI.php");
118 $ret =& $this->ctrl->forwardCommand($perm_gui);
121 case 'ilinfoscreengui':
122 if ($this->info_screen_enabled)
129 case 'ilcontainerlinklistgui':
130 include_once(
"Services/Container/classes/class.ilContainerLinkListGUI.php");
132 $ret =& $this->ctrl->forwardCommand($link_list_gui);
136 case "ilcontainerpagegui":
141 $this->tpl->setContent(
$ret);
145 case 'ilobjectcopygui':
148 include_once
'./Services/Object/classes/class.ilObjectCopyGUI.php';
151 $this->ctrl->forwardCommand($cp);
154 case "ilobjstylesheetgui":
158 case 'ilusertablegui':
159 include_once
'./Services/User/classes/class.ilUserTableGUI.php';
161 $u_table->initFilter();
162 $this->ctrl->setReturn($this,
'listUsers');
163 $this->ctrl->forwardCommand($u_table);
166 case "ilcommonactiondispatchergui":
168 include_once(
"Services/Object/classes/class.ilCommonActionDispatcherGUI.php");
170 $this->ctrl->forwardCommand($gui);
173 case 'ildidactictemplategui':
174 $this->ctrl->setReturn($this,
'edit');
175 include_once
'./Services/DidacticTemplate/classes/class.ilDidacticTemplateGUI.php';
177 $this->ctrl->forwardCommand($did);
182 $this->tabs_gui->setTabActive(
'export');
183 include_once
'./Services/Export/classes/class.ilExportGUI.php';
185 $exp->addFormat(
'xml');
186 $this->ctrl->forwardCommand($exp);
189 case 'ilobjecttranslationgui':
194 include_once(
"./Services/Object/classes/class.ilObjectTranslationGUI.php");
196 $this->ctrl->forwardCommand($transgui);
200 if (
$cmd ==
"infoScreen")
211 $ilAccess->checkAccess(
"read",
"", $_GET[
"ref_id"]))
213 $ilNavigationHistory->addItem($_GET[
"ref_id"],
214 $ilCtrl->getLinkTargetByClass(
"ilrepositorygui",
"frameset"),
"cat");
218 include_once(
"./Services/Style/classes/class.ilObjStyleSheet.php");
219 if (is_object($this->
object))
221 $this->tpl->setVariable(
"LOCATION_CONTENT_STYLESHEET",
245 global $rbacsystem,
$lng, $ilHelp, $ilAccess;
247 if ($this->ctrl->getCmd() ==
"editPageContent")
251 #$this->ctrl->setParameter($this,"ref_id",$this->ref_id); 253 $ilHelp->setScreenIdComponent(
"cat");
255 if ($rbacsystem->checkAccess(
'read',$this->ref_id))
257 $force_active = (
$_GET[
"cmd"] ==
"" ||
$_GET[
"cmd"] ==
"render")
260 $tabs_gui->addTab(
"view_content", $lng->txt(
"content"),
261 $this->ctrl->getLinkTarget($this,
""));
264 if ($this->info_screen_enabled)
266 $force_active = ($this->ctrl->getNextClass() ==
"ilinfoscreengui" 267 || strtolower(
$_GET[
"cmdClass"]) ==
"ilnotegui")
270 $tabs_gui->addTarget(
"info_short",
271 $this->ctrl->getLinkTargetByClass(
272 array(
"ilobjcategorygui",
"ilinfoscreengui"),
"showSummary"),
273 array(
"showSummary",
"",
"infoScreen"),
274 "",
"", $force_active);
279 if ($rbacsystem->checkAccess(
'write',$this->ref_id))
281 $force_active = (
$_GET[
"cmd"] ==
"edit")
284 $tabs_gui->addTarget(
"settings",
285 $this->ctrl->getLinkTarget($this,
"edit"),
"edit", get_class($this)
286 ,
"", $force_active);
289 include_once
'./Services/User/classes/class.ilUserAccountSettings.php';
292 $rbacsystem->checkAccess(
'cat_administrate_users',$this->ref_id))
294 $tabs_gui->addTarget(
"administrate_users",
295 $this->ctrl->getLinkTarget($this,
"listUsers"),
"listUsers", get_class($this));
298 if($ilAccess->checkAccess(
'write',
'',$this->object->getRefId()))
300 $tabs_gui->addTarget(
302 $this->ctrl->getLinkTargetByClass(
'ilexportgui',
''),
309 parent::getTabs($tabs_gui);
320 $ilTabs->activateTab(
"view_content");
321 $ret = parent::renderObject();
328 $forms = parent::initCreationForms($a_new_type);
338 $a_new_object->addTranslation($a_new_object->
getTitle(),
339 $a_new_object->
getDescription(), $ilUser->getPref(
"language"),
true);
342 include_once(
'Services/Container/classes/class.ilContainerSortingSettings.php');
348 $parent_ref_id = $tree->getParentId($a_new_object->
getRefId());
350 include_once(
"./Services/Style/classes/class.ilObjStyleSheet.php");
362 $this->ctrl->setParameter($this,
"ref_id", $a_new_object->
getRefId());
373 $this->ctrl->setCmd(
"showSummary");
374 $this->ctrl->setCmdClass(
"ilinfoscreengui");
385 if (!$ilAccess->checkAccess(
"visible",
"", $this->ref_id))
387 $this->
ilias->raiseError($this->lng->txt(
"msg_no_perm_read"),$this->
ilias->error_obj->MESSAGE);
390 if (!$this->info_screen_enabled)
396 $this->tabs_gui->setTabActive(
'info_short');
398 include_once(
"./Services/InfoScreen/classes/class.ilInfoScreenGUI.php");
401 $info->enablePrivateNotes();
403 if ($ilAccess->checkAccess(
"read",
"",
$_GET[
"ref_id"]))
409 $info->enableNewsEditing(
false);
410 if ($ilAccess->checkAccess(
"write",
"",
$_GET[
"ref_id"]))
413 $enable_internal_rss = $news_set->get(
"enable_rss_for_internal");
415 if ($enable_internal_rss)
417 $info->setBlockProperty(
"news",
"settings",
true);
418 $info->setBlockProperty(
"news",
"public_notifications_option",
true);
422 include_once(
'Services/AdvancedMetaData/classes/class.ilAdvancedMDRecordGUI.php');
425 $record_gui->parse();
429 $info->addMetaDataSections($this->object->getId(),0, $this->
object->getType());
432 if ($ilCtrl->getNextClass() ==
"ilinfoscreengui")
434 $ilCtrl->forwardCommand($info);
438 return $ilCtrl->getHTML($info);
451 $this->tabs_gui->activateTab(
'settings');
452 $this->tabs_gui->setSubTabActive(
'edit_cat_settings');
455 $this->tpl->setContent($this->form->getHTML());
466 include_once(
'Services/AdvancedMetaData/classes/class.ilAdvancedMDRecordGUI.php');
468 'cat',$this->object->getId());
470 $record_gui->saveValues();
485 if(is_object($this->form))
490 include_once(
'Services/Form/classes/class.ilPropertyFormGUI.php');
492 $this->form->setFormAction($this->ctrl->getFormAction($this));
493 $this->form->setTitle($this->lng->txt(
'ext_cat_settings'));
494 $this->form->addCommandButton(
'updateInfo',$this->lng->txt(
'save'));
495 $this->form->addCommandButton(
'editInfo',$this->lng->txt(
'cancel'));
497 include_once(
'Services/AdvancedMetaData/classes/class.ilAdvancedMDRecordGUI.php');
500 $record_gui->parse();
509 $this->tabs_gui->addSubTab(
"settings_misc",
510 $this->lng->txt(
"settings"),
511 $this->ctrl->getLinkTarget($this,
"edit"));
517 $this->tabs_gui->addSubTab(
"settings_trans",
518 $this->lng->txt(
"obj_multilinguality"),
519 $this->ctrl->getLinkTargetByClass(
"ilobjecttranslationgui",
""));
522 if ($ilSetting->get(
"custom_icons"))
524 $this->tabs_gui->addSubTab(
"icons",
525 $this->lng->txt(
"icon_settings"),
526 $this->ctrl->getLinkTarget($this,
'editIcons'));
529 $this->tabs_gui->activateTab(
"settings");
530 $this->tabs_gui->activateSubTab($active_tab);
532 include_once(
'Services/AdvancedMetaData/classes/class.ilAdvancedMDRecord.php');
535 $this->tabs_gui->addSubTabTarget(
"edit_cat_settings",
536 $this->ctrl->getLinkTarget($this,
'editInfo'),
537 "editInfo", get_class($this));
543 $this->lng->loadLanguageModule($this->object->getType());
546 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
548 $form->setFormAction($this->ctrl->getFormAction($this));
549 $form->setTitle($this->lng->txt($this->object->getType().
"_edit"));
553 $trans = $this->
object->getTranslations();
554 $def = $trans[
"Fobject"][0];
560 $title->setValue($def[
"title"]);
561 $form->addItem($title);
563 if(
sizeof($trans[
"Fobject"]) > 1)
565 include_once(
'Services/MetaData/classes/class.ilMDLanguageItem.php');
568 $title->setInfo($this->lng->txt(
"language").
": ".$languages[$def[
"lang"]].
569 ' <a href="'.$this->ctrl->getLinkTarget($this,
"editTranslations").
570 '">» '.$this->lng->txt(
"cat_more_translations").
'</a>');
578 $desc->setValue($def[
"desc"]);
579 $form->addItem($desc);
586 $pres->setTitle($this->lng->txt(
'obj_presentation'));
587 $form->addItem($pres);
590 include_once(
'Services/Container/classes/class.ilContainerSortingSettings.php');
594 $sort_title =
new ilRadioOption($this->lng->txt(
'sorting_title_header'),
596 $sort_title->
setInfo($this->lng->txt(
'sorting_info_title'));
597 $sort->addOption($sort_title);
599 $sort_manual =
new ilRadioOption($this->lng->txt(
'sorting_manual_header'),
601 $sort_manual->
setInfo($this->lng->txt(
'sorting_info_manual'));
602 $sort->addOption($sort_manual);
604 $sort->setValue($settings->getSortMode());
605 $form->addItem($sort);
611 include_once
'Modules/Category/classes/class.ilECSCategorySettings.php';
613 $ecs->addSettingsToForm($form,
'cat');
617 $sh->setTitle($this->lng->txt(
'obj_features'));
620 include_once
'./Services/Object/classes/class.ilObjectServiceSettingsGUI.php';
622 $this->object->getId(),
630 $form->addCommandButton(
"update", $this->lng->txt(
"save"));
650 $this->
ilias->raiseError($this->lng->txt(
"msg_no_perm_write"),$this->
ilias->error_obj->MESSAGE);
655 if($form->checkInput())
657 $title = $form->getInput(
"title");
658 $desc = $form->getInput(
"desc");
659 $lang = $this->
object->getTranslations();
661 $this->
object->deleteTranslation(
$lang);
662 $this->
object->addTranslation($title, $desc,
$lang,
true);
663 $this->
object->setTitle($title);
664 $this->
object->setDescription($desc);
665 $this->
object->update();
667 include_once(
'Services/Container/classes/class.ilContainerSortingSettings.php');
669 $settings->
setSortMode($form->getInput(
"sorting"));
695 require_once(
'Services/Tracking/classes/class.ilChangeEvent.php');
701 include_once
'./Services/Object/classes/class.ilObjectServiceSettingsGUI.php';
703 $this->object->getId(),
712 include_once
'Modules/Category/classes/class.ilECSCategorySettings.php';
714 if($ecs->handleSettingsUpdate())
722 $form->setValuesByPost();
723 $this->tpl->setContent($form->getHTML());
734 $this->ctrl->redirectByClass(
"ilobjecttranslationgui",
"");
737 $this->lng->loadLanguageModule($this->object->getType());
740 include_once(
"./Services/Object/classes/class.ilObjectTranslationTableGUI.php");
743 if ($a_get_post_values)
746 foreach(
$_POST[
"title"] as $k => $v)
748 $vals[] = array(
"title" => $v,
749 "desc" =>
$_POST[
"desc"][$k],
750 "lang" =>
$_POST[
"lang"][$k],
751 "default" => (
$_POST[
"default"] == $k));
753 $table->setData($vals);
757 $data = $this->
object->getTranslations();
758 foreach(
$data[
"Fobject"] as $k => $v)
760 $data[
"Fobject"][$k][
"default"] = ($k ==
$data[
"default_language"]);
764 $data[
"Fobject"][++$k][
"title"] =
"";
766 $table->setData(
$data[
"Fobject"]);
768 $tpl->setContent($table->getHTML());
778 $this->
ilias->raiseError($this->lng->txt(
"permission_denied"),$this->
ilias->error_obj->MESSAGE);
782 if (!isset(
$_POST[
"default"]))
789 if (array_key_exists(
"",
$_POST[
"lang"]))
796 if (count(array_unique(
$_POST[
"lang"])) < count(
$_POST[
"lang"]))
803 $this->
object->removeTranslations();
804 foreach(
$_POST[
"title"] as $k => $v)
807 $is_default = (
$_POST[
"default"] == $k);
812 $this->
object->update();
815 $this->
object->addTranslation(
823 $this->ctrl->redirect($this,
"editTranslations");
833 $k = max(array_keys(
$_POST[
"title"]));
849 foreach(
$_POST[
"title"] as $k => $v)
854 if($k !=
$_POST[
"default"])
856 unset(
$_POST[
"title"][$k]);
857 unset(
$_POST[
"desc"][$k]);
858 unset(
$_POST[
"lang"][$k]);
883 global
$lng, $rbacreview;
885 $a_tpl->addBlockfile(
"ADM_CONTENT",
"adm_content",
"tpl.cat_import_form.html",
888 $a_tpl->setVariable(
"FORMACTION", $this->ctrl->getFormAction($this));
890 $a_tpl->setVariable(
"TXT_IMPORT_CATEGORIES", $lng->txt(
"import_categories"));
891 $a_tpl->setVariable(
"TXT_HIERARCHY_OPTION", $lng->txt(
"import_cat_localrol"));
892 $a_tpl->setVariable(
"TXT_IMPORT_FILE", $lng->txt(
"import_file"));
893 $a_tpl->setVariable(
"TXT_IMPORT_TABLE", $lng->txt(
"import_cat_table"));
895 $a_tpl->setVariable(
"BTN_IMPORT", $lng->txt(
"import"));
896 $a_tpl->setVariable(
"BTN_CANCEL", $lng->txt(
"cancel"));
899 $parent_role_ids = $rbacreview->getParentRoleIds($a_ref_id,
true);
902 ksort($parent_role_ids);
904 foreach ($parent_role_ids as $key => $par)
906 if ($par[
"obj_id"] != SYSTEM_ROLE_ID)
910 $output[
"adopt"][$key][
"check_adopt"] = $check;
911 $output[
"adopt"][$key][
"role_id"] = $par[
"obj_id"];
912 $output[
"adopt"][$key][
"type"] = ($par[
"type"] ==
'role' ?
'Role' :
'Template');
913 $output[
"adopt"][$key][
"role_name"] = $par[
"title"];
920 foreach ($output[
"adopt"] as $key => $value)
922 $a_tpl->setCurrentBlock(
"ADOPT_PERM_ROW");
923 $a_tpl->setVariable(
"CSS_ROW_ADOPT",$value[
"css_row_adopt"]);
924 $a_tpl->setVariable(
"CHECK_ADOPT",$value[
"check_adopt"]);
925 $a_tpl->setVariable(
"LABEL_ID",$value[
"role_id"]);
926 $a_tpl->setVariable(
"TYPE",$value[
"type"]);
927 $a_tpl->setVariable(
"ROLE_NAME",$value[
"role_name"]);
928 $a_tpl->parseCurrentBlock();
940 $this->ctrl->redirect($this);
980 require_once(
"./Modules/Category/classes/class.ilCategoryImportParser.php");
985 if (!@is_dir($import_dir))
992 $file_name = $_FILES[
"importFile"][
"name"];
995 if (!strcmp($file_name,
"")) {
997 $this->ctrl->redirect($this);
1000 $parts = pathinfo($file_name);
1001 $full_path = $import_dir.
"/".$file_name;
1008 $subdir = basename($parts[
"basename"],
".".$parts[
"extension"]);
1009 $xml_file = $import_dir.
"/".$subdir.
"/".$subdir.
".xml";
1013 $importParser->startParsing();
1016 $this->ctrl->redirect($this);
1025 include_once(
"./Services/User/classes/class.ilUserTableGUI.php");
1027 $utab->resetOffset();
1028 $utab->resetFilter();
1042 include_once(
"./Services/User/classes/class.ilUserTableGUI.php");
1044 $utab->resetOffset();
1045 $utab->writeFilterToSession();
1052 global
$ilUser,$rbacreview, $ilToolbar;
1054 include_once
'./Services/User/classes/class.ilLocalUser.php';
1055 include_once
'./Services/User/classes/class.ilObjUserGUI.php';
1057 global $rbacsystem,$rbacreview;
1059 if(!$rbacsystem->checkAccess(
"cat_administrate_users",$this->object->getRefId()))
1061 $this->
ilias->raiseError($this->lng->txt(
"msg_no_perm_admin_users"),$this->
ilias->error_obj->MESSAGE);
1063 $this->tabs_gui->setTabActive(
'administrate_users');
1067 $this->tpl->addBlockfile(
'ADM_CONTENT',
'adm_content',
'tpl.cat_admin_users.html',
1068 "Modules/Category");
1070 if(count($rbacreview->getGlobalAssignableRoles()) or in_array(SYSTEM_ROLE_ID,$rbacreview->assignedRoles($ilUser->getId())))
1072 $ilToolbar->addButton(
1073 $this->lng->txt(
'add_user'),
1074 $this->ctrl->getLinkTargetByClass(
'ilobjusergui',
'create')
1077 $ilToolbar->addButton(
1078 $this->lng->txt(
'import_users'),
1079 $this->ctrl->getLinkTargetByClass(
'ilobjuserfoldergui',
'importUserForm')
1089 $this->tpl->setCurrentBlock(
"confirm_delete");
1090 $this->tpl->setVariable(
"CONFIRM_FORMACTION",$this->ctrl->getFormAction($this));
1091 $this->tpl->setVariable(
"TXT_CANCEL",$this->lng->txt(
'cancel'));
1092 $this->tpl->setVariable(
"CONFIRM_CMD",
'performDeleteUsers');
1093 $this->tpl->setVariable(
"TXT_CONFIRM",$this->lng->txt(
'delete'));
1094 $this->tpl->parseCurrentBlock();
1097 $this->lng->loadLanguageModule(
'user');
1099 include_once(
"./Services/User/classes/class.ilUserTableGUI.php");
1101 $this->tpl->setVariable(
'USERS_TABLE',$utab->getHTML());
1111 include_once
'./Services/User/classes/class.ilUserAutoComplete.php';
1113 $auto->setSearchFields(array(
'login',
'firstname',
'lastname',
'email'));
1114 $auto->enableFieldSearchableCheck(
true);
1122 include_once
'./Services/User/classes/class.ilLocalUser.php';
1125 foreach(
$_POST[
'user_ids'] as $user_id)
1129 die(
'user id not valid');
1154 include_once
'./Services/Utilities/classes/class.ilConfirmationGUI.php';
1156 $confirm->setFormAction($this->ctrl->getFormAction($this));
1157 $confirm->setHeaderText($this->lng->txt(
'sure_delete_selected_users'));
1158 $confirm->setConfirm($this->lng->txt(
'delete'),
'performDeleteUsers');
1159 $confirm->setCancel($this->lng->txt(
'cancel'),
'listUsers');
1161 foreach(
$_POST[
'id'] as $user)
1168 $name[
'lastname'].
', '.$name[
'firstname'].
' ['.$name[
'login'].
']' 1171 $this->tpl->setContent($confirm->getHTML());
1176 global $rbacreview,$ilTabs;
1180 include_once
'./Services/User/classes/class.ilLocalUser.php';
1182 if(!isset(
$_GET[
'obj_id']))
1190 $ilTabs->clearTargets();
1191 $ilTabs->setBackTarget($this->lng->txt(
'backto_lua'), $this->ctrl->getLinkTarget($this,
'listUsers'));
1193 $ilHelp->setScreenIdComponent(
"cat");
1194 $ilHelp->setScreenId(
"administrate_user");
1195 $ilHelp->setSubScreenId(
"assign_roles");
1202 #ilUtil::sendInfo($this->lng->txt('no_roles_user_can_be_assigned_to')); 1203 #$this->listUsersObject(); 1208 $this->tpl->addBlockfile(
'ADM_CONTENT',
'adm_content',
'tpl.cat_role_assignment.html',
1209 "Modules/Category");
1211 $ass_roles = $rbacreview->assignedRoles(
$_GET[
'obj_id']);
1214 foreach($roles as $role)
1223 $f_result[$counter][] = $role_obj->getTitle() ? $role_obj->getTitle() :
"";
1224 $f_result[$counter][] = $role_obj->getDescription() ? $role_obj->getDescription() :
"";
1225 $f_result[$counter][] = $role[
'role_type'] ==
'global' ?
1226 $this->lng->txt(
'global') :
1227 $this->lng->txt(
'local');
1237 global $rbacreview,$rbacadmin;
1240 include_once
'./Services/User/classes/class.ilLocalUser.php';
1260 $new_role_ids =
$_POST[
'role_ids'] ?
$_POST[
'role_ids'] : array();
1261 $assigned_roles = $rbacreview->assignedRoles((
int)
$_REQUEST[
'obj_id']);
1262 foreach($roles as $role)
1264 if(in_array($role[
'obj_id'],$new_role_ids) and !in_array($role[
'obj_id'],$assigned_roles))
1266 $rbacadmin->assignUser($role[
'obj_id'],(
int) $_REQUEST[
'obj_id']);
1268 if(in_array($role[
'obj_id'],$assigned_roles) and !in_array($role[
'obj_id'],$new_role_ids))
1270 $rbacadmin->deassignUser($role[
'obj_id'],(
int) $_REQUEST[
'obj_id']);
1287 if(in_array(SYSTEM_ROLE_ID,$rbacreview->assignedRoles($ilUser->getId())))
1289 $global_roles = $rbacreview->getGlobalRolesArray();
1291 elseif($tmp_obj->getTimeLimitOwner() == $this->
object->getRefId())
1293 $global_roles = $rbacreview->getGlobalAssignableRoles();
1297 $global_roles = array();
1299 return $roles = array_merge($global_roles,
1300 $rbacreview->getAssignableChildRoles($this->object->getRefId()));
1311 if($tmp_obj->getTimeLimitOwner() != $this->
object->getRefId() and
1312 !in_array(SYSTEM_ROLE_ID,$rbacreview->assignedRoles($ilUser->getId())))
1318 $new_assigned = $new_assigned ? $new_assigned : array();
1319 $assigned = $rbacreview->assignedRoles((
int)
$_GET[
'obj_id']);
1322 if(!in_array(SYSTEM_ROLE_ID,$rbacreview->assignedRoles($ilUser->getId())))
1324 $ga = $rbacreview->getGlobalAssignableRoles();
1328 $ga = $rbacreview->getGlobalRolesArray();
1330 $global_assignable = array();
1331 foreach($ga as $role)
1333 $global_assignable[] = $role[
'obj_id'];
1336 $new_visible_assigned_roles = array_intersect($new_assigned,$global_assignable);
1337 $all_assigned_roles = array_intersect($assigned,$rbacreview->getGlobalRoles());
1338 $main_assigned_roles = array_diff($all_assigned_roles,$global_assignable);
1340 if(!count($new_visible_assigned_roles) and !count($main_assigned_roles))
1353 $tpl =& $tbl->getTemplateObject();
1356 $tpl->setCurrentBlock(
"tbl_form_header");
1358 $this->ctrl->setParameter($this,
'obj_id',
$_GET[
'obj_id']);
1359 $tpl->setVariable(
"FORMACTION",$this->ctrl->getFormAction($this));
1360 $tpl->parseCurrentBlock();
1363 $tpl->setVariable(
"COLUMN_COUNTS",4);
1367 $tpl->setVariable(
"BTN_NAME",
"assignSave");
1368 $tpl->setVariable(
"BTN_VALUE",$this->lng->txt(
"change_assignment"));
1369 $tpl->parseCurrentBlock();
1371 $tpl->setCurrentBlock(
"tbl_action_row");
1372 $tpl->setVariable(
"TPLPATH",$this->tpl->tplPath);
1373 $tpl->parseCurrentBlock();
1376 $title = $this->lng->txt(
'role_assignment').
' ('.$tmp_obj->getFullname().
')';
1378 $tbl->setTitle($title,
"icon_role.png",$this->lng->txt(
"role_assignment"));
1379 $tbl->setHeaderNames(array(
'',
1380 $this->lng->txt(
"title"),
1381 $this->lng->txt(
'description'),
1382 $this->lng->txt(
"type")));
1383 $tbl->setHeaderVars(array(
"",
1387 array(
"ref_id" => $this->object->getRefId(),
1388 "cmd" =>
"assignRoles",
1389 "obj_id" =>
$_GET[
'obj_id'],
1390 "cmdClass" =>
"ilobjcategorygui",
1391 "cmdNode" =>
$_GET[
"cmdNode"]));
1392 $tbl->setColumnWidth(array(
"4%",
"35%",
"45%",
"16%"));
1394 $this->set_unlimited =
true;
1398 $this->tpl->setVariable(
"ROLES_TABLE",$tbl->tpl->get());
1408 $tpl =& $tbl->getTemplateObject();
1411 $tpl->setCurrentBlock(
"tbl_form_header");
1413 $this->ctrl->setParameter($this,
'sort_by',
$_GET[
'sort_by']);
1414 $this->ctrl->setParameter($this,
'sort_order',
$_GET[
'sort_order']);
1415 $this->ctrl->setParameter($this,
'offset',
$_GET[
'offset']);
1416 $tpl->setVariable(
"FORMACTION",$this->ctrl->getFormAction($this));
1417 $tpl->parseCurrentBlock();
1423 $tpl->setVariable(
"COLUMN_COUNTS",6);
1426 $tpl->setCurrentBlock(
"tbl_action_button");
1427 $tpl->setVariable(
"BTN_NAME",
"deleteUser");
1428 $tpl->setVariable(
"BTN_VALUE",$this->lng->txt(
"delete"));
1429 $tpl->parseCurrentBlock();
1431 $tpl->setCurrentBlock(
"tbl_action_row");
1432 $tpl->setVariable(
"TPLPATH",$this->tpl->tplPath);
1433 $tpl->parseCurrentBlock();
1435 $tbl->setFormName(
'cmd');
1436 $tbl->enable(
'select_all');
1439 $tbl->setTitle($this->lng->txt(
"users"),
"icon_usr.png",$this->lng->txt(
"users"));
1440 $tbl->setHeaderNames(array(
'',
1441 $this->lng->txt(
"username"),
1442 $this->lng->txt(
"firstname"),
1443 $this->lng->txt(
"lastname"),
1444 $this->lng->txt(
'context'),
1445 $this->lng->txt(
'role_assignment')));
1446 $tbl->setHeaderVars(array(
"",
1452 array(
"ref_id" => $this->object->getRefId(),
1453 "cmd" =>
"listUsers",
1454 "cmdClass" =>
"ilobjcategorygui",
1455 "cmdNode" =>
$_GET[
"cmdNode"]));
1456 $tbl->setColumnWidth(array(
"1px",
"20%",
"20%",
"20%",
"20%",
"20%"));
1457 $tbl->setSelectAllCheckbox(
'user_ids');
1462 $this->tpl->setVariable(
"USERS_TABLE",$tbl->tpl->get());
1473 case "listUsersObject":
1474 $tbl->setOrderColumn(
$_GET[
"sort_by"]);
1475 $tbl->setOrderDirection(
$_GET[
"sort_order"]);
1476 $tbl->setOffset(
$_GET[
"offset"]);
1477 $tbl->setMaxCount($this->all_users_count);
1478 $tbl->setLimit($ilUser->getPref(
'hits_per_page'));
1479 $tbl->setFooter(
"tblfooter",$this->lng->txt(
"previous"),$this->lng->txt(
"next"));
1480 $tbl->setData($result_set);
1481 $tbl->disable(
'auto_sort');
1486 case "assignRolesObject":
1487 $offset =
$_GET[
"offset"];
1489 if (
$_GET[
"sort_by"] ==
"title" or empty(
$_GET[
"sort_by"]))
1491 $_GET[
"sort_by"] =
"login";
1493 $order =
$_GET[
"sort_by"];
1494 $direction =
$_GET[
"sort_order"];
1497 case "clipboardObject":
1498 $offset =
$_GET[
"offset"];
1499 $order =
$_GET[
"sort_by"];
1500 $direction =
$_GET[
"sort_order"];
1501 $tbl->disable(
"footer");
1505 $offset =
$_GET[
"offset"];
1506 $order =
$_GET[
"sort_by"];
1507 $direction =
$_GET[
"sort_order"];
1511 $tbl->setOrderColumn($order);
1512 $tbl->setOrderDirection($direction);
1513 $tbl->setOffset($offset);
1514 if($this->set_unlimited)
1516 $tbl->setLimit(
$_GET[
"limit"]*100);
1520 $tbl->setLimit(
$_GET[
'limit']);
1522 $tbl->setMaxCount(count($result_set));
1526 $tbl->setFooter(
"tblfooter",$this->lng->txt(
"previous"),$this->lng->txt(
"next"));
1530 $tbl->disable(
'footer');
1532 $tbl->setData($result_set);
1537 include_once
"./Services/Table/classes/class.ilTableGUI.php";
1544 $action[0] = $this->lng->txt(
'all_users');
1545 $action[$this->
object->getRefId()] = $this->lng->txt(
'users').
1548 foreach($a_parent_ids as $parent)
1550 if($parent == $this->object->getRefId())
1574 if ($ilAccess->checkAccess(
"read",
"", $a_target))
1578 else if ($ilAccess->checkAccess(
"read",
"", ROOT_FOLDER_ID))
1585 $ilErr->raiseError($lng->txt(
"msg_no_perm_read"), $ilErr->FATAL);
1603 $this->tabs_gui->setTabActive(
'settings');
1610 $tpl->setContent($a_form->getHTML());
1617 include_once
"Services/Form/classes/class.ilPropertyFormGUI.php";
1619 $form->setFormAction($this->ctrl->getFormAction($this));
1624 $form->addCommandButton(
'updateIcons', $this->lng->txt(
'save'));
1637 if($form->checkInput())
1640 if ($this->
ilias->getSetting(
"custom_icons"))
1642 if(
$_POST[
"cont_big_icon_delete"])
1644 $this->
object->removeBigIcon();
1646 if(
$_POST[
"cont_small_icon_delete"])
1648 $this->
object->removeSmallIcon();
1650 if(
$_POST[
"cont_tiny_icon_delete"])
1652 $this->
object->removeTinyIcon();
1654 $this->
object->saveIcons($_FILES[
"cont_big_icon"][
'tmp_name'],
1655 $_FILES[
"cont_small_icon"][
'tmp_name'], $_FILES[
"cont_tiny_icon"][
'tmp_name']);
1659 $this->ctrl->redirect($this,
"editIcons");
1662 $form->setValuesByPost();
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
static _lookupName($a_user_id)
lookup user name
getTabs(&$tabs_gui)
Get tabs.
importCategoriesObject()
import categories
This class represents an option in a radio group.
Class ilContainerLinkListGUI.
importCancelledObject()
import cancelled
setSortMode($a_mode)
set sort mode
importCategoriesWithRolObject()
import categories with local rol
infoScreen()
show information screen
__checkGlobalRoles($new_assigned)
_importCategoriesForm($a_ref_id, &$a_tpl)
display form for category import (static, also called by RootFolderGUI)
GUI class for the workflow of copying objects.
setPropertyForm($form)
set property form object
const TITLE_LENGTH
max length of object title
__showRolesTable($a_result_set, $a_from="")
initCreationForms($a_new_type)
Class ilObject Basic functions for all objects.
static _gotoRepositoryRoot($a_raise_error=false)
Goto repository root.
_getImportDir()
get user import directory name
__setTableGUIBasicData(&$tbl, &$result_set, $a_from="", $a_footer=true)
static unzip($a_file, $overwrite=false, $a_flat=false)
unzip file
editIconsObject($a_form=null)
Edit folder icons.
static _lookupTitle($a_id)
lookup object title
updateIconsObject()
update container icons
addTranslationObject()
Add a translation.
initExtendedSettings()
build property form for extended category settings
setInfo($a_info)
Set Info.
_getAllUserIds($a_filter=0)
editTranslationsObject($a_get_post_values=false, $a_add=false)
Edit title and translations.
static lookupObjectStyle($a_obj_id)
Lookup object style.
Auto completion class for user lists.
listUsersObject($show_delete=false)
deleteTranslationsObject()
Remove translation.
static writeStyleUsage($a_obj_id, $a_style_id)
Write style usage.
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
importCategoriesFormObject()
display form for category import
Export User Interface Class.
TableGUI class for user administration.
GUI class for didactic template settings inside repository objects.
setInfoObject($info)
get info sections
updateInfoObject()
Update info (extended meta data)
getId()
get object id public
showCustomIconsEditing($a_input_colspan=1, ilPropertyFormGUI $a_form=null, $a_as_section=true)
show edit section of custom icons for container
static _gotoRepositoryNode($a_ref_id, $a_cmd="frameset")
Goto repository root.
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
static formSelect($selected, $varname, $options, $multiple=false, $direct_text=false, $size="0", $style_class="", $attribs="", $disabled=false)
Builds a select form field with options and shows the selected option first.
ilObjCategoryGUI($a_data, $a_id, $a_call_by_reference=true, $a_prepare_output=true)
Constructor public.
editInfoObject()
Edit extended category settings.
static moveUploadedFile($a_file, $a_name, $a_target, $a_raise_errors=true, $a_mode="move_uploaded")
move uploaded file
applyFilterObject()
Apply filter.
performDeleteUsersObject()
initDidacticTemplate(ilPropertyFormGUI $form)
Show didactic template types.
static _lookupObjId($a_id)
_importCategories($a_ref_id, $withrol_tmp)
import categories (static, also called by RootFolderGUI)
This class represents a text property in a property form.
getTitle()
get object title public
getDescription()
get object description
resetFilterObject()
Reset filter (note: this function existed before data table filter has been introduced.
forwardToStyleSheet()
Forward to style object.
& forwardToPageObject()
forward command to page object
redirection script todo: (a better solution should control the processing via a xml file) ...
static createDirectory($a_dir, $a_mod=0755)
create directory
getInstanceByObjId($a_obj_id, $stop_on_error=true)
get an instance of an Ilias object by object id
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
static updateServiceSettingsForm($a_obj_id, ilPropertyFormGUI $form, $services)
Update service settings.
prepareOutput()
prepare output
afterSave(ilObject $a_new_object)
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
infoScreenObject()
this one is called from the info button in the repository not very nice to set cmdClass/Cmd manually...
__showUsersTable($a_result_set, $a_from="", $a_footer=true)
renderObject()
Render category.
__buildFilterSelect($a_parent_ids)
setEditTabs($active_tab="settings_misc")
_lookupStandard($a_id)
Lookup standard flag.
TableGUI class for title/description translations.
static getDataDir()
get data directory (outside webspace)
setRows($a_rows)
Set Rows.
redirectToRefId($a_ref_id, $a_cmd="")
redirects to (repository) view per ref id usually to a container and usually used at the end of a sav...
getContentStylePath($a_style_id)
get content style path
static getInstance()
Singelton get instance.
This class represents a text area property in a property form.
static switchColor($a_num, $a_css1, $a_css2)
switches style sheets for each even $a_num (used for changing colors of different result rows) ...
ilContainerGUI($a_data, $a_id, $a_call_by_reference=true, $a_prepare_output=true)
Constructor public.
_lookupContainerSetting($a_id, $a_keyword, $a_default_value=NULL)
Lookup a container setting.
static initServiceSettingsForm($a_obj_id, ilPropertyFormGUI $form, $services)
Init service settings form.
Class ilObjUserFolderGUI.
getCreationMode()
get creation mode
const INFO_TAB_VISIBILITY
getRefId()
get reference id public
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission and redirect on error.
loadFromPost()
Load values from post.
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
static _getActivatedObjTypes()
get activated obj types
if($_REQUEST['ilias_path']) define('ILIAS_HTTP_PATH' $_REQUEST['ilias_path']
Class ilECSCategorySettings.
_catchupWriteEvents($obj_id, $usr_id, $timestamp=null)
Catches up with all write events which occured before the specified timestamp.
updateObject()
updates object entry in object_data
addHeaderAction()
Add header action menu.
checkPermissionBool($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission.
saveTranslationsObject()
Save title and translations.
addUserAutoCompleteObject()
Show auto complete results.
_recordWriteEvent($obj_id, $usr_id, $action, $parent_obj_id=null)
Records a write event.
static getInstanceFromAjaxCall()
(Re-)Build instance from ajax call
GUI class for object translation handling.
static formCheckbox($checked, $varname, $value, $disabled=false)
??? public
showRepTree($a_initial_call=false)
Show tree.
Confirmation screen class.