39 $chatSettings =
new ilSetting(
'chatroom');
40 $this->chat_enabled = (bool) $chatSettings->get(
'chat_enabled');
41 $this->osc_enabled = (bool) $chatSettings->get(
'enable_osc');
43 $this->
lng->loadLanguageModule(
'chatroom');
57 "invite" => $this->
lng->txt(
'chat_user_action_invite_public_room'),
58 "invite_osd" => $this->
lng->txt(
'chat_user_action_invite_osd')
64 if (!array_key_exists($a_user_id, self::$user_access)) {
65 self::$user_access[$a_user_id] =
$GLOBALS[
'DIC']->rbac()->system()->checkAccessOfUser($a_user_id,
'read', $this->pub_ref_id);
68 return self::$user_access[$a_user_id];
73 if (!array_key_exists($a_user_id, self::$accepts_messages_cache)) {
79 return (
bool) self::$accepts_messages_cache[$a_user_id];
89 if (!$this->chat_enabled) {
96 $f->setType(
"invite");
97 $f->setText($this->
lng->txt(
'chat_invite_public_room'));
98 $f->setHref(
'./ilias.php?baseClass=ilRepositoryGUI&ref_id=' . $this->pub_ref_id .
'&usr_id=' . $a_target_user .
'&cmd=view-invitePD');
103 if ($this->osc_enabled && $a_target_user != $this->
getUserId()) {
106 $f->setType(
"invite_osd");
108 $f->setText($this->
lng->txt(
'chat_osc_start_conversation'));
110 'onscreenchat-userid' => $a_target_user,
114 $f->setText($this->
lng->txt(
'chat_osc_doesnt_accept_msg'));
116 'onscreenchat-inact-userid' => $a_target_user
119 $coll->addAction(
$f);
static array $user_access
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
collectActionsForTargetUser(int $a_target_user)
Collect all actions.
static _lookupPref(int $a_usr_id, string $a_keyword)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
if(!defined('PATH_SEPARATOR')) $GLOBALS['_PEAR_default_error_mode']
static array $accepts_messages_cache
acceptsMessages(int $a_user_id)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
__construct(Container $dic, ilPlugin $plugin)
static yn2tf(string $a_yn)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
checkUserChatAccess(int $a_user_id)
static _lookupLogin(int $a_user_id)