37 $this->lng = is_null(
$lng)
41 $this->lng->loadLanguageModule(
'chatroom');
42 $this->
user = is_null($user)
56 $chatSettings =
new ilSetting(
'chatroom');
57 $notificationSettings =
new ilSetting(
'notifications');
60 $chatSettings->get(
'enable_osc',
false) &&
61 !(bool) $notificationSettings->get(
'usr_settings_hide_chat_osc_accept_msg',
false)
76 ?
$lng->txt(
"user_visibility_settings")
77 :
$lng->txt(
"preview");
80 self::STEP_PROFILE_DATA =>
$lng->txt(
"user_profile_data"),
81 self::STEP_PUBLISH_OPTIONS =>
$lng->txt(
"user_publish_options"),
82 self::STEP_VISIBILITY_OPTIONS => $txt_visibility
95 $awrn_set->get(
"awrn_enabled",
false) ||
113 $status = self::STATUS_NOT_STARTED;
117 case self::STEP_PROFILE_DATA:
118 if ($user->getPref(
"profile_personal_data_saved")) {
119 $status = self::STATUS_SUCCESSFUL;
122 if ($user->getProfileIncomplete()) {
123 $status = self::STATUS_IN_PROGRESS;
127 case self::STEP_PUBLISH_OPTIONS:
128 if ($user->getPref(
"profile_publish_opt_saved")) {
129 $status = self::STATUS_SUCCESSFUL;
133 case self::STEP_VISIBILITY_OPTIONS:
134 if ($user->getPref(
"profile_visibility_opt_saved") ||
136 $status = self::STATUS_SUCCESSFUL;
157 case self::STEP_PROFILE_DATA:
158 if ($status == self::STATUS_SUCCESSFUL) {
159 $details =
$lng->txt(
"user_profile_data_checked");
161 $details =
$lng->txt(
"user_check_profile_data");
165 case self::STEP_PUBLISH_OPTIONS:
166 if ($status == self::STATUS_SUCCESSFUL) {
167 $details = $this->profile_mode->getModeInfo();
169 $details =
$lng->txt(
"user_set_publishing_options");
173 case self::STEP_VISIBILITY_OPTIONS:
174 if ($status == self::STATUS_SUCCESSFUL) {
177 if ($awrn_set->get(
"awrn_enabled",
false)) {
178 $show = ($user->getPref(
"hide_own_online_status") ==
"n" ||
179 ($user->getPref(
"hide_own_online_status") ==
"" && $this->
settings->get(
"hide_own_online_status") ==
"n"));
181 ?
$lng->txt(
"hide_own_online_status")
182 :
$lng->txt(
"show_own_online_status");
185 $status[] = ($user->getPref(
"bs_allow_to_contact_me") !=
"y")
186 ?
$lng->txt(
"buddy_allow_to_contact_me_no")
187 :
$lng->txt(
"buddy_allow_to_contact_me_yes");
191 ?
$lng->txt(
"chat_use_osc")
192 :
$lng->txt(
"chat_not_use_osc");
194 $details = implode(
",<br>", $status);
197 $details =
$lng->txt(
"user_set_visibilty_options");
215 case self::STEP_PROFILE_DATA:
216 $user->setPref(
"profile_personal_data_saved",
"1");
218 case self::STEP_PUBLISH_OPTIONS:
219 $user->setPref(
"profile_publish_opt_saved",
"1");
221 case self::STEP_VISIBILITY_OPTIONS:
222 $user->setPref(
"profile_visibility_opt_saved",
"1");
saveStepSucess($step)
Save step success.
Personal profile publishing mode of a iser.
const STEP_PUBLISH_OPTIONS
anyVisibilitySettings()
Any visibility settings?
getStatusDetails(int $step)
Get status details.
const STEP_VISIBILITY_OPTIONS
areOnScreenChatOptionsVisible()
getStatus(int $step)
Get status of step.
static yn2tf($a_yn)
convert "y"/"n" to true/false
__construct($lng=null, $user=null)
Constructor.