19 declare(strict_types=1);
    39         $ilCtrl = $DIC[
'ilCtrl'];
    46         $this->main_tpl->setOnScreenMessage(
'info', 
$lng->
txt(
'usr_settings_explanation_profile'));
    53         $this->
addColumn($this->
lng->txt(
"export") . 
" / " . $this->
lng->txt(
"search"), 
"");
    58         $this->
setRowTemplate(
"tpl.std_fields_settings_row.html", 
"Services/User");
    63         $up->skipField(
"username");
    64         $fds = $up->getStandardFields();
    65         foreach ($fds as $k => 
$f) {
    81     protected function fillRow(array $a_set): void
    88         $req_checked = $this->user_request->getChecked();
    90         $field = $a_set[
"key"];
    93             $up_prop = strtoupper($prop);
    95             if (($prop != 
"searchable" && ($a_set[$prop . 
"_hide"] ?? 
false) != 
true) ||
    97                 $this->tpl->setCurrentBlock($prop);
    98                 $this->tpl->setVariable(
   102                 $this->tpl->setVariable(
"PROFILE_OPTION_" . $up_prop, $prop . 
"_" . $field);
   106                 if ($prop === 
"visible" && $user_settings_config->
isVisible($field)) {
   109                 if ($prop === 
"changeable" && $user_settings_config->
isChangeable($field)) {
   115                 if ($prop === 
"required" && 
$ilSetting->get(
"require_" . $field) == 
"1") {
   118                 if ($prop === 
"export" && 
$ilSetting->get(
"usr_settings_export_" . $field) == 
"1") {
   121                 if ($prop === 
"course_export" && 
$ilSetting->get(
"usr_settings_course_export_" . $field) == 
"1") {
   124                 if ($prop === 
"group_export" && 
$ilSetting->get(
"usr_settings_group_export_" . $field) == 
"1") {
   127                 if ($prop === 
"visib_reg" && (
int) 
$ilSetting->get(
'usr_settings_visib_reg_' . $field, 
'1')) {
   130                 if ($prop === 
"visib_lua" && (
int) 
$ilSetting->get(
'usr_settings_visib_lua_' . $field, 
'1')) {
   133                 if ($prop === 
"changeable_lua" && (
int) 
$ilSetting->get(
'usr_settings_changeable_lua_' . $field, 
'1')) {
   136                 if ($prop === 
"prg_export" && 
$ilSetting->get(
"usr_settings_prg_export_" . $field) === 
"1") {
   140                 if ($this->confirm_change == 1) {       
   141                     $checked = $req_checked[$prop . 
"_" . $field] ?? 
false;
   143                 if (isset($a_set[$prop . 
"_fix_value"])) {      
   144                     $checked = $a_set[$prop . 
"_fix_value"];
   148                     $this->tpl->setVariable(
"CHECKED_" . $up_prop, 
" checked=\"checked\"");
   149                     if (!isset($a_set[
"{$prop}_fix_value"])) {
   150                         $this->tpl->setVariable(
"CURRENT_OPTION_VISIBLE", 
"1");
   153                     $this->tpl->setVariable(
"CURRENT_OPTION_VISIBLE", 
"0");
   156                 if (isset($a_set[$prop . 
"_fix_value"])) {
   157                     $this->tpl->setVariable(
"DISABLE_" . $up_prop, 
" disabled=\"disabled\"");
   159                 $this->tpl->parseCurrentBlock();
   164         if (($a_set[
"default"] ?? 
"") != 
"") {
   165             switch ($a_set[
"input"]) {
   169                     if ($selected_option == 
"") {
   170                         $selected_option = $a_set[
"default"];
   172                     foreach ($a_set[
"options"] as $k => $v) {
   173                         $this->tpl->setCurrentBlock(
"def_sel_option");
   174                         $this->tpl->setVariable(
"OPTION_VALUE", $k);
   175                         $text = ($a_set[
"input"] == 
"selection")
   178                         if ($a_set[
"input"] == 
"hitsperpage" && $k == 9999) {
   181                         if ($selected_option == $k) {
   182                             $this->tpl->setVariable(
   184                                 ' selected="selected" '   187                         $this->tpl->setVariable(
"OPTION_TEXT", $text);
   188                         $this->tpl->parseCurrentBlock();
   190                     $this->tpl->setCurrentBlock(
"def_selection");
   191                     $this->tpl->setVariable(
"PROFILE_OPTION_DEFAULT_VALUE", 
"default_" . $field);
   192                     $this->tpl->parseCurrentBlock();
   195             $this->tpl->setCurrentBlock(
"default");
   196             $this->tpl->parseCurrentBlock();
   200         $this->tpl->setVariable(
"TXT_GROUP", 
$lng->
txt($a_set[
"group"]));
   203         $lv = (($a_set[
"lang_var"] ?? 
"") == 
"")
   205             : $a_set[
"lang_var"];
   206         if ($a_set[
"key"] == 
"country") {
   207             $lv = 
"country_free_text";
   209         if ($a_set[
"key"] == 
"sel_country") {
   210             $lv = 
"country_selection";
   213         $this->tpl->setVariable(
"TXT_FIELD", 
$lng->
txt($lv));
   218         $this->confirm_change = 
true;
 
__construct(object $a_parent_obj, string $a_parent_cmd)
 
UserGUIRequest $user_request
 
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? 
 
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="")
 
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)