5require_once
"./Services/Container/classes/class.ilContainerGUI.php";
31 function ilObjCategoryGUI($a_data, $a_id, $a_call_by_reference =
true, $a_prepare_output =
true)
38 $GLOBALS[
'lng']->loadLanguageModule(
'cat');
41 $this->
ilContainerGUI($a_data,(
int) $a_id,$a_call_by_reference,
false);
43 if (is_object($this->
object))
45 include_once(
"./Services/Container/classes/class.ilContainer.php");
46 include_once(
"./Services/Object/classes/class.ilObjectServiceSettingsGUI.php");
48 $this->object->getId(),
56 global $rbacsystem, $ilNavigationHistory, $ilAccess,
$ilCtrl,$ilTabs;
58 $next_class = $this->ctrl->getNextClass($this);
59 $cmd = $this->ctrl->getCmd();
67 include_once(
'./Services/User/classes/class.ilObjUserGUI.php');
69 $this->tabs_gui->setTabActive(
'administrate_users');
73 $this->gui_obj->setCreationMode($this->creation_mode);
74 $ret =& $this->ctrl->forwardCommand($this->gui_obj);
79 $this->gui_obj->setCreationMode($this->creation_mode);
80 $ret =& $this->ctrl->forwardCommand($this->gui_obj);
83 $ilTabs->clearTargets();
84 $ilTabs->setBackTarget($this->lng->txt(
'backto_lua'), $this->ctrl->getLinkTarget($this,
'listUsers'));
86 $ilHelp->setScreenIdComponent(
"cat");
87 $ilHelp->setScreenId(
"administrate_user");
88 $ilHelp->setSubScreenId(
$ilCtrl->getCmd());
91 case "ilobjuserfoldergui":
92 include_once(
'./Services/User/classes/class.ilObjUserFolderGUI.php');
95 $this->gui_obj->setUserOwnerId((
int)
$_GET[
'ref_id']);
96 $this->gui_obj->setCreationMode($this->creation_mode);
97 $ret =& $this->ctrl->forwardCommand($this->gui_obj);
99 $ilTabs->clearTargets();
100 $ilTabs->setBackTarget($this->lng->txt(
'backto_lua'), $this->ctrl->getLinkTarget($this,
'listUsers'));
102 $ilHelp->setScreenIdComponent(
"cat");
103 $ilHelp->setScreenId(
"administrate_user");
104 $ilHelp->setSubScreenId(
$ilCtrl->getCmd());
110 include_once(
"./Services/Style/classes/class.ilObjStyleSheet.php");
111 $this->tpl->setVariable(
"LOCATION_CONTENT_STYLESHEET",
116 case 'ilpermissiongui':
118 $this->tabs_gui->setTabActive(
'perm_settings');
119 include_once(
"Services/AccessControl/classes/class.ilPermissionGUI.php");
121 $ret =& $this->ctrl->forwardCommand($perm_gui);
124 case 'ilinfoscreengui':
125 if ($this->info_screen_enabled)
132 case 'ilcontainerlinklistgui':
133 include_once(
"Services/Container/classes/class.ilContainerLinkListGUI.php");
135 $ret =& $this->ctrl->forwardCommand($link_list_gui);
139 case "ilcontainerpagegui":
144 $this->tpl->setContent(
$ret);
148 case 'ilobjectcopygui':
151 include_once
'./Services/Object/classes/class.ilObjectCopyGUI.php';
154 $this->ctrl->forwardCommand($cp);
157 case "ilobjstylesheetgui":
161 case 'ilusertablegui':
162 include_once
'./Services/User/classes/class.ilUserTableGUI.php';
164 $u_table->initFilter();
165 $this->ctrl->setReturn($this,
'listUsers');
166 $this->ctrl->forwardCommand($u_table);
169 case "ilcommonactiondispatchergui":
171 include_once(
"Services/Object/classes/class.ilCommonActionDispatcherGUI.php");
173 $this->ctrl->forwardCommand($gui);
176 case 'ildidactictemplategui':
177 $this->ctrl->setReturn($this,
'edit');
178 include_once
'./Services/DidacticTemplate/classes/class.ilDidacticTemplateGUI.php';
180 $this->ctrl->forwardCommand($did);
185 $this->tabs_gui->setTabActive(
'export');
186 include_once
'./Services/Export/classes/class.ilExportGUI.php';
188 $exp->addFormat(
'xml');
189 $this->ctrl->forwardCommand($exp);
192 case 'ilobjecttranslationgui':
197 include_once(
"./Services/Object/classes/class.ilObjectTranslationGUI.php");
199 $this->ctrl->forwardCommand($transgui);
202 case 'ilobjtaxonomygui':
206 include_once(
"./Services/Taxonomy/classes/class.ilObjTaxonomyGUI.php");
208 $tax->setAssignedObject($this->object->getId());
209 $tax->setMultiple(
true);
210 $tax->setListInfo($this->lng->txt(
"cntr_tax_list_info"));
211 $this->ctrl->forwardCommand($tax);
215 if (
$cmd ==
"infoScreen")
226 $ilAccess->checkAccess(
"read",
"",
$_GET[
"ref_id"]))
228 include_once(
"./Services/Link/classes/class.ilLink.php");
229 $ilNavigationHistory->addItem(
$_GET[
"ref_id"],
234 include_once(
"./Services/Style/classes/class.ilObjStyleSheet.php");
235 if (is_object($this->
object))
237 $this->tpl->setVariable(
"LOCATION_CONTENT_STYLESHEET",
261 global $rbacsystem,
$lng, $ilHelp, $ilAccess;
263 if ($this->ctrl->getCmd() ==
"editPageContent")
267 #$this->ctrl->setParameter($this,"ref_id",$this->ref_id);
269 $ilHelp->setScreenIdComponent(
"cat");
271 if ($rbacsystem->checkAccess(
'read',$this->ref_id))
273 $force_active = (
$_GET[
"cmd"] ==
"" ||
$_GET[
"cmd"] ==
"render")
276 $tabs_gui->addTab(
"view_content",
$lng->txt(
"content"),
277 $this->ctrl->getLinkTarget($this,
""));
280 if ($this->info_screen_enabled)
282 $force_active = ($this->ctrl->getNextClass() ==
"ilinfoscreengui"
283 || strtolower(
$_GET[
"cmdClass"]) ==
"ilnotegui")
286 $tabs_gui->addTarget(
"info_short",
287 $this->ctrl->getLinkTargetByClass(
288 array(
"ilobjcategorygui",
"ilinfoscreengui"),
"showSummary"),
289 array(
"showSummary",
"",
"infoScreen"),
290 "",
"", $force_active);
295 if ($rbacsystem->checkAccess(
'write',$this->ref_id))
297 $force_active = (
$_GET[
"cmd"] ==
"edit")
300 $tabs_gui->addTarget(
"settings",
301 $this->ctrl->getLinkTarget($this,
"edit"),
"edit", get_class($this)
302 ,
"", $force_active);
304 include_once
"Services/Object/classes/class.ilObjectServiceSettingsGUI.php";
306 $this->object->getId(),
311 $tabs_gui->addTarget(
"obj_tool_setting_taxonomies",
312 $this->ctrl->getLinkTarget($this,
"editTaxonomySettings"),
"editTaxonomySettings", get_class($this));
316 include_once
'./Services/User/classes/class.ilUserAccountSettings.php';
319 $rbacsystem->checkAccess(
'cat_administrate_users',$this->ref_id))
321 $tabs_gui->addTarget(
"administrate_users",
322 $this->ctrl->getLinkTarget($this,
"listUsers"),
"listUsers", get_class($this));
325 if($ilAccess->checkAccess(
'write',
'',$this->object->getRefId()))
327 $tabs_gui->addTarget(
329 $this->ctrl->getLinkTargetByClass(
'ilexportgui',
''),
336 parent::getTabs($tabs_gui);
347 $ilTabs->activateTab(
"view_content");
348 $ret = parent::renderObject();
355 $forms = parent::initCreationForms($a_new_type);
365 $a_new_object->addTranslation($a_new_object->
getTitle(),
369 include_once(
'Services/Container/classes/class.ilContainerSortingSettings.php');
375 $parent_ref_id =
$tree->getParentId($a_new_object->
getRefId());
377 include_once(
"./Services/Style/classes/class.ilObjStyleSheet.php");
389 $this->ctrl->setParameter($this,
"ref_id", $a_new_object->
getRefId());
400 $this->ctrl->setCmd(
"showSummary");
401 $this->ctrl->setCmdClass(
"ilinfoscreengui");
412 if (!$ilAccess->checkAccess(
"visible",
"", $this->ref_id))
414 $this->
ilias->raiseError($this->lng->txt(
"msg_no_perm_read"),$this->ilias->error_obj->MESSAGE);
417 if (!$this->info_screen_enabled)
423 $this->tabs_gui->setTabActive(
'info_short');
425 include_once(
"./Services/InfoScreen/classes/class.ilInfoScreenGUI.php");
428 $info->enablePrivateNotes();
430 if ($ilAccess->checkAccess(
"read",
"",
$_GET[
"ref_id"]))
436 $info->enableNewsEditing(
false);
437 if ($ilAccess->checkAccess(
"write",
"",
$_GET[
"ref_id"]))
440 $enable_internal_rss = $news_set->get(
"enable_rss_for_internal");
442 if ($enable_internal_rss)
444 $info->setBlockProperty(
"news",
"settings",
true);
445 $info->setBlockProperty(
"news",
"public_notifications_option",
true);
449 include_once(
'Services/AdvancedMetaData/classes/class.ilAdvancedMDRecordGUI.php');
451 $record_gui->setInfoObject($info);
452 $record_gui->parse();
456 $info->addMetaDataSections($this->object->getId(),0, $this->object->getType());
459 if (
$ilCtrl->getNextClass() ==
"ilinfoscreengui")
461 $ilCtrl->forwardCommand($info);
465 return $ilCtrl->getHTML($info);
478 $this->tabs_gui->activateTab(
'settings');
479 $this->tabs_gui->setSubTabActive(
'edit_cat_settings');
482 $this->tpl->setContent($this->form->getHTML());
498 $this->form->checkInput();
500 if($this->record_gui->importEditFormPostValues())
502 $this->record_gui->writeEditForm();
505 $this->ctrl->redirect($this,
"editInfo");
519 if(is_object($this->form))
524 include_once(
'Services/Form/classes/class.ilPropertyFormGUI.php');
526 $this->form->setFormAction($this->ctrl->getFormAction($this));
527 $this->form->setTitle($this->lng->txt(
'ext_cat_settings'));
528 $this->form->addCommandButton(
'updateInfo',$this->lng->txt(
'save'));
529 $this->form->addCommandButton(
'editInfo',$this->lng->txt(
'cancel'));
531 include_once(
'Services/AdvancedMetaData/classes/class.ilAdvancedMDRecordGUI.php');
533 $this->record_gui->setPropertyForm($this->form);
534 $this->record_gui->parse();
543 $this->tabs_gui->addSubTab(
"settings_misc",
544 $this->lng->txt(
"settings"),
545 $this->ctrl->getLinkTarget($this,
"edit"));
551 $this->tabs_gui->addSubTab(
"settings_trans",
552 $this->lng->txt(
"obj_multilinguality"),
553 $this->ctrl->getLinkTargetByClass(
"ilobjecttranslationgui",
""));
558 $this->tabs_gui->addSubTab(
"icons",
559 $this->lng->txt(
"icon_settings"),
560 $this->ctrl->getLinkTarget($this,
'editIcons'));
563 $this->tabs_gui->activateTab(
"settings");
564 $this->tabs_gui->activateSubTab($active_tab);
566 include_once(
'Services/AdvancedMetaData/classes/class.ilAdvancedMDRecord.php');
569 $this->tabs_gui->addSubTabTarget(
"edit_cat_settings",
570 $this->ctrl->getLinkTarget($this,
'editInfo'),
571 "editInfo", get_class($this));
577 $this->lng->loadLanguageModule($this->object->getType());
580 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
582 $form->setFormAction($this->ctrl->getFormAction($this));
583 $form->setTitle($this->lng->txt($this->object->getType().
"_edit"));
587 $trans = $this->
object->getTranslations();
588 $def = $trans[
"Fobject"][0];
591 $title->setRequired(
true);
594 $title->setValue($def[
"title"]);
595 $form->addItem($title);
597 if(
sizeof($trans[
"Fobject"]) > 1)
599 include_once(
'Services/MetaData/classes/class.ilMDLanguageItem.php');
602 $title->setInfo($this->lng->txt(
"language").
": ".$languages[$def[
"lang"]].
603 ' <a href="'.$this->ctrl->getLinkTarget($this,
"editTranslations").
604 '">» '.$this->lng->txt(
"cat_more_translations").
'</a>');
612 $desc->setValue($def[
"desc"]);
613 $form->addItem($desc);
620 $pres->setTitle($this->lng->txt(
'obj_presentation'));
621 $form->addItem($pres);
637 include_once
'Modules/Category/classes/class.ilECSCategorySettings.php';
639 $ecs->addSettingsToForm($form,
'cat');
643 $sh->setTitle($this->lng->txt(
'obj_features'));
646 include_once
'./Services/Object/classes/class.ilObjectServiceSettingsGUI.php';
648 $this->object->getId(),
657 $form->addCommandButton(
"update", $this->lng->txt(
"save"));
677 $this->
ilias->raiseError($this->lng->txt(
"msg_no_perm_write"),$this->ilias->error_obj->MESSAGE);
682 if($form->checkInput())
684 $title = $form->getInput(
"title");
685 $desc = $form->getInput(
"desc");
686 $lang = $this->
object->getTranslations();
688 $this->
object->deleteTranslation(
$lang);
689 $this->
object->addTranslation($title, $desc,
$lang,
true);
690 $this->
object->setTitle($title);
691 $this->
object->setDescription($desc);
692 $this->
object->update();
719 require_once(
'Services/Tracking/classes/class.ilChangeEvent.php');
725 include_once
'./Services/Object/classes/class.ilObjectServiceSettingsGUI.php';
727 $this->object->getId(),
737 include_once
'Modules/Category/classes/class.ilECSCategorySettings.php';
739 if($ecs->handleSettingsUpdate())
747 $form->setValuesByPost();
748 $this->tpl->setContent($form->getHTML());
759 $this->ctrl->redirectByClass(
"ilobjecttranslationgui",
"");
762 $this->lng->loadLanguageModule($this->object->getType());
765 include_once(
"./Services/Object/classes/class.ilObjectTranslationTableGUI.php");
768 if ($a_get_post_values)
771 foreach(
$_POST[
"title"] as $k => $v)
773 $vals[] = array(
"title" => $v,
774 "desc" =>
$_POST[
"desc"][$k],
775 "lang" =>
$_POST[
"lang"][$k],
776 "default" => (
$_POST[
"default"] == $k));
778 $table->setData($vals);
782 $data = $this->
object->getTranslations();
783 foreach(
$data[
"Fobject"] as $k => $v)
785 $data[
"Fobject"][$k][
"default"] = ($k ==
$data[
"default_language"]);
789 $data[
"Fobject"][++$k][
"title"] =
"";
791 $table->setData(
$data[
"Fobject"]);
793 $tpl->setContent($table->getHTML());
803 $this->
ilias->raiseError($this->lng->txt(
"permission_denied"),$this->ilias->error_obj->MESSAGE);
807 if (!isset(
$_POST[
"default"]))
814 if (array_key_exists(
"",
$_POST[
"lang"]))
821 if (count(array_unique(
$_POST[
"lang"])) < count(
$_POST[
"lang"]))
828 $this->
object->removeTranslations();
829 foreach(
$_POST[
"title"] as $k => $v)
832 $is_default = (
$_POST[
"default"] == $k);
837 $this->
object->update();
840 $this->
object->addTranslation(
848 $this->ctrl->redirect($this,
"editTranslations");
858 $k = max(array_keys(
$_POST[
"title"]));
874 foreach(
$_POST[
"title"] as $k => $v)
879 if($k !=
$_POST[
"default"])
881 unset(
$_POST[
"title"][$k]);
882 unset(
$_POST[
"desc"][$k]);
883 unset(
$_POST[
"lang"][$k]);
908 global
$lng, $rbacreview;
910 $a_tpl->addBlockfile(
"ADM_CONTENT",
"adm_content",
"tpl.cat_import_form.html",
913 $a_tpl->setVariable(
"FORMACTION", $this->ctrl->getFormAction($this));
915 $a_tpl->setVariable(
"TXT_IMPORT_CATEGORIES",
$lng->txt(
"import_categories"));
916 $a_tpl->setVariable(
"TXT_HIERARCHY_OPTION",
$lng->txt(
"import_cat_localrol"));
917 $a_tpl->setVariable(
"TXT_IMPORT_FILE",
$lng->txt(
"import_file"));
918 $a_tpl->setVariable(
"TXT_IMPORT_TABLE",
$lng->txt(
"import_cat_table"));
920 $a_tpl->setVariable(
"BTN_IMPORT",
$lng->txt(
"import"));
921 $a_tpl->setVariable(
"BTN_CANCEL",
$lng->txt(
"cancel"));
924 $parent_role_ids = $rbacreview->getParentRoleIds($a_ref_id,
true);
927 ksort($parent_role_ids);
929 foreach ($parent_role_ids as $key => $par)
931 if ($par[
"obj_id"] != SYSTEM_ROLE_ID)
935 $output[
"adopt"][$key][
"check_adopt"] = $check;
936 $output[
"adopt"][$key][
"role_id"] = $par[
"obj_id"];
937 $output[
"adopt"][$key][
"type"] = ($par[
"type"] ==
'role' ?
'Role' :
'Template');
938 $output[
"adopt"][$key][
"role_name"] = $par[
"title"];
945 foreach ($output[
"adopt"] as $key => $value)
947 $a_tpl->setCurrentBlock(
"ADOPT_PERM_ROW");
948 $a_tpl->setVariable(
"CSS_ROW_ADOPT",$value[
"css_row_adopt"]);
949 $a_tpl->setVariable(
"CHECK_ADOPT",$value[
"check_adopt"]);
950 $a_tpl->setVariable(
"LABEL_ID",$value[
"role_id"]);
951 $a_tpl->setVariable(
"TYPE",$value[
"type"]);
952 $a_tpl->setVariable(
"ROLE_NAME",$value[
"role_name"]);
953 $a_tpl->parseCurrentBlock();
965 $this->ctrl->redirect($this);
1005 require_once(
"./Modules/Category/classes/class.ilCategoryImportParser.php");
1010 if (!@is_dir($import_dir))
1017 $file_name = $_FILES[
"importFile"][
"name"];
1020 if (!strcmp($file_name,
"")) {
1022 $this->ctrl->redirect($this);
1025 $parts = pathinfo($file_name);
1026 $full_path = $import_dir.
"/".$file_name;
1033 $subdir = basename($parts[
"basename"],
".".$parts[
"extension"]);
1034 $xml_file = $import_dir.
"/".$subdir.
"/".$subdir.
".xml";
1038 $importParser->startParsing();
1041 $this->ctrl->redirect($this);
1050 include_once(
"./Services/User/classes/class.ilUserTableGUI.php");
1052 $utab->resetOffset();
1053 $utab->resetFilter();
1067 include_once(
"./Services/User/classes/class.ilUserTableGUI.php");
1069 $utab->resetOffset();
1070 $utab->writeFilterToSession();
1077 global
$ilUser,$rbacreview, $ilToolbar;
1079 include_once
'./Services/User/classes/class.ilLocalUser.php';
1080 include_once
'./Services/User/classes/class.ilObjUserGUI.php';
1082 global $rbacsystem,$rbacreview;
1084 if(!$rbacsystem->checkAccess(
"cat_administrate_users",$this->object->getRefId()))
1086 $this->
ilias->raiseError($this->lng->txt(
"msg_no_perm_admin_users"),$this->ilias->error_obj->MESSAGE);
1088 $this->tabs_gui->setTabActive(
'administrate_users');
1092 $this->tpl->addBlockfile(
'ADM_CONTENT',
'adm_content',
'tpl.cat_admin_users.html',
1093 "Modules/Category");
1095 if(count($rbacreview->getGlobalAssignableRoles()) or in_array(SYSTEM_ROLE_ID,$rbacreview->assignedRoles(
$ilUser->getId())))
1097 $ilToolbar->addButton(
1098 $this->lng->txt(
'add_user'),
1099 $this->ctrl->getLinkTargetByClass(
'ilobjusergui',
'create')
1102 $ilToolbar->addButton(
1103 $this->lng->txt(
'import_users'),
1104 $this->ctrl->getLinkTargetByClass(
'ilobjuserfoldergui',
'importUserForm')
1114 $this->tpl->setCurrentBlock(
"confirm_delete");
1115 $this->tpl->setVariable(
"CONFIRM_FORMACTION",$this->ctrl->getFormAction($this));
1116 $this->tpl->setVariable(
"TXT_CANCEL",$this->lng->txt(
'cancel'));
1117 $this->tpl->setVariable(
"CONFIRM_CMD",
'performDeleteUsers');
1118 $this->tpl->setVariable(
"TXT_CONFIRM",$this->lng->txt(
'delete'));
1119 $this->tpl->parseCurrentBlock();
1122 $this->lng->loadLanguageModule(
'user');
1124 include_once(
"./Services/User/classes/class.ilUserTableGUI.php");
1126 $this->tpl->setVariable(
'USERS_TABLE',$utab->getHTML());
1136 include_once
'./Services/User/classes/class.ilUserAutoComplete.php';
1138 $auto->setSearchFields(array(
'login',
'firstname',
'lastname',
'email'));
1139 $auto->enableFieldSearchableCheck(
true);
1140 $auto->isMoreLinkAvailable(
true);
1154 include_once
'./Services/User/classes/class.ilLocalUser.php';
1157 foreach(
$_POST[
'user_ids'] as $user_id)
1161 die(
'user id not valid');
1186 include_once
'./Services/Utilities/classes/class.ilConfirmationGUI.php';
1188 $confirm->setFormAction($this->ctrl->getFormAction($this));
1189 $confirm->setHeaderText($this->lng->txt(
'sure_delete_selected_users'));
1190 $confirm->setConfirm($this->lng->txt(
'delete'),
'performDeleteUsers');
1191 $confirm->setCancel($this->lng->txt(
'cancel'),
'listUsers');
1193 foreach(
$_POST[
'id'] as $user)
1200 $name[
'lastname'].
', '.$name[
'firstname'].
' ['.$name[
'login'].
']'
1203 $this->tpl->setContent($confirm->getHTML());
1208 global $rbacreview,$ilTabs;
1212 include_once
'./Services/User/classes/class.ilLocalUser.php';
1214 if(!isset(
$_GET[
'obj_id']))
1222 $ilTabs->clearTargets();
1223 $ilTabs->setBackTarget($this->lng->txt(
'backto_lua'), $this->ctrl->getLinkTarget($this,
'listUsers'));
1225 $ilHelp->setScreenIdComponent(
"cat");
1226 $ilHelp->setScreenId(
"administrate_user");
1227 $ilHelp->setSubScreenId(
"assign_roles");
1234 #ilUtil::sendInfo($this->lng->txt('no_roles_user_can_be_assigned_to'));
1235 #$this->listUsersObject();
1240 $this->tpl->addBlockfile(
'ADM_CONTENT',
'adm_content',
'tpl.cat_role_assignment.html',
1241 "Modules/Category");
1243 $ass_roles = $rbacreview->assignedRoles(
$_GET[
'obj_id']);
1246 foreach($roles as $role)
1255 $f_result[$counter][] = $role_obj->getTitle() ? $role_obj->getTitle() :
"";
1256 $f_result[$counter][] = $role_obj->getDescription() ? $role_obj->getDescription() :
"";
1257 $f_result[$counter][] = $role[
'role_type'] ==
'global' ?
1258 $this->lng->txt(
'global') :
1259 $this->lng->txt(
'local');
1269 global $rbacreview,$rbacadmin;
1272 include_once
'./Services/User/classes/class.ilLocalUser.php';
1292 $new_role_ids =
$_POST[
'role_ids'] ?
$_POST[
'role_ids'] : array();
1293 $assigned_roles = $rbacreview->assignedRoles((
int)
$_REQUEST[
'obj_id']);
1294 foreach($roles as $role)
1296 if(in_array($role[
'obj_id'],$new_role_ids) and !in_array($role[
'obj_id'],$assigned_roles))
1298 $rbacadmin->assignUser($role[
'obj_id'],(
int)
$_REQUEST[
'obj_id']);
1300 if(in_array($role[
'obj_id'],$assigned_roles) and !in_array($role[
'obj_id'],$new_role_ids))
1302 $rbacadmin->deassignUser($role[
'obj_id'],(
int)
$_REQUEST[
'obj_id']);
1319 if(in_array(SYSTEM_ROLE_ID,$rbacreview->assignedRoles(
$ilUser->getId())))
1321 $global_roles = $rbacreview->getGlobalRolesArray();
1323 elseif($tmp_obj->getTimeLimitOwner() == $this->object->getRefId())
1325 $global_roles = $rbacreview->getGlobalAssignableRoles();
1329 $global_roles = array();
1331 return $roles = array_merge($global_roles,
1332 $rbacreview->getAssignableChildRoles($this->object->getRefId()));
1343 if($tmp_obj->getTimeLimitOwner() != $this->object->getRefId() and
1344 !in_array(SYSTEM_ROLE_ID,$rbacreview->assignedRoles(
$ilUser->getId())))
1350 $new_assigned = $new_assigned ? $new_assigned : array();
1351 $assigned = $rbacreview->assignedRoles((
int)
$_GET[
'obj_id']);
1354 if(!in_array(SYSTEM_ROLE_ID,$rbacreview->assignedRoles(
$ilUser->getId())))
1356 $ga = $rbacreview->getGlobalAssignableRoles();
1360 $ga = $rbacreview->getGlobalRolesArray();
1362 $global_assignable = array();
1363 foreach($ga as $role)
1365 $global_assignable[] = $role[
'obj_id'];
1368 $new_visible_assigned_roles = array_intersect($new_assigned,$global_assignable);
1369 $all_assigned_roles = array_intersect($assigned,$rbacreview->getGlobalRoles());
1370 $main_assigned_roles = array_diff($all_assigned_roles,$global_assignable);
1372 if(!count($new_visible_assigned_roles) and !count($main_assigned_roles))
1385 $tpl =& $tbl->getTemplateObject();
1388 $tpl->setCurrentBlock(
"tbl_form_header");
1390 $this->ctrl->setParameter($this,
'obj_id',
$_GET[
'obj_id']);
1391 $tpl->setVariable(
"FORMACTION",$this->ctrl->getFormAction($this));
1392 $tpl->parseCurrentBlock();
1395 $tpl->setVariable(
"COLUMN_COUNTS",4);
1399 $tpl->setVariable(
"BTN_NAME",
"assignSave");
1400 $tpl->setVariable(
"BTN_VALUE",$this->lng->txt(
"change_assignment"));
1401 $tpl->parseCurrentBlock();
1403 $tpl->setCurrentBlock(
"tbl_action_row");
1404 $tpl->setVariable(
"TPLPATH",$this->tpl->tplPath);
1405 $tpl->parseCurrentBlock();
1408 $title = $this->lng->txt(
'role_assignment').
' ('.$tmp_obj->getFullname().
')';
1410 $tbl->setTitle($title,
"icon_role.svg",$this->lng->txt(
"role_assignment"));
1411 $tbl->setHeaderNames(array(
'',
1412 $this->lng->txt(
"title"),
1413 $this->lng->txt(
'description'),
1414 $this->lng->txt(
"type")));
1415 $tbl->setHeaderVars(array(
"",
1419 array(
"ref_id" => $this->object->getRefId(),
1420 "cmd" =>
"assignRoles",
1421 "obj_id" =>
$_GET[
'obj_id'],
1422 "cmdClass" =>
"ilobjcategorygui",
1423 "cmdNode" =>
$_GET[
"cmdNode"]));
1424 $tbl->setColumnWidth(array(
"4%",
"35%",
"45%",
"16%"));
1426 $this->set_unlimited =
true;
1430 $this->tpl->setVariable(
"ROLES_TABLE",$tbl->tpl->get());
1440 $tpl =& $tbl->getTemplateObject();
1443 $tpl->setCurrentBlock(
"tbl_form_header");
1445 $this->ctrl->setParameter($this,
'sort_by',
$_GET[
'sort_by']);
1446 $this->ctrl->setParameter($this,
'sort_order',
$_GET[
'sort_order']);
1447 $this->ctrl->setParameter($this,
'offset',
$_GET[
'offset']);
1448 $tpl->setVariable(
"FORMACTION",$this->ctrl->getFormAction($this));
1449 $tpl->parseCurrentBlock();
1455 $tpl->setVariable(
"COLUMN_COUNTS",6);
1458 $tpl->setCurrentBlock(
"tbl_action_button");
1459 $tpl->setVariable(
"BTN_NAME",
"deleteUser");
1460 $tpl->setVariable(
"BTN_VALUE",$this->lng->txt(
"delete"));
1461 $tpl->parseCurrentBlock();
1463 $tpl->setCurrentBlock(
"tbl_action_row");
1464 $tpl->setVariable(
"TPLPATH",$this->tpl->tplPath);
1465 $tpl->parseCurrentBlock();
1467 $tbl->setFormName(
'cmd');
1468 $tbl->enable(
'select_all');
1471 $tbl->setTitle($this->lng->txt(
"users"),
"icon_usr.svg",$this->lng->txt(
"users"));
1472 $tbl->setHeaderNames(array(
'',
1473 $this->lng->txt(
"username"),
1474 $this->lng->txt(
"firstname"),
1475 $this->lng->txt(
"lastname"),
1476 $this->lng->txt(
'context'),
1477 $this->lng->txt(
'role_assignment')));
1478 $tbl->setHeaderVars(array(
"",
1484 array(
"ref_id" => $this->object->getRefId(),
1485 "cmd" =>
"listUsers",
1486 "cmdClass" =>
"ilobjcategorygui",
1487 "cmdNode" =>
$_GET[
"cmdNode"]));
1488 $tbl->setColumnWidth(array(
"1px",
"20%",
"20%",
"20%",
"20%",
"20%"));
1489 $tbl->setSelectAllCheckbox(
'user_ids');
1494 $this->tpl->setVariable(
"USERS_TABLE",$tbl->tpl->get());
1505 case "listUsersObject":
1506 $tbl->setOrderColumn(
$_GET[
"sort_by"]);
1507 $tbl->setOrderDirection(
$_GET[
"sort_order"]);
1508 $tbl->setOffset(
$_GET[
"offset"]);
1509 $tbl->setMaxCount($this->all_users_count);
1510 $tbl->setLimit(
$ilUser->getPref(
'hits_per_page'));
1511 $tbl->setFooter(
"tblfooter",$this->lng->txt(
"previous"),$this->lng->txt(
"next"));
1512 $tbl->setData($result_set);
1513 $tbl->disable(
'auto_sort');
1518 case "assignRolesObject":
1519 $offset =
$_GET[
"offset"];
1521 if (
$_GET[
"sort_by"] ==
"title" or empty(
$_GET[
"sort_by"]))
1523 $_GET[
"sort_by"] =
"login";
1525 $order =
$_GET[
"sort_by"];
1526 $direction =
$_GET[
"sort_order"];
1529 case "clipboardObject":
1530 $offset =
$_GET[
"offset"];
1531 $order =
$_GET[
"sort_by"];
1532 $direction =
$_GET[
"sort_order"];
1533 $tbl->disable(
"footer");
1537 $offset =
$_GET[
"offset"];
1538 $order =
$_GET[
"sort_by"];
1539 $direction =
$_GET[
"sort_order"];
1543 $tbl->setOrderColumn($order);
1544 $tbl->setOrderDirection($direction);
1545 $tbl->setOffset($offset);
1546 if($this->set_unlimited)
1548 $tbl->setLimit(
$_GET[
"limit"]*100);
1552 $tbl->setLimit(
$_GET[
'limit']);
1554 $tbl->setMaxCount(count($result_set));
1558 $tbl->setFooter(
"tblfooter",$this->lng->txt(
"previous"),$this->lng->txt(
"next"));
1562 $tbl->disable(
'footer');
1564 $tbl->setData($result_set);
1569 include_once
"./Services/Table/classes/class.ilTableGUI.php";
1576 $action[0] = $this->lng->txt(
'all_users');
1577 $action[$this->
object->getRefId()] = $this->lng->txt(
'users').
1580 foreach($a_parent_ids as $parent)
1582 if($parent == $this->object->getRefId())
1606 if ($ilAccess->checkAccess(
"read",
"", $a_target))
1610 else if ($ilAccess->checkAccess(
"read",
"", ROOT_FOLDER_ID))
1635 $this->tabs_gui->setTabActive(
'settings');
1642 $tpl->setContent($a_form->getHTML());
1649 include_once
"Services/Form/classes/class.ilPropertyFormGUI.php";
1651 $form->setFormAction($this->ctrl->getFormAction($this));
1656 $form->addCommandButton(
'updateIcons', $this->lng->txt(
'save'));
1671 if($form->checkInput())
1676 if(
$_POST[
"cont_icon_delete"])
1678 $this->
object->removeCustomIcon();
1680 $this->
object->saveIcons($_FILES[
"cont_icon"][
'tmp_name']);
1682 if ($_FILES[
"cont_icon"][
'tmp_name'] ||
$_POST[
"cont_icon_delete"])
1686 $this->ctrl->redirect($this,
"editIcons");
1689 $form->setValuesByPost();
1700 $this->tabs_gui->setTabActive(
"obj_tool_setting_taxonomies");
1701 $this->tabs_gui->addSubTab(
"tax_settings", $this->lng->txt(
"cntr_taxonomy_sideblock_settings"),
1702 $this->ctrl->getLinkTarget($this,
"editTaxonomySettings"));
1703 $this->tabs_gui->addSubTab(
"tax_list", $this->lng->txt(
"cntr_taxonomy_definitions"),
1704 $this->ctrl->getLinkTargetByClass(
"ilobjtaxonomygui",
""));
1705 $this->tabs_gui->activateSubTab($a_active);
1712 include_once
"Services/Object/classes/class.ilObjectServiceSettingsGUI.php";
1713 include_once
"Services/Taxonomy/classes/class.ilObjTaxonomy.php";
1718 foreach(
$tree->getPathFull($this->object->getRefId()) as $node)
1722 if(
sizeof($node_taxes))
1724 foreach($node_taxes as $node_tax)
1726 $res[$node_tax[
"tax_id"]] = array(
1727 "title" => $node_tax[
"title"]
1728 ,
"source" => $node[
"child"]
1740 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
1742 $form->setFormAction($this->ctrl->getFormAction($this),
"editTaxonomySettings");
1743 $form->setTitle($this->lng->txt(
"cntr_taxonomy_sideblock_settings"));
1746 $form->addItem($block);
1750 foreach($tax as $tax_id => $tax_item)
1754 if($tax_item[
"source"] != $this->object->getRefId())
1757 $loc->setTextOnly(
true);
1758 $loc->addRepositoryItems($tax_item[
"source"]);
1759 $option->setInfo($loc->getHTML());
1762 $block->addOption($option);
1764 if(in_array($tax_id, $current))
1770 $block->setValue($value);
1772 $form->addCommandButton(
"updateTaxonomySettings", $this->lng->txt(
"save"));
1782 if(!
sizeof($taxonomies))
1789 $this->tpl->setContent($form->getHTML());
1800 if(substr($keyword, 0, strlen($prefix)) == $prefix && (
bool)$value)
1802 $res[] = substr($keyword, strlen($prefix));
1812 if(
sizeof($taxonomies))
1815 if($form->checkInput())
1817 $sblock = $form->getInput(
"sblock");
1824 if(is_array($sblock))
1826 foreach($sblock as $tax_id)
1829 $prefix.$tax_id, 1);
1836 $this->ctrl->redirect($this,
"editTaxonomySettings");
static _getActivatedObjTypes()
get activated obj types
_recordWriteEvent($obj_id, $usr_id, $action, $parent_obj_id=null)
Records a write event.
_catchupWriteEvents($obj_id, $usr_id, $timestamp=null)
Catches up with all write events which occured before the specified timestamp.
This class represents an option in a checkbox group.
static getInstanceFromAjaxCall()
(Re-)Build instance from ajax call
Confirmation screen class.
afterUpdate()
Post (successful) object update hook.
& forwardToPageObject()
forward command to page object
initSortingForm(ilPropertyFormGUI $form, array $a_sorting_settings)
Append sorting settings to property form.
showRepTree($a_initial_call=false)
Show tree.
ilContainerGUI($a_data, $a_id, $a_call_by_reference=true, $a_prepare_output=true)
Constructor @access public.
forwardToStyleSheet()
Forward to style object.
showCustomIconsEditing($a_input_colspan=1, ilPropertyFormGUI $a_form=null, $a_as_section=true)
show edit section of custom icons for container
saveSortingSettings(ilPropertyFormGUI $form)
Save sorting settings.
Class ilContainerLinkListGUI.
static _deleteContainerSettings($a_id, $a_keyword=null, $a_keyword_like=false)
static _getContainerSettings($a_id)
_lookupContainerSetting($a_id, $a_keyword, $a_default_value=NULL)
Lookup a container setting.
_writeContainerSetting($a_id, $a_keyword, $a_value)
GUI class for didactic template settings inside repository objects.
Class ilECSCategorySettings.
Export User Interface Class.
static _getLink($a_ref_id, $a_type='', $a_params=array(), $append="")
_getAllUserIds($a_filter=0)
editTaxonomySettingsObject()
__setTableGUIBasicData(&$tbl, &$result_set, $a_from="", $a_footer=true)
initExtendedSettings()
build property form for extended category settings
initEditForm()
Init object edit form.
updateObject()
updates object entry in object_data
__showRolesTable($a_result_set, $a_from="")
importCategoriesWithRolObject()
import categories with local rol
importCategoriesFormObject()
display form for category import
addUserAutoCompleteObject()
Show auto complete results.
ilObjCategoryGUI($a_data, $a_id, $a_call_by_reference=true, $a_prepare_output=true)
Constructor @access public.
getEditFormValues()
Get values for edit form.
initTaxSubTabs($a_active="tax_list")
_getImportDir()
get user import directory name
deleteTranslationsObject()
Remove translation.
editInfoObject()
Edit extended category settings.
infoScreenObject()
this one is called from the info button in the repository not very nice to set cmdClass/Cmd manually,...
infoScreen()
show information screen
addTranslationObject()
Add a translation.
listUsersObject($show_delete=false)
editIconsObject($a_form=null)
Edit folder icons.
applyFilterObject()
Apply filter.
initCreationForms($a_new_type)
Init creation froms.
updateIconsObject()
update container icons
getTabs(&$tabs_gui)
Get tabs.
importCategoriesObject()
import categories
__checkGlobalRoles($new_assigned)
_importCategoriesForm($a_ref_id, &$a_tpl)
display form for category import (static, also called by RootFolderGUI)
__showUsersTable($a_result_set, $a_from="", $a_footer=true)
__buildFilterSelect($a_parent_ids)
updateTaxonomySettingsObject()
afterSave(ilObject $a_new_object)
Post (successful) object creation hook.
setEditTabs($active_tab="settings_misc")
renderObject()
Render category.
const CONTAINER_SETTING_TAXBLOCK
saveTranslationsObject()
Save title and translations.
performDeleteUsersObject()
resetFilterObject()
Reset filter (note: this function existed before data table filter has been introduced.
initTaxonomyForm(array $tax)
_importCategories($a_ref_id, $withrol_tmp)
import categories (static, also called by RootFolderGUI)
editTranslationsObject($a_get_post_values=false, $a_add=false)
Edit title and translations.
& executeCommand()
execute command note: this method is overwritten in all container objects
updateInfoObject()
Update info (extended meta data)
importCancelledObject()
import cancelled
getContentStylePath($a_style_id)
get content style path
static lookupObjectStyle($a_obj_id)
Lookup object style.
static writeStyleUsage($a_obj_id, $a_style_id)
Write style usage.
_lookupStandard($a_id)
Lookup standard flag.
static getUsageOfObject($a_obj_id, $a_include_titles=false)
Get usage of object.
Class ilObjUserFolderGUI.
static _lookupName($a_user_id)
lookup user name
GUI class for the workflow of copying objects.
getInstanceByObjId($a_obj_id, $stop_on_error=true)
get an instance of an Ilias object by object id
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission and redirect on error.
static _gotoRepositoryNode($a_ref_id, $a_cmd="frameset")
Goto repository root.
prepareOutput()
prepare output
static _gotoRepositoryRoot($a_raise_error=false)
Goto repository root.
getCreationMode()
get creation mode
checkPermissionBool($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission.
initDidacticTemplate(ilPropertyFormGUI $form)
Show didactic template types.
addHeaderAction()
Add header action menu.
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...
static initServiceSettingsForm($a_obj_id, ilPropertyFormGUI $form, $services)
Init service settings form.
static updateServiceSettingsForm($a_obj_id, ilPropertyFormGUI $form, $services)
Update service settings.
const INFO_TAB_VISIBILITY
GUI class for object translation handling.
TableGUI class for title/description translations.
Class ilObject Basic functions for all objects.
static _lookupObjId($a_id)
const TITLE_LENGTH
max length of object title
static _lookupTitle($a_id)
lookup object title
getRefId()
get reference id @access public
getDescription()
get object description
getId()
get object id @access public
getTitle()
get object title @access public
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
This class represents a text area property in a property form.
This class represents a text property in a property form.
static getInstance()
Singelton get instance.
Auto completion class for user lists.
TableGUI class for user administration.
static getDataDir()
get data directory (outside webspace)
static moveUploadedFile($a_file, $a_name, $a_target, $a_raise_errors=true, $a_mode="move_uploaded")
move uploaded file
static formCheckbox($checked, $varname, $value, $disabled=false)
??? @access public
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
static switchColor($a_num, $a_css1, $a_css2)
switches style sheets for each even $a_num (used for changing colors of different result rows)
static unzip($a_file, $overwrite=false, $a_flat=false)
unzip file
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
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.
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
static createDirectory($a_dir, $a_mod=0755)
create directory
redirection script todo: (a better solution should control the processing via a xml file)
if($_REQUEST['ilias_path']) define('ILIAS_HTTP_PATH' $_REQUEST['ilias_path']