5 include_once(
"./Services/User/Actions/classes/class.ilUserActionProvider.php");
47 parent::__construct();
49 include_once
'Modules/Chatroom/classes/class.ilObjChatroom.php';
52 $chatSettings =
new ilSetting(
'chatroom');
53 $this->chat_enabled = $chatSettings->get(
'chat_enabled');
54 $this->osc_enabled = $chatSettings->get(
'enable_osc');
56 $this->lng->loadLanguageModule(
'chatroom');
73 "invite" => $this->lng->txt(
'chat_user_action_invite_public_room'),
74 "invite_osd" => $this->lng->txt(
'chat_user_action_invite_osd')
87 if(!array_key_exists($a_user_id, self::$user_access))
89 self::$user_access[$a_user_id] =
$GLOBALS[
'DIC']->rbac()->system()->checkAccessOfUser($a_user_id,
'read', $this->pub_ref_id);
92 return self::$user_access[$a_user_id];
101 if(!array_key_exists($a_user_id, self::$accepts_messages_cache))
106 return self::$accepts_messages_cache[$a_user_id];
118 include_once(
"./Services/User/Actions/classes/class.ilUserAction.php");
120 require_once
'Services/User/classes/class.ilObjUser.php';
122 if(!$this->chat_enabled)
130 if ($a_target_user != $this->
getUserId())
135 $f->setType(
"invite");
136 $f->setText($this->lng->txt(
'chat_invite_public_room'));
137 $f->setHref(
'./ilias.php?baseClass=ilRepositoryGUI&ref_id=' . $this->pub_ref_id .
'&usr_id=' . $a_target_user .
'&cmd=view-invitePD');
138 $coll->addAction($f);
143 if($this->osc_enabled)
147 $f->setType(
"invite_osd");
150 $f->setText($this->lng->txt(
'chat_osc_start_conversation'));
152 'onscreenchat-userid' => $a_target_user,
158 $f->setText($this->lng->txt(
'chat_osc_doesnt_accept_msg'));
160 'onscreenchat-inact-userid' => $a_target_user
163 $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.
$GLOBALS['loaded']
Global hash that tracks already loaded includes.
$chat_enabled
Boolean to indicate if the chat is enabled.
collectActionsForTargetUser($a_target_user)
Collect all actions.
Create styles array
The data for the language used.
$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.