44 parent::__construct();
46 include_once
'Modules/Chatroom/classes/class.ilObjChatroom.php';
49 $chatSettings =
new ilSetting(
'chatroom');
50 $this->chat_enabled = $chatSettings->get(
'chat_enabled');
51 $this->osc_enabled = $chatSettings->get(
'enable_osc');
53 $this->lng->loadLanguageModule(
'chatroom');
70 "invite" => $this->lng->txt(
'chat_user_action_invite_public_room'),
71 "invite_osd" => $this->lng->txt(
'chat_user_action_invite_osd')
84 if (!array_key_exists($a_user_id, self::$user_access)) {
85 self::$user_access[$a_user_id] =
$GLOBALS[
'DIC']->rbac()->system()->checkAccessOfUser($a_user_id,
'read', $this->pub_ref_id);
88 return self::$user_access[$a_user_id];
97 if (!array_key_exists($a_user_id, self::$accepts_messages_cache)) {
101 return self::$accepts_messages_cache[$a_user_id];
114 if (!$this->chat_enabled) {
121 $f->setType(
"invite");
122 $f->setText($this->lng->txt(
'chat_invite_public_room'));
123 $f->setHref(
'./ilias.php?baseClass=ilRepositoryGUI&ref_id=' . $this->pub_ref_id .
'&usr_id=' . $a_target_user .
'&cmd=view-invitePD');
124 $coll->addAction(
$f);
128 if ($this->osc_enabled && $a_target_user != $this->
getUserId()) {
131 $f->setType(
"invite_osd");
133 $f->setText($this->lng->txt(
'chat_osc_start_conversation'));
135 'onscreenchat-userid' => $a_target_user,
139 $f->setText($this->lng->txt(
'chat_osc_doesnt_accept_msg'));
141 'onscreenchat-inact-userid' => $a_target_user
144 $coll->addAction(
$f);
static _lookupLogin($a_user_id)
lookup login
__construct()
Constructor.
A class that provides a collection of actions on users.
acceptsMessages($a_user_id)
static getInstance()
Get instance.
$chat_enabled
Boolean to indicate if the chat is enabled.
collectActionsForTargetUser($a_target_user)
Collect all actions.
$osc_enabled
Boolean to indicate if on screen chat is enabled.
static _lookupPref($a_usr_id, $a_keyword)
static $accepts_messages_cache
checkUserChatAccess($a_user_id)
Check user chat access.
static yn2tf($a_yn)
convert "y"/"n" to true/false
Action that can be performed on a user.
$GLOBALS['JPEG_Segment_Names']
Global Variable: XMP_tag_captions.