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');
 
  155        ilSession::set(
"awr_online_user_ts", date(
"Y-m-d H:i:s", time()));
 
  157        $notification->notifyByUsers(array($this->user_id));
 
An exception for terminatinating execution or to throw for unit testing.
High level business class, interface to front ends.
setRefId($a_val)
Set ref id.
static getInstance($a_user_id)
Get instance (for a user)
notifyOnNewOnlineContacts()
Send OSD notification on new users.
getAwarenessUserCounter()
Get awareness data.
__construct($a_user_id)
Constructor.
getAwarenessData($a_filter)
Get awareness data.
static getInstance($a_user_id)
Get instance (for a user)
Describes a notification and provides methods for publishing this notification.
static set($a_var, $a_val)
Set a value.
static get($a_var)
Get a value.
for( $i=6;$i< 13;$i++) for($i=1; $i< 13; $i++) $d