4 include_once(
"./Services/Table/classes/class.ilTable2GUI.php");
27 $this->permissions = $a_permissions;
30 parent::__construct($a_parent_obj, $a_parent_cmd);
31 $this->
setTitle($lng->txt(
"user_defined_list"));
35 $this->
addColumn($this->lng->txt(
"user_field"),
"");
36 $this->
addColumn($this->lng->txt(
"access"),
"");
37 $this->
addColumn($this->lng->txt(
"export") .
" / " . $this->lng->txt(
"search") .
38 " / " . $this->lng->txt(
"certificate"),
"");
39 $this->
addColumn($this->lng->txt(
"actions"),
"");
43 $this->
setRowTemplate(
"tpl.std_fields_settings_row.html",
"Services/User");
48 $fds = $user_field_definitions->getDefinitions();
50 foreach ($fds as $k => $f) {
65 $field = $a_set[
"field_id"];
67 $props =
array(
"visible" =>
"user_visible_in_profile",
68 "changeable" =>
"changeable",
69 "searchable" =>
"header_searchable",
70 "required" =>
"required_field",
72 "course_export" =>
"course_export",
73 'group_export' =>
'group_export',
74 "visib_reg" =>
"header_visible_registration",
75 'visib_lua' =>
'usr_settings_visib_lua',
76 'changeable_lua' =>
'usr_settings_changeable_lua',
77 'certificate' =>
'certificate' 80 $perms = $this->permissions->hasPermissions(
110 foreach ($props as $prop => $lv) {
111 $up_prop = strtoupper($prop);
114 ($prop !=
"searchable")) {
115 $this->tpl->setCurrentBlock($prop);
116 $this->tpl->setVariable(
117 "HEADER_" . $up_prop,
120 $this->tpl->setVariable(
"PROFILE_OPTION_" . $up_prop, $prop .
"_" . $field);
127 if ($this->confirm_change == 1) {
128 $checked =
$_POST[
"chb"][$prop .
"_" . $field];
132 $this->tpl->setVariable(
"CHECKED_" . $up_prop,
" checked=\"checked\"");
136 $this->tpl->setVariable(
"DISABLE_" . $up_prop,
" disabled=\"disabled\"");
139 $this->tpl->parseCurrentBlock();
145 $ilCtrl->setParameter($this->parent_obj,
'field_id', $a_set[
"field_id"]);
146 $this->tpl->setCurrentBlock(
"action");
147 $this->tpl->setVariable(
149 $ilCtrl->getLinkTarget($this->parent_obj,
'edit')
151 $this->tpl->setVariable(
"TXT_CMD", $lng->txt(
"edit"));
152 $this->tpl->parseCurrentBlock();
156 $this->tpl->setCurrentBlock(
"cb");
157 $this->tpl->setVariable(
"FIELD_ID", $a_set[
"field_id"]);
158 $this->tpl->parseCurrentBlock();
159 $this->tpl->setVariable(
"TXT_FIELD", $a_set[
"field_name"]);
164 $this->confirm_change =
true;
addCommandButton($a_cmd, $a_text, $a_onclick='', $a_id="", $a_class=null)
Add Command button.
const SUBACTION_FIELD_ACCESS_VISIBLE_GROUPS
const SUBACTION_FIELD_ACCESS_SEARCHABLE
static _getInstance()
Get instance.
const SUBACTION_FIELD_ACCESS_VISIBLE_COURSES
const SUBACTION_FIELD_ACCESS_EXPORT
setTitle($a_title, $a_icon=0, $a_icon_alt=0)
Set title and title icon.
const SUBACTION_FIELD_ACCESS_CERTIFICATE
__construct($a_parent_obj, $a_parent_cmd, ilUDFPermissionHelper $a_permissions)
Constructor.
const SUBACTION_FIELD_ACCESS_CHANGEABLE_PERSONAL
const SUBACTION_FIELD_ACCESS_REQUIRED
const ACTION_FIELD_EDIT_ACCESS
TableGUI class for custom defined user fields.
const SUBACTION_FIELD_ACCESS_VISIBLE_PERSONAL
addMultiCommand($a_cmd, $a_text)
Add Command button.
static getAccessPermissions()
setRowTemplate($a_template, $a_template_dir="")
Set row template.
Create styles array
The data for the language used.
fillRow($a_set)
Fill table row.
setFormAction($a_form_action, $a_multipart=false)
Set Form action parameter.
disable($a_module_name)
diesables particular modules of table
const SUBACTION_FIELD_ACCESS_VISIBLE_LOCAL
addColumn( $a_text, $a_sort_field="", $a_width="", $a_is_checkbox_action_column=false, $a_class="", $a_tooltip="", $a_tooltip_with_html=false)
Add a column to the header.
const SUBACTION_FIELD_ACCESS_VISIBLE_REGISTRATION
setEnableHeader($a_enableheader)
Set Enable Header.
setEnableTitle($a_enabletitle)
Set Enable Title.
const SUBACTION_FIELD_ACCESS_CHANGEABLE_LOCAL
setLimit($a_limit=0, $a_default_limit=0)