4 include_once(
"./Services/Table/classes/class.ilTable2GUI.php");
27 $ilAccess = $DIC[
'ilAccess'];
30 parent::__construct($a_parent_obj, $a_parent_cmd);
31 $this->
setTitle(
$lng->txt(
"usr_settings_header_profile"));
37 $this->
addColumn($this->lng->txt(
"user_field"),
"");
38 $this->
addColumn($this->lng->txt(
"access"),
"");
39 $this->
addColumn($this->lng->txt(
"export") .
" / " . $this->lng->txt(
"search"),
"");
40 $this->
addColumn($this->lng->txt(
"default"),
"");
44 $this->
setRowTemplate(
"tpl.std_fields_settings_row.html",
"Services/User");
48 include_once(
"./Services/User/classes/class.ilUserProfile.php");
50 $up->skipField(
"username");
51 $fds = $up->getStandardFields();
53 foreach ($fds as $k =>
$f) {
70 $field = $a_set[
"key"];
73 "visible" =>
"user_visible_in_profile",
74 "changeable" =>
"changeable",
75 "searchable" =>
"header_searchable",
76 "required" =>
"required_field",
78 "course_export" =>
"course_export",
79 'group_export' =>
'group_export',
80 "visib_reg" =>
"header_visible_registration",
81 'visib_lua' =>
'usr_settings_visib_lua',
82 'changeable_lua' =>
'usr_settings_changeable_lua' 85 foreach ($props as $prop => $lv) {
86 $up_prop = strtoupper($prop);
88 if (($prop !=
"searchable" && $a_set[$prop .
"_hide"] !=
true) ||
90 $this->tpl->setCurrentBlock($prop);
91 $this->tpl->setVariable(
95 $this->tpl->setVariable(
"PROFILE_OPTION_" . $up_prop, $prop .
"_" . $field);
99 if ($prop ==
"visible" &&
$ilSetting->get(
"usr_settings_hide_" . $field) !=
"1") {
102 if ($prop ==
"changeable" &&
$ilSetting->get(
"usr_settings_disable_" . $field) !=
"1") {
108 if ($prop ==
"required" &&
$ilSetting->get(
"require_" . $field) ==
"1") {
111 if ($prop ==
"export" &&
$ilSetting->get(
"usr_settings_export_" . $field) ==
"1") {
114 if ($prop ==
"course_export" &&
$ilSetting->get(
"usr_settings_course_export_" . $field) ==
"1") {
117 if ($prop ==
"group_export" &&
$ilSetting->get(
"usr_settings_group_export_" . $field) ==
"1") {
120 if ($prop ==
"visib_reg" && (
int)
$ilSetting->get(
'usr_settings_visib_reg_' . $field,
'1')) {
123 if ($prop ==
"visib_lua" && (
int)
$ilSetting->get(
'usr_settings_visib_lua_' . $field,
'1')) {
127 if ($prop ==
"changeable_lua" && (
int)
$ilSetting->get(
'usr_settings_changeable_lua_' . $field,
'1')) {
132 if ($this->confirm_change == 1) {
133 $checked =
$_POST[
"chb"][$prop .
"_" . $field];
135 if (isset($a_set[$prop .
"_fix_value"])) {
136 $checked = $a_set[$prop .
"_fix_value"];
140 $this->tpl->setVariable(
"CHECKED_" . $up_prop,
" checked=\"checked\"");
142 if (isset($a_set[$prop .
"_fix_value"])) {
143 $this->tpl->setVariable(
"DISABLE_" . $up_prop,
" disabled=\"disabled\"");
145 $this->tpl->parseCurrentBlock();
150 if ($a_set[
"default"] !=
"") {
151 switch ($a_set[
"input"]) {
155 if ($selected_option ==
"") {
156 $selected_option = $a_set[
"default"];
158 foreach ($a_set[
"options"] as $k => $v) {
159 $this->tpl->setCurrentBlock(
"def_sel_option");
160 $this->tpl->setVariable(
"OPTION_VALUE", $k);
161 $text = ($a_set[
"input"] ==
"selection")
164 if ($a_set[
"input"] ==
"hitsperpage" && $k == 9999) {
167 if ($selected_option == $k) {
168 $this->tpl->setVariable(
170 ' selected="selected" ' 173 $this->tpl->setVariable(
"OPTION_TEXT",
$text);
174 $this->tpl->parseCurrentBlock();
176 $this->tpl->setCurrentBlock(
"def_selection");
177 $this->tpl->setVariable(
"PROFILE_OPTION_DEFAULT_VALUE",
"default_" . $field);
178 $this->tpl->parseCurrentBlock();
181 $this->tpl->setCurrentBlock(
"default");
182 $this->tpl->parseCurrentBlock();
186 $this->tpl->setVariable(
"TXT_GROUP",
$lng->txt($a_set[
"group"]));
189 $lv = ($a_set[
"lang_var"] ==
"")
191 : $a_set[
"lang_var"];
192 if ($a_set[
"key"] ==
"country") {
193 $lv =
"country_free_text";
195 if ($a_set[
"key"] ==
"sel_country") {
196 $lv =
"country_selection";
199 $this->tpl->setVariable(
"TXT_FIELD",
$lng->txt($lv));
204 $this->confirm_change =
true;
addCommandButton($a_cmd, $a_text, $a_onclick='', $a_id="", $a_class=null)
Add Command button.
setDescription($a_val)
Set description.
static _isSearchable($a_key)
fillRow($a_set)
Fill table row.
setTitle($a_title, $a_icon=0, $a_icon_alt=0)
Set title and title icon.
__construct($a_parent_obj, $a_parent_cmd)
Constructor.
setRowTemplate($a_template, $a_template_dir="")
Set row template.
setFormAction($a_form_action, $a_multipart=false)
Set Form action parameter.
disable($a_module_name)
diesables particular modules of table
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.
setEnableHeader($a_enableheader)
Set Enable Header.
setEnableTitle($a_enabletitle)
Set Enable Title.
static _isEnabled($a_key)
setLimit($a_limit=0, $a_default_limit=0)