35 $ilCtrl = $DIC[
'ilCtrl'];
42 $this->main_tpl->setOnScreenMessage(
'info',
$lng->
txt(
'usr_settings_explanation_profile'));
49 $this->
addColumn($this->
lng->txt(
"export") .
" / " . $this->
lng->txt(
"search"),
"");
54 $this->
setRowTemplate(
"tpl.std_fields_settings_row.html",
"Services/User");
59 $up->skipField(
"username");
60 $fds = $up->getStandardFields();
61 foreach ($fds as $k =>
$f) {
67 $this->user_request = new \ILIAS\User\StandardGUIRequest(
77 protected function fillRow(array $a_set): void
84 $req_checked = $this->user_request->getChecked();
86 $field = $a_set[
"key"];
89 $up_prop = strtoupper($prop);
91 if (($prop !=
"searchable" && ($a_set[$prop .
"_hide"] ??
false) !=
true) ||
93 $this->tpl->setCurrentBlock($prop);
94 $this->tpl->setVariable(
98 $this->tpl->setVariable(
"PROFILE_OPTION_" . $up_prop, $prop .
"_" . $field);
102 if ($prop ==
"visible" && $user_settings_config->
isVisible($field)) {
105 if ($prop ==
"changeable" && $user_settings_config->
isChangeable($field)) {
111 if ($prop ==
"required" &&
$ilSetting->get(
"require_" . $field) ==
"1") {
114 if ($prop ==
"export" &&
$ilSetting->get(
"usr_settings_export_" . $field) ==
"1") {
117 if ($prop ==
"course_export" &&
$ilSetting->get(
"usr_settings_course_export_" . $field) ==
"1") {
120 if ($prop ==
"group_export" &&
$ilSetting->get(
"usr_settings_group_export_" . $field) ==
"1") {
123 if ($prop ==
"visib_reg" && (
int)
$ilSetting->get(
'usr_settings_visib_reg_' . $field,
'1')) {
126 if ($prop ==
"visib_lua" && (
int)
$ilSetting->get(
'usr_settings_visib_lua_' . $field,
'1')) {
130 if ($prop ==
"changeable_lua" && (
int)
$ilSetting->get(
'usr_settings_changeable_lua_' . $field,
'1')) {
135 if ($this->confirm_change == 1) {
136 $checked = $req_checked[$prop .
"_" . $field] ??
false;
138 if (isset($a_set[$prop .
"_fix_value"])) {
139 $checked = $a_set[$prop .
"_fix_value"];
143 $this->tpl->setVariable(
"CHECKED_" . $up_prop,
" checked=\"checked\"");
144 if (!isset($a_set[
"{$prop}_fix_value"])) {
145 $this->tpl->setVariable(
"CURRENT_OPTION_VISIBLE",
"1");
148 $this->tpl->setVariable(
"CURRENT_OPTION_VISIBLE",
"0");
151 if (isset($a_set[$prop .
"_fix_value"])) {
152 $this->tpl->setVariable(
"DISABLE_" . $up_prop,
" disabled=\"disabled\"");
154 $this->tpl->parseCurrentBlock();
159 if (($a_set[
"default"] ??
"") !=
"") {
160 switch ($a_set[
"input"]) {
164 if ($selected_option ==
"") {
165 $selected_option = $a_set[
"default"];
167 foreach ($a_set[
"options"] as $k => $v) {
168 $this->tpl->setCurrentBlock(
"def_sel_option");
169 $this->tpl->setVariable(
"OPTION_VALUE", $k);
170 $text = ($a_set[
"input"] ==
"selection")
173 if ($a_set[
"input"] ==
"hitsperpage" && $k == 9999) {
176 if ($selected_option == $k) {
177 $this->tpl->setVariable(
179 ' selected="selected" ' 182 $this->tpl->setVariable(
"OPTION_TEXT", $text);
183 $this->tpl->parseCurrentBlock();
185 $this->tpl->setCurrentBlock(
"def_selection");
186 $this->tpl->setVariable(
"PROFILE_OPTION_DEFAULT_VALUE",
"default_" . $field);
187 $this->tpl->parseCurrentBlock();
190 $this->tpl->setCurrentBlock(
"default");
191 $this->tpl->parseCurrentBlock();
195 $this->tpl->setVariable(
"TXT_GROUP",
$lng->
txt($a_set[
"group"]));
198 $lv = (($a_set[
"lang_var"] ??
"") ==
"")
200 : $a_set[
"lang_var"];
201 if ($a_set[
"key"] ==
"country") {
202 $lv =
"country_free_text";
204 if ($a_set[
"key"] ==
"sel_country") {
205 $lv =
"country_selection";
208 $this->tpl->setVariable(
"TXT_FIELD",
$lng->
txt($lv));
213 $this->confirm_change =
true;
__construct(object $a_parent_obj, string $a_parent_cmd)
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
setFormAction(string $a_form_action, bool $a_multipart=false)
isVisible(string $field)
Is setting visible to user?
setEnableTitle(bool $a_enabletitle)
static _isSearchable(string $a_key)
addCommandButton(string $a_cmd, string $a_text, string $a_onclick='', string $a_id="", string $a_class="")
ilUserSettingsConfig $user_settings_config
isChangeable(string $field)
Is setting changeable by user?
ILIAS User StandardGUIRequest $user_request
setRowTemplate(string $a_template, string $a_template_dir="")
Set row template.
const USER_FIELD_TRANSLATION_MAPPING
setTitle(string $a_title, string $a_icon="", string $a_icon_alt="")
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
__construct(Container $dic, ilPlugin $plugin)
setLimit(int $a_limit=0, int $a_default_limit=0)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
addColumn(string $a_text, string $a_sort_field="", string $a_width="", bool $a_is_checkbox_action_column=false, string $a_class="", string $a_tooltip="", bool $a_tooltip_with_html=false)
disable(string $a_module_name)
static _isEnabled($a_key)
setEnableHeader(bool $a_enableheader)