33 $this->user_id = $a_user_id;
43 $this->ref_id = $a_val;
64 if (!isset(self::$instances[$a_user_id]))
69 return self::$instances[$a_user_id];
80 if (self::$online_users ===
false)
82 self::$online_user_ids =
array();
83 include_once(
"./Services/User/classes/class.ilObjUser.php");
84 self::$online_users = ilObjUser::_getUsersOnline();
85 foreach (self::$online_users as $u)
87 self::$online_user_ids[] = $u[
"user_id"];
90 return self::$online_users;
103 $this->collections =
array();
107 self::getOnlineUsers();
108 include_once(
"./Services/Awareness/classes/class.ilAwarenessUserProviderFactory.php");
109 $all_users =
array();
113 include_once(
"./Services/Awareness/classes/class.ilAwarenessUserCollection.php");
118 $prov->setUserId($this->user_id);
119 $prov->setRefId($this->ref_id);
120 $prov->setOnlineUserFilter(
false);
123 $prov->setOnlineUserFilter(self::$online_user_ids);
126 $coll = $prov->collectUsers();
127 foreach ($coll->getUsers() as
$user_id)
135 $awrn_logger->debug(
"AwarenessUserCollector: Current User: ".$this->user_id.
", ".
136 "Provider: ".$prov->getProviderId().
", Collected User: ".
$user_id);
140 || in_array(
$user_id, self::$online_user_ids))
143 if (!in_array(
$user_id, $all_users))
150 $this->collections[] =
array(
151 "uc_title" => $prov->getTitle(),
152 "highlighted" => $prov->isHighlighted(),
157 $remove_users =
array();
162 $remove_users[] = $u;
166 require_once
'Services/TermsOfService/classes/class.ilTermsOfServiceHelper.php';
171 if ($u != SYSTEM_USER_ID && !$rbacreview->isAssigned($u, SYSTEM_ROLE_ID))
174 $remove_users[] = $u;
191 foreach ($this->collections as $c)
193 reset($a_remove_users);
194 foreach ($a_remove_users as $u)
196 $c[
"collection"]->removeUser($u);
Collects users from all providers.
removeUsersFromCollections($a_remove_users)
Remove users from collection.
setRefId($a_val)
Set ref id.
collectUsers($a_online_only=false)
Collect users.
static getAllProviders()
Get all awareness providers.
Create styles array
The data for the language used.
static getUserSubsetByPreferenceValue($a_user_ids, $a_keyword, $a_val)
For a given set of user IDs return a subset that has a given user preference set. ...
static getInstance($a_user_id)
Get instance (for a user)
static getLogger($a_component_id)
Get component logger.
static getOnlineUsers()
Get online users.
static getUsersAgreed($a_agreed=true, $a_users=null)
Get users that have or have not agreed to the user agreement.
static getInstance()
Get instance.
__construct($a_user_id)
Constructor.