54         $this->
settings = $domain_service->settings();
    55         $this->provider_factory = $domain_service
    58         $this->admin_manager = $domain_service
    60         $this->rbacreview = $domain_service->rbac()->review();
    66         if (self::$online_users === null) {
    67             self::$online_user_ids = array();
    68             self::$online_users = array();
    73                     self::$online_users[$u[
"user_id"]] = $u;
    74                     self::$online_user_ids[] = $u[
"user_id"];
    78         return self::$online_users;
    89         $this->collections = array();
    93         $awrn_logger->debug(
"Start, Online Only: " . $a_online_only . 
", Current User: " . $this->user_id);
    95         self::getOnlineUsers();
    97         foreach ($this->provider_factory->getAllProviders() as $prov) {
    98             $awrn_logger->debug(
"Provider: " . $prov->getProviderId() . 
", Activation Mode: " . $this->admin_manager->getActivationMode($prov->getProviderId()) . 
", Current User: " . $this->user_id);
   101             $collection = $this->data_service->userCollection();
   103             $provider_active = $this->admin_manager->isProviderActivated($prov->getProviderId());
   104             $provider_includes_offline = $this->admin_manager->includesProviderOfflineUsers($prov->getProviderId());
   106             if ($provider_active) {
   107                 $online_users = null;
   108                 if (!$provider_includes_offline || $a_online_only) {
   109                     $awrn_logger->debug(
"Provider: " . $prov->getProviderId() . 
", Online Filter Users: " . count(self::$online_user_ids) . 
", Current User: " . 
$this->user_id);
   110                     $online_users = self::$online_user_ids;
   114                 $awrn_logger->debug(
"Provider: " . $prov->getProviderId() . 
", Collected Users: " . count($coll) . 
", Current User: " . 
$this->user_id);
   116                 foreach ($coll->getUsers() as 
$user_id) {
   122                     if ($user_id == $this->user_id) {
   126                     $awrn_logger->debug(
"Current User: " . $this->user_id . 
", " .
   127                         "Provider: " . $prov->getProviderId() . 
", Collected User: " . 
$user_id);
   130                     if ((!$a_online_only && $provider_includes_offline)
   131                         || in_array($user_id, self::$online_user_ids)) {
   132                         $collection->
addUser($user_id);
   133                         if (!in_array($user_id, $all_users)) {
   139             $this->collections[] = array(
   140                 "uc_title" => $prov->getTitle(),
   141                 "highlighted" => $prov->isHighlighted(),
   146         $remove_users = array();
   148         if ($this->
settings->get(
"hide_own_online_status") === 
"n") {
   151                 $remove_users[] = $u;
   156             $remove_users = array_filter($all_users, 
function ($i) use ($show_users) {
   157                 return !in_array($i, $show_users);
   162         $remove_users = array_merge($remove_users, $DIC[
'legalDocuments']->usersWithHiddenOnlineStatus($all_users));
   171         $coll = $this->data_service->userCollection();
   173             if ((is_null($online_users) || in_array($user_id, $online_users))) {
   186         foreach ($this->collections as 
$c) {
   187             reset($a_remove_users);
   188             foreach ($a_remove_users as $u) {
   189                 $c[
"collection"]->removeUser($u);
 static array $online_user_ids
 
Represents a set of collected users. 
 
Notes internal repo service. 
 
Collects users from all providers. 
 
static getLogger(string $a_component_id)
Get component logger. 
 
collectUsers(bool $a_online_only=false)
Collect users. 
 
InternalRepoService $repo_service
 
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
ProviderFactory $provider_factory
 
static getUserSubsetByPreferenceValue(array $a_user_ids, string $a_keyword, string $a_val)
For a given set of user IDs return a subset that has a given user preference set. ...
 
removeUsersFromCollections(array $a_remove_users)
Remove users from collection. 
 
Awareness AdminManager $admin_manager
 
collectUsersFromProvider(Provider $prov, ?array $online_users)
 
__construct(int $user_id, int $ref_id, InternalDataService $data_service, InternalRepoService $repo_service, InternalDomainService $domain_service)
 
static _getUsersOnline(int $a_user_id=0, bool $a_no_anonymous=false)
reads all active sessions from db and returns users that are online OR returns only one active user i...
 
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
getInitialUserSet(?array $user_ids=null)
Get initial set of users. 
 
static directCall(string $a_type, string $a_method)
Call context method directly without internal handling. 
 
Awareness InternalDataService $data_service
 
Administrate awareness tool. 
 
static array $online_users