33 $this->lng = $DIC->language();
34 $this->user_id = $a_user_id;
44 $this->ref_id = $a_val;
65 if (!isset(self::$instances[$a_user_id])) {
69 return self::$instances[$a_user_id];
79 include_once(
"./Services/Awareness/classes/class.ilAwarenessData.php");
82 $data->setFilter($a_filter);
83 return $data->getData();
93 include_once(
"./Services/Awareness/classes/class.ilAwarenessData.php");
96 return $data->getUserCounter();
107 if (!$awrn_set->get(
"use_osd",
true)) {
115 $d =
$data->getOnlineUserData($ts);
117 $new_online_users =
array();
120 $uname =
"[" . $u->login .
"]";
121 if ($u->public_profile) {
122 $uname =
"<a href='./goto.php?target=usr_" . $u->id .
"'>" . $u->lastname .
", " . $u->firstname .
" " . $uname .
"</a>";
124 if (!in_array($u->id, $no_ids)) {
125 $new_online_users[] = $uname;
130 if (count($new_online_users) == 0) {
134 $lng->loadLanguageModule(
'mail');
136 include_once(
"./Services/Object/classes/class.ilObjectFactory.php");
139 'online_user_names' => implode(
"<br />", $new_online_users)
142 require_once
'Services/Notifications/classes/class.ilNotificationConfig.php';
144 $notification->setTitleVar(
'awareness_now_online', $bodyParams,
'awrn');
145 $notification->setShortDescriptionVar(
'awareness_now_online_users', $bodyParams,
'awrn');
146 $notification->setLongDescriptionVar(
'', $bodyParams,
'');
147 $notification->setAutoDisable(
false);
149 $notification->setIconPath(
'templates/default/images/icon_usr.svg');
157 $notification->notifyByUsers(
array($this->user_id));
static getInstance($a_user_id)
Get instance (for a user)
static get($a_var)
Get a value.
static set($a_var, $a_val)
Set a value.
Describes a notification and provides methods for publishing this notification.
date( 'd-M-Y', $objPHPExcel->getProperties() ->getCreated())
Create styles array
The data for the language used.
High level business class, interface to front ends.
getAwarenessUserCounter()
Get awareness data.
static getInstance($a_user_id)
Get instance (for a user)
Add data(end) time
Method that wraps PHPs time in order to allow simulations with the workflow.
setRefId($a_val)
Set ref id.
__construct($a_user_id)
Constructor.
notifyOnNewOnlineContacts()
Send OSD notification on new users.
for($i=6; $i< 13; $i++) for($i=1; $i< 13; $i++) $d
getAwarenessData($a_filter)
Get awareness data.