ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
ilUsersOnlineBlockGUI Class Reference

BlockGUI class for Personal Desktop Users Online block. More...

+ Inheritance diagram for ilUsersOnlineBlockGUI:
+ Collaboration diagram for ilUsersOnlineBlockGUI:

Public Member Functions

 __construct ()
 Constructor. More...
 
 executeCommand ()
 execute command More...
 
 getHTML ()
 Handle config status. More...
 
 getUsers ()
 Get online users. More...
 
 fillDataSection ()
 Fill data section. More...
 
 getListRowData ()
 Get list data. More...
 
 fillRow ($a_set)
 get flat bookmark list for personal desktop More...
 
 getOverview ()
 Get overview. More...
 
 __showActiveChatsOfUser ($a_usr_id)
 
 __showChatInvitation ($a_usr_id)
 
- Public Member Functions inherited from ilBlockGUI
 __construct ()
 Constructor. More...
 
 addHeaderLink ($a_href, $a_text, $status=true)
 
 getHeaderLinks ()
 
 setData ($a_data)
 Set Data. More...
 
 getData ()
 Get Data. More...
 
 setBigMode ($a_bigmode)
 Set Big Mode. More...
 
 getBigMode ()
 Get Big Mode. More...
 
 setBlockId ($a_block_id=0)
 Set Block Id. More...
 
 getBlockId ()
 Get Block Id. More...
 
 setAvailableDetailLevels ($a_max, $a_min=0)
 Set Available Detail Levels. More...
 
 setCurrentDetailLevel ($a_currentdetaillevel)
 Set Current Detail Level. More...
 
 setGuiObject (&$a_gui_object)
 Set GuiObject. More...
 
 getGuiObject ()
 Get GuiObject. More...
 
 getCurrentDetailLevel ()
 Get Current Detail Level. More...
 
 setTitle ($a_title)
 Set Title. More...
 
 getTitle ()
 Get Title. More...
 
 setImage ($a_image)
 Set Image. More...
 
 getImage ()
 Get Image. More...
 
 setOffset ($a_offset)
 Set Offset. More...
 
 getOffset ()
 Get Offset. More...
 
 correctOffset ()
 
 setLimit ($a_limit)
 Set Limit. More...
 
 getLimit ()
 Get Limit. More...
 
 setEnableEdit ($a_enableedit)
 Set EnableEdit. More...
 
 getEnableEdit ()
 Get EnableEdit. More...
 
 setRepositoryMode ($a_repositorymode)
 Set RepositoryMode. More...
 
 getRepositoryMode ()
 Get RepositoryMode. More...
 
 setFooterInfo ($a_footerinfo, $a_hide_and_icon=false)
 Set Footer Info. More...
 
 getFooterInfo ($a_hide_and_icon=false)
 Get Footer Info. More...
 
 setSubtitle ($a_subtitle)
 Set Subtitle. More...
 
 getSubtitle ()
 Get Subtitle. More...
 
 setRefId ($a_refid)
 Set Ref Id (only used if isRepositoryObject() is true). More...
 
 getRefId ()
 Get Ref Id (only used if isRepositoryObject() is true). More...
 
 setAdminCommands ($a_admincommands)
 Set Administration Commmands. More...
 
 getAdminCommands ()
 Get Administration Commmands. More...
 
 setColSpan ($a_colspan)
 Set Columns Span. More...
 
 getColSpan ()
 Get Columns Span. More...
 
 setEnableDetailRow ($a_enabledetailrow)
 Set EnableDetailRow. More...
 
 getEnableDetailRow ()
 Get EnableDetailRow. More...
 
 setEnableNumInfo ($a_enablenuminfo)
 Set Enable Item Number Info. More...
 
 getEnableNumInfo ()
 Get Enable Item Number Info. More...
 
 setProperties ($a_properties)
 This function is supposed to be used for block type specific properties, that should be inherited through ilColumnGUI->setBlockProperties. More...
 
 getProperty ($a_property)
 
 setProperty ($a_property, $a_value)
 
 setRowTemplate ($a_rowtemplatename, $a_rowtemplatedir="")
 Set Row Template Name. More...
 
 getNavParameter ()
 
 getDetailParameter ()
 
 getConfigParameter ()
 
 getMoveParameter ()
 
 getRowTemplateName ()
 Get Row Template Name. More...
 
 getRowTemplateDir ()
 Get Row Template Directory. More...
 
 addBlockCommand ( $a_href, $a_text, $a_target="", $a_img="", $a_right_aligned=false, $a_checked=false, $a_html="")
 Add Block Command. More...
 
 getBlockCommands ()
 Get Block commands. More...
 
 addHeaderCommand ($a_href, $a_text, $a_as_close=false)
 Add Header Block Command. More...
 
 getHeaderCommands ()
 Get Header Block commands. More...
 
 addFooterLink ( $a_text, $a_href="", $a_onclick="", $a_block_id="", $a_top=false, $a_omit_separator=false, $a_checked=false)
 Add a footer text/link. More...
 
 getFooterLinks ()
 Get footer links. More...
 
 clearFooterLinks ()
 Clear footer links. More...
 
 handleDetailLevel ()
 Handle read/write current detail level. More...
 
 getHTML ()
 Handle config status. More...
 
 fillHeaderCommands ()
 Fill header commands block. More...
 
 fillHeaderTitleBlock ()
 Fill header title block (title and. More...
 
 setDataSection ($a_content)
 Call this from overwritten fillDataSection(), if standard row based data is not used. More...
 
 fillDataSection ()
 Standard implementation for row based data. More...
 
 fillRow ($a_set)
 
 fillFooter ()
 
 fillPreviousNext ()
 Fill previous/next row. More...
 
 setPreviousNextLinks ()
 Get previous/next linkbar. More...
 
 fillFooterLinks ($a_top=false, $a_numinfo="")
 Fill footer links. More...
 
 fillDetailRow ()
 Fill Detail Setting Row. More...
 

Static Public Member Functions

static getBlockType ()
 Get block type. More...
 
static isRepositoryObject ()
 Is block used in repository object? More...
 
static getScreenMode ()
 Get Screen Mode for current command. More...
 
static getBlockType ()
 
static isRepositoryObject ()
 
static getScreenMode ()
 Get Screen Mode for current command. More...
 

Static Public Attributes

static $block_type = "pdusers"
 

Protected Attributes

 $settings
 
 $db
 
 $rbacsystem
 
- Protected Attributes inherited from ilBlockGUI
 $data = array()
 
 $colspan = 1
 
 $enablenuminfo = true
 
 $detail_min = 0
 
 $detail_max = 0
 
 $bigmode = false
 
 $footer_links = array()
 
 $block_id = 0
 
 $header_commands = array()
 
 $allow_moving = true
 
 $move = array("left" => false, "right" => false, "up" => false, "down" => false)
 
 $enabledetailrow = true
 
 $header_links = array()
 
 $footerinfo = false
 
 $footerinfo_icon = false
 
 $block_commands = array()
 
 $max_count = false
 
 $close_command = false
 
 $image = false
 
 $property = false
 
 $nav_value = ""
 
 $css_row = ""
 
 $dropdown
 
 $tpl
 
 $main_tpl
 
 $user
 
 $ctrl
 
 $access
 
 $lng
 
 $obj_def
 

Additional Inherited Members

- Protected Member Functions inherited from ilBlockGUI
 fillRowColor ($a_placeholder="CSS_ROW")
 
 preloadData (array $data)
 Can be overwritten in subclasses. More...
 

Detailed Description

BlockGUI class for Personal Desktop Users Online block.

Author
Alex Killing alex..nosp@m.kill.nosp@m.ing@g.nosp@m.mx.d.nosp@m.e
Version
$Id$

@ilCtrl_IsCalledBy ilUsersOnlineBlockGUI: ilColumnGUI @ilCtrl_Calls ilUsersOnlineBlockGUI: ilPublicUserProfileGUI

Definition at line 17 of file class.ilUsersOnlineBlockGUI.php.

Constructor & Destructor Documentation

◆ __construct()

ilUsersOnlineBlockGUI::__construct ( )

Constructor.

Reimplemented from ilBlockGUI.

Definition at line 39 of file class.ilUsersOnlineBlockGUI.php.

40 {
41 global $DIC;
42
43 $this->ctrl = $DIC->ctrl();
44 $this->lng = $DIC->language();
45 $this->user = $DIC->user();
46 $this->settings = $DIC->settings();
47 $this->db = $DIC->database();
48 $this->rbacsystem = $DIC->rbac()->system();
49 $lng = $DIC->language();
50
51 parent::__construct();
52
53 $this->setLimit(10);
54 $this->setTitle($lng->txt("users_online"));
56
57 // mjansen: Used for mail referer link (@see fillRow). I don't want to create a new instance in each fillRow call.
58 $this->topGuiObj = new ilPersonalDesktopGUI();
59 }
user()
Definition: user.php:4
setLimit($a_limit)
Set Limit.
setAvailableDetailLevels($a_max, $a_min=0)
Set Available Detail Levels.
setTitle($a_title)
Set Title.
GUI class for personal desktop.
global $DIC
Definition: saml.php:7
settings()
Definition: settings.php:2

References $DIC, ilBlockGUI\$lng, ilBlockGUI\setAvailableDetailLevels(), ilBlockGUI\setLimit(), settings(), ilBlockGUI\setTitle(), and user().

+ Here is the call graph for this function:

Member Function Documentation

◆ __showActiveChatsOfUser()

ilUsersOnlineBlockGUI::__showActiveChatsOfUser (   $a_usr_id)

Definition at line 376 of file class.ilUsersOnlineBlockGUI.php.

377 {
378 return false;
379 }

Referenced by fillRow().

+ Here is the caller graph for this function:

◆ __showChatInvitation()

ilUsersOnlineBlockGUI::__showChatInvitation (   $a_usr_id)

Definition at line 381 of file class.ilUsersOnlineBlockGUI.php.

382 {
386
387 include_once './Modules/Chatroom/classes/class.ilObjChatroom.php';
388
389 if ($a_usr_id == $ilUser->getId()) {
390 return false;
391 }
392
393 if ($rbacsystem->checkAccess('read', ilObjChatroom::_getPublicRefId())
394 and $rbacsystem->checkAccessOfUser($a_usr_id, 'read', ilObjChatroom::_getPublicRefId())) {
395 $this->tpl->setCurrentBlock("chat_link");
396 $this->tpl->setVariable("TXT_CHAT_INVITE", $lng->txt('chat_invite_public_room'));
397 $this->tpl->setVariable("CHAT_LINK", './ilias.php?baseClass=ilRepositoryGUI&ref_id=' . ilObjChatroom::_getPublicRefId() . '&usr_id=' . $a_usr_id . '&cmd=view-invitePD');
398 $this->tpl->setVariable('TXT_CHAT_INVITE_TOOLTIP', $lng->txt('chat_invite_public_room_tooltip'));
399 $this->tpl->parseCurrentBlock();
400
401 return true;
402 }
403 return false;
404 }
$ilUser
Definition: imgupload.php:18

References $ilUser, ilBlockGUI\$lng, $rbacsystem, ilBlockGUI\$user, and ilObjChatroom\_getPublicRefId().

Referenced by fillRow().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ executeCommand()

ilUsersOnlineBlockGUI::executeCommand ( )

execute command

Definition at line 108 of file class.ilUsersOnlineBlockGUI.php.

109 {
111
112 $next_class = $ilCtrl->getNextClass();
113 $cmd = $ilCtrl->getCmd("getHTML");
114
115 switch ($next_class) {
116 // profile
117 case "ilpublicuserprofilegui":
118 include_once('./Services/User/classes/class.ilPublicUserProfileGUI.php');
119 $profile_gui = new ilPublicUserProfileGUI($_GET["user"]);
120 $profile_gui->setBackUrl($ilCtrl->getParentReturn($this));
121 return $ilCtrl->forwardCommand($profile_gui);
122 break;
123
124 default:
125 return $this->$cmd();
126 }
127 }
$_GET["client_id"]
GUI class for public user profile presentation.
global $ilCtrl
Definition: ilias.php:18

References $_GET, ilBlockGUI\$ctrl, and $ilCtrl.

◆ fillDataSection()

ilUsersOnlineBlockGUI::fillDataSection ( )

Fill data section.

Reimplemented from ilBlockGUI.

Definition at line 186 of file class.ilUsersOnlineBlockGUI.php.

187 {
188 include_once("Services/Notes/classes/class.ilNote.php");
189
190 if ($this->getCurrentDetailLevel() > 1 && $this->num_users > 0) {
191 $this->setRowTemplate("tpl.users_online_row.html", "Services/PersonalDesktop");
192 $this->getListRowData();
193 if ($this->getCurrentDetailLevel() > 2) {
194 $this->setColSpan(2);
195 }
196 parent::fillDataSection();
197 } else {
198 $this->setEnableNumInfo(false);
199 $this->setDataSection($this->getOverview());
200 }
201 }
setRowTemplate($a_rowtemplatename, $a_rowtemplatedir="")
Set Row Template Name.
getCurrentDetailLevel()
Get Current Detail Level.
setDataSection($a_content)
Call this from overwritten fillDataSection(), if standard row based data is not used.
setColSpan($a_colspan)
Set Columns Span.
setEnableNumInfo($a_enablenuminfo)
Set Enable Item Number Info.

References ilBlockGUI\getCurrentDetailLevel(), getListRowData(), getOverview(), ilBlockGUI\setColSpan(), ilBlockGUI\setDataSection(), ilBlockGUI\setEnableNumInfo(), and ilBlockGUI\setRowTemplate().

+ Here is the call graph for this function:

◆ fillRow()

ilUsersOnlineBlockGUI::fillRow (   $a_set)

get flat bookmark list for personal desktop

Reimplemented from ilBlockGUI.

Definition at line 237 of file class.ilUsersOnlineBlockGUI.php.

238 {
244
245 // mail link
246 $a_set["mail_to"] = "";
247 if ($this->mail_allowed &&
248 $rbacsystem->checkAccessOfUser($a_set['id'], 'internal_mail', ilMailGlobalServices::getMailObjectRefId())) {
249 $a_set['mail_url'] = ilMailFormCall::getLinkTarget($this->topGuiObj, '', array(), array('type' => 'new', 'rcp_to' => urlencode($a_set['login'])));
250 }
251
252 // check for profile
253 $a_set["profile"] = in_array(
254 ilObjUser::_lookupPref($a_set["id"], "public_profile"),
255 array("y", "g")
256 );
257
258 // user image
259 if ($this->getCurrentDetailLevel() > 2) {
260 if ($a_set["mail_url"] != "") {
261 $this->tpl->setCurrentBlock("mailto_link");
262 $this->tpl->setVariable("TXT_MAIL", $lng->txt("mail"));
263 $this->tpl->setVariable("MAIL_URL", $a_set["mail_url"]);
264 $this->tpl->parseCurrentBlock();
265 }
266
267 $chatSettings = new ilSetting('chatroom');
268 if (/*ilChatServerConfig::_isActive() && */$chatSettings->get('chat_enabled')) {
269 if (!$this->__showActiveChatsOfUser($a_set["id"])) {
270 // Show invite to chat
271 $this->__showChatInvitation($a_set["id"]);
272 }
273
274 include_once './Modules/Chatroom/classes/class.ilObjChatroom.php';
275 if ($a_set["id"] == $ilUser->getId() &&
276 $rbacsystem->checkAccess('read', ilObjChatroom::_getPublicRefId())) {
277 $this->tpl->setCurrentBlock('chat_link');
278 $this->tpl->setVariable('TXT_CHAT_INVITE', $lng->txt('chat_enter_public_room'));
279 $this->tpl->setVariable('TXT_CHAT_INVITE_TOOLTIP', $lng->txt('chat_enter_public_room_tooltip'));
280 $this->tpl->setVariable('CHAT_LINK', './ilias.php?baseClass=ilRepositoryGUI&cmd=view&ref_id=' . ilObjChatroom::_getPublicRefId());
281 $this->tpl->parseCurrentBlock();
282 }
283 }
284
285 // user image
286 $this->tpl->setCurrentBlock("usr_image");
287 $this->tpl->setVariable(
288 "USR_IMAGE",
289 ilObjUser::_getPersonalPicturePath($a_set["id"], "xxsmall")
290 );
291 $this->tpl->setVariable("USR_ALT", $lng->txt("personal_picture"));
292 $this->tpl->parseCurrentBlock();
293 $this->tpl->touchBlock("usr_image_space");
294 }
295
296 // username
297 if (!$a_set["profile"]) {
298 $this->tpl->setVariable("USR_LOGIN", $a_set["login"]);
299 } elseif ($this->getCurrentDetailLevel() > 2) {
300 $this->tpl->setVariable("USR_LOGIN", "<br />" . $a_set["login"]);
301 } else {
302 $this->tpl->setVariable("USR_LOGIN", " [" . $a_set["login"] . "]");
303 }
304
305 // profile link
306 if ($a_set["profile"]) {
307 include_once "Services/User/classes/class.ilUserUtil.php";
308 $user_name = ilUserUtil::getNamePresentation($a_set["id"], false, false, "", false, true, false);
309
310 $this->tpl->setCurrentBlock("profile_link");
311 $this->tpl->setVariable("TXT_VIEW", $lng->txt("profile"));
312
313 // see ilPersonalProfileGUI::getProfilePortfolio()
314 $has_prtf = false;
315 if ($ilSetting->get('user_portfolios')) {
316 include_once "Modules/Portfolio/classes/class.ilObjPortfolio.php";
317 $has_prtf = ilObjPortfolio::getDefaultPortfolio($a_set["id"]);
318 }
319 if (!$has_prtf) {
320 // (simple) profile: center column
321 $ilCtrl->setParameter($this, "user", $a_set["id"]);
322 $this->tpl->setVariable(
323 "LINK_PROFILE",
324 $ilCtrl->getLinkTargetByClass("ilpublicuserprofilegui", "getHTML")
325 );
326 } else {
327 // portfolio: fullscreen
328 include_once "Services/Link/classes/class.ilLink.php";
329 $this->tpl->setVariable("LINK_PROFILE", ilLink::_getLink($a_set["id"], "usr"));
330 $this->tpl->setVariable("LINK_TARGET", "_blank");
331 }
332
333 $this->tpl->setVariable("USR_ID", $a_set["id"]);
334 $this->tpl->setVariable("LINK_FULLNAME", $user_name);
335 $this->tpl->parseCurrentBlock();
336 } else {
337 $this->tpl->setVariable("USR_FULLNAME", "");
338 }
339 }
static getLinkTarget($gui, $cmd, array $gui_params=array(), array $mail_params=array(), $context_params=array())
static getMailObjectRefId()
Determines the reference id of the mail object and stores this information in a local cache variable.
static getDefaultPortfolio($a_user_id)
Get default portfolio of user.
static _lookupPref($a_usr_id, $a_keyword)
ILIAS Setting Class.
static getNamePresentation( $a_user_id, $a_user_image=false, $a_profile_link=false, $a_profile_back_link="", $a_force_first_lastname=false, $a_omit_login=false, $a_sortable=true, $a_return_data_array=false, $a_ctrl_path="ilpublicuserprofilegui")
Default behaviour is:
global $ilSetting
Definition: privfeed.php:17

References ilBlockGUI\$ctrl, $ilCtrl, $ilSetting, $ilUser, ilBlockGUI\$lng, $rbacsystem, $settings, ilBlockGUI\$user, __showActiveChatsOfUser(), __showChatInvitation(), ilLink\_getLink(), ilObjChatroom\_getPublicRefId(), ilObjUser\_lookupPref(), ilBlockGUI\getCurrentDetailLevel(), ilObjPortfolio\getDefaultPortfolio(), ilMailFormCall\getLinkTarget(), ilMailGlobalServices\getMailObjectRefId(), and ilUserUtil\getNamePresentation().

+ Here is the call graph for this function:

◆ getBlockType()

static ilUsersOnlineBlockGUI::getBlockType ( )
static

Get block type.

Returns
string Block type.

Reimplemented from ilBlockGUI.

Definition at line 66 of file class.ilUsersOnlineBlockGUI.php.

References $block_type.

◆ getHTML()

ilUsersOnlineBlockGUI::getHTML ( )

Handle config status.

Get HTML.

Reimplemented from ilBlockGUI.

Definition at line 129 of file class.ilUsersOnlineBlockGUI.php.

130 {
132
133 $this->users_online_pref = $ilUser->getPref("show_users_online");
134
135 if ($this->users_online_pref != "y" && $this->users_online_pref != "associated") {
136 return "";
137 }
138
139 $this->getUsers();
140
141 if ($this->getCurrentDetailLevel() == 0) {
142 return "";
143 } else {
144 return parent::getHTML();
145 }
146 }

References $ilUser, ilBlockGUI\$user, ilBlockGUI\getCurrentDetailLevel(), and getUsers().

+ Here is the call graph for this function:

◆ getListRowData()

ilUsersOnlineBlockGUI::getListRowData ( )

Get list data.

Definition at line 207 of file class.ilUsersOnlineBlockGUI.php.

208 {
211
212 $data = array();
213
214 $this->mail_allowed = ($ilUser->getId() != ANONYMOUS_USER_ID &&
215 $rbacsystem->checkAccess('internal_mail', ilMailGlobalServices::getMailObjectRefId()));
216
217 foreach ($this->users as $user_id => $user) {
218 $data[] = array(
219 "id" => $user_id,
220 "login" => $user["login"]
221 );
222 }
223 $this->setData($data);
224
225 // we do not have at least one (non hidden) active user
226 if (count($data) == 0) {
227 $this->setEnableNumInfo(false);
228 $this->setCurrentDetailLevel(1);
229 $this->enabledetailrow = false;
230 $this->setDataSection($this->getOverview());
231 }
232 }
setData($a_data)
Set Data.
setCurrentDetailLevel($a_currentdetaillevel)
Set Current Detail Level.

References ilBlockGUI\$data, $ilUser, $rbacsystem, ilBlockGUI\$user, ilMailGlobalServices\getMailObjectRefId(), getOverview(), ilBlockGUI\setCurrentDetailLevel(), ilBlockGUI\setData(), ilBlockGUI\setDataSection(), and ilBlockGUI\setEnableNumInfo().

Referenced by fillDataSection().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getOverview()

ilUsersOnlineBlockGUI::getOverview ( )

Get overview.

Definition at line 344 of file class.ilUsersOnlineBlockGUI.php.

345 {
347
348 // parse visitors text
349 if (empty($this->visitors) || $this->users_online_pref == "associated") {
350 $visitor_text = "";
351 } elseif ($this->visitors == "1") {
352 $visitor_text = "1 " . $lng->txt("visitor");
353 } else {
354 $visitor_text = $visitors . " " . $lng->txt("visitors");
355 }
356
357 // parse registered users text
358 if ($this->num_users > 0) {
359 $user_kind = ($this->users_online_pref == "associated") ? "associated_user" : "registered_user";
360 if ($this->num_users == 1) {
361 $user_list = $this->num_users . " " . $lng->txt($user_kind);
362 } else {
363 $user_list = $this->num_users . " " . $lng->txt($user_kind . "s");
364 }
365
366 if (!empty($visitor_text)) {
367 $user_list .= " " . $lng->txt("and") . " " . $visitor_text;
368 }
369 } else {
370 $user_list = $visitor_text;
371 }
372
373 return '<div class="small">' . $user_list . "</div>";
374 }

References ilBlockGUI\$lng.

Referenced by fillDataSection(), and getListRowData().

+ Here is the caller graph for this function:

◆ getScreenMode()

static ilUsersOnlineBlockGUI::getScreenMode ( )
static

Get Screen Mode for current command.

Reimplemented from ilBlockGUI.

Definition at line 84 of file class.ilUsersOnlineBlockGUI.php.

85 {
86 global $DIC;
87
88 $ilCtrl = $DIC->ctrl();
89
90 if ($ilCtrl->getCmdClass() == "ilpublicuserprofilegui") {
91 return IL_SCREEN_FULL;
92 }
93
94 switch ($ilCtrl->getCmd()) {
95 case "showUserProfile":
96 return IL_SCREEN_FULL;
97 break;
98
99 default:
100 return IL_SCREEN_SIDE;
101 break;
102 }
103 }
const IL_SCREEN_SIDE
const IL_SCREEN_FULL

References $DIC, $ilCtrl, IL_SCREEN_FULL, and IL_SCREEN_SIDE.

◆ getUsers()

ilUsersOnlineBlockGUI::getUsers ( )

Get online users.

Definition at line 151 of file class.ilUsersOnlineBlockGUI.php.

152 {
154
155 if ($this->users_online_pref == "associated") {
156 $this->users = ilUtil::getAssociatedUsersOnline($ilUser->getId(), true);
157 } else {
158 $this->users = ilObjUser::_getUsersOnline(0, true);
159 }
160
161 $this->num_users = 0;
162
163 // add current user always to list
164 if ($ilUser->getId() != ANONYMOUS_USER_ID &&
165 ilObjUser::_lookupPref($ilUser->getId(), "hide_own_online_status") != "y") {
166 $this->users[$ilUser->getId()] =
167 array("user_id" => $ilUser->getId(),
168 "firstname" => $ilUser->getFirstname(),
169 "lastname" => $ilUser->getLastname(),
170 "title" => $ilUser->getUTitle(),
171 "login" => $ilUser->getLogin());
172 }
173
174 foreach ($this->users as $user_id => $user) {
175 if ($user_id != ANONYMOUS_USER_ID) {
176 $this->num_users++;
177 } else {
178 $this->visitors = $user["num"];
179 }
180 }
181 }
static getAssociatedUsersOnline($a_user_id)
reads all active sessions from db and returns users that are online and who have a local role in a gr...

References $ilUser, ilBlockGUI\$user, ilObjUser\_lookupPref(), and ilUtil\getAssociatedUsersOnline().

Referenced by getHTML().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isRepositoryObject()

static ilUsersOnlineBlockGUI::isRepositoryObject ( )
static

Is block used in repository object?

Returns
string Block type.

Reimplemented from ilBlockGUI.

Definition at line 76 of file class.ilUsersOnlineBlockGUI.php.

77 {
78 return false;
79 }

Field Documentation

◆ $block_type

ilUsersOnlineBlockGUI::$block_type = "pdusers"
static

Definition at line 34 of file class.ilUsersOnlineBlockGUI.php.

Referenced by getBlockType().

◆ $db

ilUsersOnlineBlockGUI::$db
protected

Definition at line 27 of file class.ilUsersOnlineBlockGUI.php.

◆ $rbacsystem

ilUsersOnlineBlockGUI::$rbacsystem
protected

Definition at line 32 of file class.ilUsersOnlineBlockGUI.php.

Referenced by __showChatInvitation(), fillRow(), and getListRowData().

◆ $settings

ilUsersOnlineBlockGUI::$settings
protected

Definition at line 22 of file class.ilUsersOnlineBlockGUI.php.

Referenced by fillRow().


The documentation for this class was generated from the following file: