Get data.
160 $max = $awrn_set->
get(
"max_nr_entries");
162 $all_user_ids = array();
163 $hall_user_ids = array();
165 if ($this->data ==
null) {
166 $online_users = $this->user_collector->getOnlineUsers();
170 $this->data = array();
174 if (count($this->data) >= $max) {
178 $user_collection = $uc[
"collection"];
179 $user_ids = $user_collection->getUsers();
181 foreach ($user_ids as $uid) {
182 if (!in_array($uid, $all_user_ids)) {
183 if ($uc[
"highlighted"]) {
184 $hall_user_ids[] = $uid;
186 $all_user_ids[] = $uid;
203 foreach ($names as $k => $n) {
204 if (isset($online_users[$n[
"id"]])) {
205 $names[$k][
"online"] =
true;
206 $names[$k][
"last_login"] = $online_users[$n[
"id"]][
"last_login"];
209 $names[$k][
"online"] =
false;
210 $names[$k][
"last_login"] =
"";
213 if ($n[
"public_profile"]) {
214 $sort_str .= $n[
"lastname"] .
" " . $n[
"firstname"];
216 $sort_str .= $n[
"login"];
218 $names[$k][
"sort_str"] = $sort_str;
223 foreach ($names as $n) {
225 if (count($this->data) >= $max) {
230 $filter = trim($filter);
232 !is_int(stripos($n[
"login"], $filter)) &&
234 !$n[
"public_profile"] || (
235 !is_int(stripos($n[
"firstname"], $filter)) &&
236 !is_int(stripos($n[
"lastname"], $filter))
243 $obj = new \stdClass();
244 $obj->lastname = $n[
"lastname"];
245 $obj->firstname = $n[
"firstname"];
246 $obj->login = $n[
"login"];
248 $obj->collector = $uc[
"uc_title"];
249 $obj->highlighted = $uc[
"highlighted"];
253 $obj->public_profile = $n[
"public_profile"];
255 $obj->online = $n[
"online"];
256 $obj->last_login = $n[
"last_login"];
259 $action_collection = $this->action_collector->getActionsForTargetUser($n[
"id"]);
260 $obj->actions = array();
261 foreach ($action_collection->getActions() as $action) {
262 $f = new \stdClass();
263 $f->text = $action->getText();
264 $f->href = $action->getHref();
265 $f->data = $action->getData();
266 $obj->actions[] =
$f;
269 $this->data[] = $obj;
276 count($all_user_ids),
277 count($hall_user_ids)
280 return array(
"data" => $this->data,
"cnt" => count($all_user_ids) .
":" . count($hall_user_ids));
get(string $a_keyword, ?string $a_default_value=null)
get setting
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
static getNamePresentation( $a_user_id, bool $a_user_image=false, bool $a_profile_link=false, string $a_profile_back_link='', bool $a_force_first_lastname=false, bool $a_omit_login=false, bool $a_sortable=true, bool $a_return_data_array=false, $a_ctrl_path='ilpublicuserprofilegui')
Default behaviour is:
static _getPersonalPicturePath(int $a_usr_id, string $a_size='small', bool $a_force_pic=false, bool $a_prevent_no_photo_image=false, bool $html_export=false)
static sortArray(array $array, string $a_array_sortby_key, string $a_array_sortorder="asc", bool $a_numeric=false, bool $a_keep_keys=false)