19declare(strict_types=1);
47 $this->settings_chat = new \ilSetting(
'chatroom');
48 $this->settings_awareness = new \ilSetting(
'awrn');
50 $this->
lng->loadLanguageModule(
'chatroom');
58 ? $this->
lng->txt(
'user_visibility_settings')
59 : $this->
lng->txt(
'preview');
62 self::STEP_PROFILE_DATA => $this->
lng->txt(
'user_profile_data'),
63 self::STEP_PUBLISH_OPTIONS => $this->
lng->txt(
'user_publish_options'),
64 self::STEP_VISIBILITY_OPTIONS => $txt_visibility
71 return $this->settings_awareness->get(
'awrn_enabled',
'0') !==
'0'
81 if ($this->
user->getProfileIncomplete()) {
84 if ($this->
user->getPref(
'profile_personal_data_saved')) {
90 if ($this->
user->getPref(
'profile_publish_opt_saved')) {
96 if ($this->
user->getPref(
'profile_visibility_opt_saved')
97 || !$this->anyVisibilitySettings()
98 && $this->user->getPref(
'profile_publish_opt_saved')) {
112 if ($status === self::STATUS_SUCCESSFUL) {
113 return $this->
lng->txt(
'user_profile_data_checked');
115 return $this->
lng->txt(
'user_check_profile_data');
118 if ($status === self::STATUS_SUCCESSFUL) {
119 return $this->profile_mode->getModeInfo();
121 return $this->
lng->txt(
'user_set_publishing_options');
124 if ($status === self::STATUS_SUCCESSFUL) {
128 return $this->
lng->txt(
'user_set_visibilty_options');
141 $user->
setPref(
'profile_personal_data_saved',
'1');
144 $user->
setPref(
'profile_publish_opt_saved',
'1');
147 $user->
setPref(
'profile_visibility_opt_saved',
'1');
157 if ($this->settings_awareness->get(
'awrn_enabled',
'0') !==
'0') {
158 $show = $this->
user->getPref(
'hide_own_online_status') ===
'n'
159 || $this->
user->getPref(
'hide_own_online_status') ??
'' ===
''
160 && $this->
settings->get(
'hide_own_online_status') ===
'n';
162 ? $this->
lng->txt(
'hide_own_online_status')
163 : $this->
lng->txt(
'show_own_online_status');
166 $status[] = $this->
user->getPref(
'bs_allow_to_contact_me') !==
'y'
167 ? $this->
lng->txt(
'buddy_allow_to_contact_me_no')
168 : $this->
lng->txt(
'buddy_allow_to_contact_me_yes');
170 if ($this->areOnScreenChatOptionsVisible()) {
171 $status[] = $this->
user->getPref(
'chat_osc_accept_msg') ===
'y'
172 ? $this->
lng->txt(
'chat_use_osc')
173 : $this->
lng->txt(
'chat_not_use_osc');
175 if ($this->areChatTypingBroadcastOptionsVisible()) {
176 $status[] = $this->
user->getPref(
'chat_broadcast_typing') ===
'y'
177 ? $this->
lng->txt(
'chat_use_typing_broadcast')
178 : $this->
lng->txt(
'chat_no_use_typing_broadcast');
180 return implode(
',<br>', $status);
185 return $this->settings_chat->get(
'chat_enabled',
'0') !==
'0'
186 && $this->settings_chat->get(
'enable_osc',
'0') !==
'0'
187 && $this->
settings->get(
'usr_settings_hide_chat_osc_accept_msg',
'0') ===
'0';
192 return $this->settings_chat->get(
'chat_enabled',
'0')
193 && $this->
settings->get(
'usr_settings_hide_chat_broadcast_typing',
'0') ===
'0';
ilSetting $settings_awareness
__construct(private readonly Language $lng, private readonly \ilSetting $settings, private \ilObjUser $user, private readonly Visibility $profile_mode)
const STEP_VISIBILITY_OPTIONS
setStepSucessOnUser(int $step, \ilObjUser $user)
buildStatusArrayForVisibilityOnSuccess()
areOnScreenChatOptionsVisible()
const STEP_PUBLISH_OPTIONS
getStatusDetails(int $step)
areChatTypingBroadcastOptionsVisible()
Personal profile publishing mode of a user.
setPref(string $a_keyword, ?string $a_value)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...