3 require_once
'Services/Form/classes/class.ilPropertyFormGUI.php';
59 parent::__construct();
61 $this->
user = $DIC->user();
62 $this->ctrl = $DIC->ctrl();
64 $this->mainTpl = $DIC[
'tpl'];
65 $this->lng = $DIC[
'lng'];
66 $this->
event = $DIC->event();
68 $this->chatSettings =
new ilSetting(
'chatroom');
69 $this->notificationSettings =
new ilSetting(
'notifications');
81 switch ($this->ctrl->getCmd()) {
82 case 'saveChatOptions':
86 case 'showChatOptions':
99 $this->chatSettings->get(
'chat_enabled',
false) && (
110 return $this->notificationSettings->get(
'enable_osd',
false) && $this->chatSettings->get(
'play_invitation_sound',
false);
119 $this->chatSettings->get(
'enable_osc',
false) &&
120 !(bool) $this->
settings->get(
'usr_settings_hide_chat_osc_accept_msg',
false)
129 $this->lng->loadLanguageModule(
'chatroom');
131 $this->
setFormAction($this->ctrl->getFormAction($this,
'saveChatOptions'));
132 $this->
setTitle($this->lng->txt(
"chat_settings"));
135 $chb =
new ilCheckboxInputGUI($this->lng->txt(
'play_invitation_sound'),
'play_invitation_sound');
136 $chb->
setInfo($this->lng->txt(
'play_invitation_sound_info'));
141 $chb =
new ilCheckboxInputGUI($this->lng->txt(
'chat_osc_accept_msg'),
'chat_osc_accept_msg');
142 $chb->
setInfo($this->lng->txt(
'chat_osc_accept_msg_info'));
143 $chb->setDisabled((
bool) $this->
settings->get(
'usr_settings_disable_chat_osc_accept_msg',
false));
156 $this->ctrl->returnToParent($this);
160 'play_invitation_sound' => $this->
user->getPref(
'chat_play_invitation_sound'),
161 'chat_osc_accept_msg' =>
ilUtil::yn2tf($this->
user->getPref(
'chat_osc_accept_msg'))
164 $this->mainTpl->setContent($this->
getHTML());
165 $this->mainTpl->show();
174 $this->ctrl->returnToParent($this);
183 $this->
user->setPref(
'chat_play_invitation_sound', (
int) $this->
getInput(
'play_invitation_sound'));
190 $this->
user->writePrefs();
194 'chatSettingsChanged',
196 'user' => $this->
user static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
static tf2yn($a_tf)
convert true/false to "y"/"n"
Create styles array
The data for the language used.
static yn2tf($a_yn)
convert "y"/"n" to true/false