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);
43 global $rbacsystem, $ilNavigationHistory, $ilAccess,
$ilCtrl,$ilTabs;
45 $next_class = $this->ctrl->getNextClass($this);
46 $cmd = $this->ctrl->getCmd();
50 include_once(
'./Services/User/classes/class.ilObjUserGUI.php');
52 $this->tabs_gui->setTabActive(
'administrate_users');
56 $this->gui_obj->setCreationMode($this->creation_mode);
57 $ret =& $this->ctrl->forwardCommand($this->gui_obj);
62 $this->gui_obj->setCreationMode($this->creation_mode);
63 $ret =& $this->ctrl->forwardCommand($this->gui_obj);
66 $ilTabs->clearTargets();
67 $ilTabs->setBackTarget($this->lng->txt(
'backto_lua'), $this->ctrl->getLinkTarget($this,
'listUsers'));
70 case "ilobjuserfoldergui":
71 include_once(
'./Services/User/classes/class.ilObjUserFolderGUI.php');
73 $this->tabs_gui->setTabActive(
'administrate_users');
75 $this->gui_obj->setUserOwnerId((
int) $_GET[
'ref_id']);
76 $this->gui_obj->setCreationMode($this->creation_mode);
77 $ret =& $this->ctrl->forwardCommand($this->gui_obj);
83 include_once(
"./Services/Style/classes/class.ilObjStyleSheet.php");
84 $this->tpl->setVariable(
"LOCATION_CONTENT_STYLESHEET",
89 case 'ilpermissiongui':
91 $this->tabs_gui->setTabActive(
'perm_settings');
92 include_once(
"Services/AccessControl/classes/class.ilPermissionGUI.php");
94 $ret =& $this->ctrl->forwardCommand($perm_gui);
97 case 'ilinfoscreengui':
102 case 'ilcontainerlinklistgui':
103 include_once(
"Services/Container/classes/class.ilContainerLinkListGUI.php");
105 $ret =& $this->ctrl->forwardCommand($link_list_gui);
109 case "ilpageobjectgui":
114 $this->tpl->setContent(
$ret);
118 case 'ilobjectcopygui':
121 include_once
'./Services/Object/classes/class.ilObjectCopyGUI.php';
124 $this->ctrl->forwardCommand($cp);
127 case "ilobjstylesheetgui":
131 case 'ilusertablegui':
132 include_once
'./Services/User/classes/class.ilUserTableGUI.php';
134 $u_table->initFilter();
135 $this->ctrl->setReturn($this,
'listUsers');
136 $this->ctrl->forwardCommand($u_table);
139 case "ilcommonactiondispatchergui":
141 include_once(
"Services/Object/classes/class.ilCommonActionDispatcherGUI.php");
143 $this->ctrl->forwardCommand($gui);
146 case 'ildidactictemplategui':
147 $this->ctrl->setReturn($this,
'edit');
148 include_once
'./Services/DidacticTemplate/classes/class.ilDidacticTemplateGUI.php';
150 $this->ctrl->forwardCommand($did);
155 $this->tabs_gui->setTabActive(
'export');
156 include_once
'./Services/Export/classes/class.ilExportGUI.php';
158 $exp->addFormat(
'xml');
159 $this->ctrl->forwardCommand($exp);
163 if (
$cmd ==
"infoScreen")
174 $ilAccess->checkAccess(
"read",
"", $_GET[
"ref_id"]))
176 $ilNavigationHistory->addItem($_GET[
"ref_id"],
177 $ilCtrl->getLinkTargetByClass(
"ilrepositorygui",
"frameset"),
"cat");
181 include_once(
"./Services/Style/classes/class.ilObjStyleSheet.php");
182 if (is_object($this->
object))
184 $this->tpl->setVariable(
"LOCATION_CONTENT_STYLESHEET",
208 global $rbacsystem,
$lng, $ilHelp, $ilAccess;
210 if ($this->ctrl->getCmd() ==
"editPageContent")
214 #$this->ctrl->setParameter($this,"ref_id",$this->ref_id);
216 $ilHelp->setScreenIdComponent(
"cat");
218 if ($rbacsystem->checkAccess(
'read',$this->ref_id))
220 $force_active = (
$_GET[
"cmd"] ==
"" ||
$_GET[
"cmd"] ==
"render")
223 $tabs_gui->addTab(
"view_content", $lng->txt(
"content"),
224 $this->ctrl->getLinkTarget($this,
""));
227 $force_active = ($this->ctrl->getNextClass() ==
"ilinfoscreengui"
228 || strtolower(
$_GET[
"cmdClass"]) ==
"ilnotegui")
231 $tabs_gui->addTarget(
"info_short",
232 $this->ctrl->getLinkTargetByClass(
233 array(
"ilobjcategorygui",
"ilinfoscreengui"),
"showSummary"),
234 array(
"showSummary",
"",
"infoScreen"),
235 "",
"", $force_active);
239 if ($rbacsystem->checkAccess(
'write',$this->ref_id))
241 $force_active = (
$_GET[
"cmd"] ==
"edit")
244 $tabs_gui->addTarget(
"settings",
245 $this->ctrl->getLinkTarget($this,
"edit"),
"edit", get_class($this)
246 ,
"", $force_active);
249 include_once
'./Services/User/classes/class.ilUserAccountSettings.php';
252 $rbacsystem->checkAccess(
'cat_administrate_users',$this->ref_id))
254 $tabs_gui->addTarget(
"administrate_users",
255 $this->ctrl->getLinkTarget($this,
"listUsers"),
"listUsers", get_class($this));
258 if($ilAccess->checkAccess(
'write',
'',$this->object->getRefId()))
260 $tabs_gui->addTarget(
262 $this->ctrl->getLinkTargetByClass(
'ilexportgui',
''),
280 $ilTabs->activateTab(
"view_content");
298 $a_new_object->addTranslation($a_new_object->
getTitle(),
299 $a_new_object->
getDescription(), $ilUser->getPref(
"language"),
true);
302 include_once(
'Services/Container/classes/class.ilContainerSortingSettings.php');
308 $parent_ref_id = $tree->getParentId($a_new_object->
getRefId());
310 include_once(
"./Services/Style/classes/class.ilObjStyleSheet.php");
322 $this->ctrl->setParameter($this,
"ref_id", $a_new_object->
getRefId());
333 $this->ctrl->setCmd(
"showSummary");
334 $this->ctrl->setCmdClass(
"ilinfoscreengui");
345 if (!$ilAccess->checkAccess(
"visible",
"", $this->ref_id))
347 $this->ilias->raiseError($this->lng->txt(
"msg_no_perm_read"),$this->ilias->error_obj->MESSAGE);
351 $this->tabs_gui->setTabActive(
'info_short');
353 include_once(
"./Services/InfoScreen/classes/class.ilInfoScreenGUI.php");
356 $info->enablePrivateNotes();
358 if ($ilAccess->checkAccess(
"read",
"",
$_GET[
"ref_id"]))
364 $info->enableNewsEditing(
false);
365 if ($ilAccess->checkAccess(
"write",
"",
$_GET[
"ref_id"]))
368 $enable_internal_rss = $news_set->get(
"enable_rss_for_internal");
370 if ($enable_internal_rss)
372 $info->setBlockProperty(
"news",
"settings",
true);
373 $info->setBlockProperty(
"news",
"public_notifications_option",
true);
377 include_once(
'Services/AdvancedMetaData/classes/class.ilAdvancedMDRecordGUI.php');
380 $record_gui->parse();
384 $info->addMetaDataSections($this->object->getId(),0, $this->
object->getType());
387 if ($ilCtrl->getNextClass() ==
"ilinfoscreengui")
389 $ilCtrl->forwardCommand($info);
393 return $ilCtrl->getHTML($info);
406 $this->tabs_gui->activateTab(
'settings');
407 $this->tabs_gui->setSubTabActive(
'edit_cat_settings');
410 $this->tpl->setContent($this->form->getHTML());
421 include_once(
'Services/AdvancedMetaData/classes/class.ilAdvancedMDRecordGUI.php');
423 'cat',$this->object->getId());
425 $record_gui->saveValues();
440 if(is_object($this->form))
445 include_once(
'Services/Form/classes/class.ilPropertyFormGUI.php');
447 $this->form->setFormAction($this->ctrl->getFormAction($this));
448 $this->form->setTitle($this->lng->txt(
'ext_cat_settings'));
449 $this->form->addCommandButton(
'updateInfo',$this->lng->txt(
'save'));
450 $this->form->addCommandButton(
'editInfo',$this->lng->txt(
'cancel'));
452 include_once(
'Services/AdvancedMetaData/classes/class.ilAdvancedMDRecordGUI.php');
455 $record_gui->parse();
462 $this->tabs_gui->addSubTab(
"settings_misc",
463 $this->lng->txt(
"settings"),
464 $this->ctrl->getLinkTarget($this,
"edit"));
466 $this->tabs_gui->addSubTab(
"settings_trans",
467 $this->lng->txt(
"title_and_translations"),
468 $this->ctrl->getLinkTarget($this,
"editTranslations"));
470 $this->tabs_gui->activateTab(
"settings");
471 $this->tabs_gui->activateSubTab($active_tab);
473 include_once(
'Services/AdvancedMetaData/classes/class.ilAdvancedMDRecord.php');
476 $this->tabs_gui->addSubTabTarget(
"edit_cat_settings",
477 $this->ctrl->getLinkTarget($this,
'editInfo'),
478 "editInfo", get_class($this));
484 $this->lng->loadLanguageModule($this->object->getType());
487 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
489 $form->setFormAction($this->ctrl->getFormAction($this));
490 $form->setTitle($this->lng->txt($this->object->getType().
"_edit"));
497 include_once(
'Services/Container/classes/class.ilContainerSortingSettings.php');
501 $sort_title =
new ilRadioOption($this->lng->txt(
'sorting_title_header'),
503 $sort_title->
setInfo($this->lng->txt(
'sorting_info_title'));
504 $sort->addOption($sort_title);
506 $sort_manual =
new ilRadioOption($this->lng->txt(
'sorting_manual_header'),
508 $sort_manual->
setInfo($this->lng->txt(
'sorting_info_manual'));
509 $sort->addOption($sort_manual);
511 $sort->setValue($settings->getSortMode());
512 $form->addItem($sort);
519 include_once
'Modules/Category/classes/class.ilECSCategorySettings.php';
521 $ecs->addSettingsToForm($form,
'cat');
524 $form->addCommandButton(
"update", $this->lng->txt(
"save"));
525 $form->addCommandButton(
"addTranslation", $this->lng->txt(
"add_translation"));
544 $this->ilias->raiseError($this->lng->txt(
"msg_no_perm_write"),$this->ilias->error_obj->MESSAGE);
549 if($form->checkInput())
551 include_once(
'Services/Container/classes/class.ilContainerSortingSettings.php');
553 $settings->
setSortMode($form->getInput(
"sorting"));
557 if ($this->ilias->getSetting(
"custom_icons"))
559 if($form->getItemByPostVar(
"cont_big_icon")->getDeletionFlag())
561 $this->
object->removeBigIcon();
563 if($form->getItemByPostVar(
"cont_small_icon")->getDeletionFlag())
565 $this->
object->removeSmallIcon();
567 if($form->getItemByPostVar(
"cont_tiny_icon")->getDeletionFlag())
569 $this->
object->removeTinyIcon();
572 $this->
object->saveIcons($_FILES[
"cont_big_icon"][
'tmp_name'],
573 $_FILES[
"cont_small_icon"][
'tmp_name'],
574 $_FILES[
"cont_tiny_icon"][
'tmp_name']);
579 require_once(
'Services/Tracking/classes/class.ilChangeEvent.php');
585 include_once
'Modules/Category/classes/class.ilECSCategorySettings.php';
587 if($ecs->handleSettingsUpdate())
595 $form->setValuesByPost();
596 $this->tpl->setContent($form->getHTML());
607 $this->lng->loadLanguageModule($this->object->getType());
610 include_once(
"./Services/Object/classes/class.ilObjectTranslationTableGUI.php");
613 if ($a_get_post_values)
616 foreach(
$_POST[
"title"] as $k => $v)
618 $vals[] = array(
"title" => $v,
619 "desc" =>
$_POST[
"desc"][$k],
620 "lang" =>
$_POST[
"lang"][$k],
621 "default" => (
$_POST[
"default"] == $k));
623 $table->setData($vals);
627 $data = $this->
object->getTranslations();
628 foreach(
$data[
"Fobject"] as $k => $v)
630 $data[
"Fobject"][$k][
"default"] = ($k ==
$data[
"default_language"]);
634 $data[
"Fobject"][++$k][
"title"] =
"";
636 $table->setData(
$data[
"Fobject"]);
638 $tpl->setContent($table->getHTML());
648 $this->ilias->raiseError($this->lng->txt(
"permission_denied"),$this->ilias->error_obj->MESSAGE);
652 if (!isset(
$_POST[
"default"]))
659 if (array_key_exists(
"",
$_POST[
"lang"]))
666 if (count(array_unique(
$_POST[
"lang"])) < count(
$_POST[
"lang"]))
673 $this->
object->removeTranslations();
674 foreach(
$_POST[
"title"] as $k => $v)
677 $is_default = (
$_POST[
"default"] == $k);
682 $this->
object->update();
685 $this->
object->addTranslation(
693 $this->ctrl->redirect($this,
"editTranslations");
703 $k = max(array_keys(
$_POST[
"title"]));
719 foreach(
$_POST[
"title"] as $k => $v)
724 if($k !=
$_POST[
"default"])
726 unset(
$_POST[
"title"][$k]);
727 unset(
$_POST[
"desc"][$k]);
728 unset(
$_POST[
"lang"][$k]);
753 global
$lng, $rbacreview;
755 $a_tpl->addBlockfile(
"ADM_CONTENT",
"adm_content",
"tpl.cat_import_form.html",
758 $a_tpl->setVariable(
"FORMACTION", $this->ctrl->getFormAction($this));
760 $a_tpl->setVariable(
"TXT_IMPORT_CATEGORIES", $lng->txt(
"import_categories"));
761 $a_tpl->setVariable(
"TXT_HIERARCHY_OPTION", $lng->txt(
"import_cat_localrol"));
762 $a_tpl->setVariable(
"TXT_IMPORT_FILE", $lng->txt(
"import_file"));
763 $a_tpl->setVariable(
"TXT_IMPORT_TABLE", $lng->txt(
"import_cat_table"));
765 $a_tpl->setVariable(
"BTN_IMPORT", $lng->txt(
"import"));
766 $a_tpl->setVariable(
"BTN_CANCEL", $lng->txt(
"cancel"));
769 $parent_role_ids = $rbacreview->getParentRoleIds($a_ref_id,
true);
772 ksort($parent_role_ids);
774 foreach ($parent_role_ids as $key => $par)
776 if ($par[
"obj_id"] != SYSTEM_ROLE_ID)
780 $output[
"adopt"][$key][
"check_adopt"] = $check;
781 $output[
"adopt"][$key][
"role_id"] = $par[
"obj_id"];
782 $output[
"adopt"][$key][
"type"] = ($par[
"type"] ==
'role' ?
'Role' :
'Template');
783 $output[
"adopt"][$key][
"role_name"] = $par[
"title"];
790 foreach ($output[
"adopt"] as $key => $value)
792 $a_tpl->setCurrentBlock(
"ADOPT_PERM_ROW");
793 $a_tpl->setVariable(
"CSS_ROW_ADOPT",$value[
"css_row_adopt"]);
794 $a_tpl->setVariable(
"CHECK_ADOPT",$value[
"check_adopt"]);
795 $a_tpl->setVariable(
"LABEL_ID",$value[
"role_id"]);
796 $a_tpl->setVariable(
"TYPE",$value[
"type"]);
797 $a_tpl->setVariable(
"ROLE_NAME",$value[
"role_name"]);
798 $a_tpl->parseCurrentBlock();
810 $this->ctrl->redirect($this);
850 require_once(
"./Modules/Category/classes/class.ilCategoryImportParser.php");
855 if (!@is_dir($import_dir))
862 $file_name = $_FILES[
"importFile"][
"name"];
865 if (!strcmp($file_name,
"")) {
867 $this->ctrl->redirect($this);
870 $parts = pathinfo($file_name);
871 $full_path = $import_dir.
"/".$file_name;
878 $subdir = basename($parts[
"basename"],
".".$parts[
"extension"]);
879 $xml_file = $import_dir.
"/".$subdir.
"/".$subdir.
".xml";
883 $importParser->startParsing();
886 $this->ctrl->redirect($this);
895 include_once(
"./Services/User/classes/class.ilUserTableGUI.php");
897 $utab->resetOffset();
898 $utab->resetFilter();
912 include_once(
"./Services/User/classes/class.ilUserTableGUI.php");
914 $utab->resetOffset();
915 $utab->writeFilterToSession();
922 global
$ilUser,$rbacreview, $ilToolbar;
924 include_once
'./Services/User/classes/class.ilLocalUser.php';
925 include_once
'./Services/User/classes/class.ilObjUserGUI.php';
927 global $rbacsystem,$rbacreview;
929 if(!$rbacsystem->checkAccess(
"cat_administrate_users",$this->object->getRefId()))
931 $this->ilias->raiseError($this->lng->txt(
"msg_no_perm_admin_users"),$this->ilias->error_obj->MESSAGE);
933 $this->tabs_gui->setTabActive(
'administrate_users');
937 $this->tpl->addBlockfile(
'ADM_CONTENT',
'adm_content',
'tpl.cat_admin_users.html',
940 if(count($rbacreview->getGlobalAssignableRoles()) or in_array(SYSTEM_ROLE_ID,$rbacreview->assignedRoles($ilUser->getId())))
942 $ilToolbar->addButton(
943 $this->lng->txt(
'add_user'),
944 $this->ctrl->getLinkTargetByClass(
'ilobjusergui',
'create')
947 $ilToolbar->addButton(
948 $this->lng->txt(
'import_users'),
949 $this->ctrl->getLinkTargetByClass(
'ilobjuserfoldergui',
'importUserForm')
959 $this->tpl->setCurrentBlock(
"confirm_delete");
960 $this->tpl->setVariable(
"CONFIRM_FORMACTION",$this->ctrl->getFormAction($this));
961 $this->tpl->setVariable(
"TXT_CANCEL",$this->lng->txt(
'cancel'));
962 $this->tpl->setVariable(
"CONFIRM_CMD",
'performDeleteUsers');
963 $this->tpl->setVariable(
"TXT_CONFIRM",$this->lng->txt(
'delete'));
964 $this->tpl->parseCurrentBlock();
967 $this->lng->loadLanguageModule(
'user');
969 include_once(
"./Services/User/classes/class.ilUserTableGUI.php");
971 $this->tpl->setVariable(
'USERS_TABLE',$utab->getHTML());
981 include_once
'./Services/User/classes/class.ilUserAutoComplete.php';
983 $auto->setSearchFields(array(
'login',
'firstname',
'lastname',
'email'));
984 $auto->enableFieldSearchableCheck(
true);
992 include_once
'./Services/User/classes/class.ilLocalUser.php';
995 foreach(
$_POST[
'user_ids'] as $user_id)
999 die(
'user id not valid');
1024 include_once
'./Services/Utilities/classes/class.ilConfirmationGUI.php';
1026 $confirm->setFormAction($this->ctrl->getFormAction($this));
1027 $confirm->setHeaderText($this->lng->txt(
'sure_delete_selected_users'));
1028 $confirm->setConfirm($this->lng->txt(
'delete'),
'performDeleteUsers');
1029 $confirm->setCancel($this->lng->txt(
'cancel'),
'listUsers');
1031 foreach(
$_POST[
'id'] as $user)
1038 $name[
'lastname'].
', '.$name[
'firstname'].
' ['.$name[
'login'].
']'
1041 $this->tpl->setContent($confirm->getHTML());
1046 global $rbacreview,$ilTabs;
1050 include_once
'./Services/User/classes/class.ilLocalUser.php';
1052 if(!isset(
$_GET[
'obj_id']))
1060 $ilTabs->clearTargets();
1061 $ilTabs->setBackTarget($this->lng->txt(
'backto_lua'), $this->ctrl->getLinkTarget($this,
'listUsers'));
1067 #ilUtil::sendInfo($this->lng->txt('no_roles_user_can_be_assigned_to'));
1068 #$this->listUsersObject();
1073 $this->tpl->addBlockfile(
'ADM_CONTENT',
'adm_content',
'tpl.cat_role_assignment.html',
1074 "Modules/Category");
1076 $ass_roles = $rbacreview->assignedRoles(
$_GET[
'obj_id']);
1079 foreach($roles as $role)
1088 $f_result[$counter][] = $role_obj->getTitle() ? $role_obj->getTitle() :
"";
1089 $f_result[$counter][] = $role_obj->getDescription() ? $role_obj->getDescription() :
"";
1090 $f_result[$counter][] = $role[
'role_type'] ==
'global' ?
1091 $this->lng->txt(
'global') :
1092 $this->lng->txt(
'local');
1102 global $rbacreview,$rbacadmin;
1105 include_once
'./Services/User/classes/class.ilLocalUser.php';
1125 $new_role_ids =
$_POST[
'role_ids'] ?
$_POST[
'role_ids'] : array();
1126 $assigned_roles = $rbacreview->assignedRoles((
int)
$_REQUEST[
'obj_id']);
1127 foreach($roles as $role)
1129 if(in_array($role[
'obj_id'],$new_role_ids) and !in_array($role[
'obj_id'],$assigned_roles))
1131 $rbacadmin->assignUser($role[
'obj_id'],(
int) $_REQUEST[
'obj_id']);
1133 if(in_array($role[
'obj_id'],$assigned_roles) and !in_array($role[
'obj_id'],$new_role_ids))
1135 $rbacadmin->deassignUser($role[
'obj_id'],(
int) $_REQUEST[
'obj_id']);
1152 if(in_array(SYSTEM_ROLE_ID,$rbacreview->assignedRoles($ilUser->getId())))
1154 $global_roles = $rbacreview->getGlobalRolesArray();
1156 elseif($tmp_obj->getTimeLimitOwner() == $this->
object->getRefId())
1158 $global_roles = $rbacreview->getGlobalAssignableRoles();
1162 $global_roles = array();
1164 return $roles = array_merge($global_roles,
1165 $rbacreview->getAssignableChildRoles($this->object->getRefId()));
1176 if($tmp_obj->getTimeLimitOwner() != $this->
object->getRefId() and
1177 !in_array(SYSTEM_ROLE_ID,$rbacreview->assignedRoles($ilUser->getId())))
1183 $new_assigned = $new_assigned ? $new_assigned : array();
1184 $assigned = $rbacreview->assignedRoles((
int)
$_GET[
'obj_id']);
1187 if(!in_array(SYSTEM_ROLE_ID,$rbacreview->assignedRoles($ilUser->getId())))
1189 $ga = $rbacreview->getGlobalAssignableRoles();
1193 $ga = $rbacreview->getGlobalRolesArray();
1195 $global_assignable = array();
1196 foreach($ga as $role)
1198 $global_assignable[] = $role[
'obj_id'];
1201 $new_visible_assigned_roles = array_intersect($new_assigned,$global_assignable);
1202 $all_assigned_roles = array_intersect($assigned,$rbacreview->getGlobalRoles());
1203 $main_assigned_roles = array_diff($all_assigned_roles,$global_assignable);
1205 if(!count($new_visible_assigned_roles) and !count($main_assigned_roles))
1218 $tpl =& $tbl->getTemplateObject();
1221 $tpl->setCurrentBlock(
"tbl_form_header");
1223 $this->ctrl->setParameter($this,
'obj_id',
$_GET[
'obj_id']);
1224 $tpl->setVariable(
"FORMACTION",$this->ctrl->getFormAction($this));
1225 $tpl->parseCurrentBlock();
1228 $tpl->setVariable(
"COLUMN_COUNTS",4);
1231 $tpl->setCurrentBlock(
"tbl_action_button");
1232 $tpl->setVariable(
"BTN_NAME",
"assignSave");
1233 $tpl->setVariable(
"BTN_VALUE",$this->lng->txt(
"change_assignment"));
1234 $tpl->parseCurrentBlock();
1236 $tpl->setCurrentBlock(
"tbl_action_row");
1237 $tpl->setVariable(
"TPLPATH",$this->tpl->tplPath);
1238 $tpl->parseCurrentBlock();
1241 $title = $this->lng->txt(
'role_assignment').
' ('.$tmp_obj->getFullname().
')';
1243 $tbl->setTitle(
$title,
"icon_role.png",$this->lng->txt(
"role_assignment"));
1244 $tbl->setHeaderNames(array(
'',
1245 $this->lng->txt(
"title"),
1246 $this->lng->txt(
'description'),
1247 $this->lng->txt(
"type")));
1248 $tbl->setHeaderVars(array(
"",
1252 array(
"ref_id" => $this->object->getRefId(),
1253 "cmd" =>
"assignRoles",
1254 "obj_id" =>
$_GET[
'obj_id'],
1255 "cmdClass" =>
"ilobjcategorygui",
1256 "cmdNode" =>
$_GET[
"cmdNode"]));
1257 $tbl->setColumnWidth(array(
"4%",
"35%",
"45%",
"16%"));
1259 $this->set_unlimited =
true;
1263 $this->tpl->setVariable(
"ROLES_TABLE",$tbl->tpl->get());
1273 $tpl =& $tbl->getTemplateObject();
1276 $tpl->setCurrentBlock(
"tbl_form_header");
1278 $this->ctrl->setParameter($this,
'sort_by',
$_GET[
'sort_by']);
1279 $this->ctrl->setParameter($this,
'sort_order',
$_GET[
'sort_order']);
1280 $this->ctrl->setParameter($this,
'offset',
$_GET[
'offset']);
1281 $tpl->setVariable(
"FORMACTION",$this->ctrl->getFormAction($this));
1282 $tpl->parseCurrentBlock();
1288 $tpl->setVariable(
"COLUMN_COUNTS",6);
1291 $tpl->setCurrentBlock(
"tbl_action_button");
1292 $tpl->setVariable(
"BTN_NAME",
"deleteUser");
1293 $tpl->setVariable(
"BTN_VALUE",$this->lng->txt(
"delete"));
1294 $tpl->parseCurrentBlock();
1296 $tpl->setCurrentBlock(
"tbl_action_row");
1297 $tpl->setVariable(
"TPLPATH",$this->tpl->tplPath);
1298 $tpl->parseCurrentBlock();
1300 $tbl->setFormName(
'cmd');
1301 $tbl->enable(
'select_all');
1304 $tbl->setTitle($this->lng->txt(
"users"),
"icon_usr.png",$this->lng->txt(
"users"));
1305 $tbl->setHeaderNames(array(
'',
1306 $this->lng->txt(
"username"),
1307 $this->lng->txt(
"firstname"),
1308 $this->lng->txt(
"lastname"),
1309 $this->lng->txt(
'context'),
1310 $this->lng->txt(
'role_assignment')));
1311 $tbl->setHeaderVars(array(
"",
1317 array(
"ref_id" => $this->object->getRefId(),
1318 "cmd" =>
"listUsers",
1319 "cmdClass" =>
"ilobjcategorygui",
1320 "cmdNode" =>
$_GET[
"cmdNode"]));
1321 $tbl->setColumnWidth(array(
"1px",
"20%",
"20%",
"20%",
"20%",
"20%"));
1322 $tbl->setSelectAllCheckbox(
'user_ids');
1327 $this->tpl->setVariable(
"USERS_TABLE",$tbl->tpl->get());
1338 case "listUsersObject":
1339 $tbl->setOrderColumn(
$_GET[
"sort_by"]);
1340 $tbl->setOrderDirection(
$_GET[
"sort_order"]);
1341 $tbl->setOffset(
$_GET[
"offset"]);
1342 $tbl->setMaxCount($this->all_users_count);
1343 $tbl->setLimit($ilUser->getPref(
'hits_per_page'));
1344 $tbl->setFooter(
"tblfooter",$this->lng->txt(
"previous"),$this->lng->txt(
"next"));
1345 $tbl->setData($result_set);
1346 $tbl->disable(
'auto_sort');
1351 case "assignRolesObject":
1352 $offset =
$_GET[
"offset"];
1354 if (
$_GET[
"sort_by"] ==
"title" or empty(
$_GET[
"sort_by"]))
1356 $_GET[
"sort_by"] =
"login";
1358 $order =
$_GET[
"sort_by"];
1359 $direction =
$_GET[
"sort_order"];
1362 case "clipboardObject":
1363 $offset =
$_GET[
"offset"];
1364 $order =
$_GET[
"sort_by"];
1365 $direction =
$_GET[
"sort_order"];
1366 $tbl->disable(
"footer");
1370 $offset =
$_GET[
"offset"];
1371 $order =
$_GET[
"sort_by"];
1372 $direction =
$_GET[
"sort_order"];
1376 $tbl->setOrderColumn($order);
1377 $tbl->setOrderDirection($direction);
1378 $tbl->setOffset($offset);
1379 if($this->set_unlimited)
1381 $tbl->setLimit(
$_GET[
"limit"]*100);
1385 $tbl->setLimit(
$_GET[
'limit']);
1387 $tbl->setMaxCount(count($result_set));
1391 $tbl->setFooter(
"tblfooter",$this->lng->txt(
"previous"),$this->lng->txt(
"next"));
1395 $tbl->disable(
'footer');
1397 $tbl->setData($result_set);
1402 include_once
"./Services/Table/classes/class.ilTableGUI.php";
1409 $action[0] = $this->lng->txt(
'all_users');
1410 $action[$this->
object->getRefId()] = $this->lng->txt(
'users').
1413 foreach($a_parent_ids as $parent)
1415 if($parent == $this->object->getRefId())
1439 if ($ilAccess->checkAccess(
"read",
"", $a_target))
1443 else if ($ilAccess->checkAccess(
"read",
"", ROOT_FOLDER_ID))
1450 $ilErr->raiseError($lng->txt(
"msg_no_perm_read"), $ilErr->FATAL);