Get main menu html.
68 if (!$awrn_set->get(
"awrn_enabled",
false) || ANONYMOUS_USER_ID == $ilUser->getId())
73 $cache_period = (int) $awrn_set->get(
"caching_period");
78 $GLOBALS[
"tpl"]->addJavascript(
"./Services/Awareness/js/Awareness.js");
79 $this->ctrl->setParameter($this,
"ref_id", $this->ref_id);
80 $GLOBALS[
"tpl"]->addOnloadCode(
"il.Awareness.setBaseUrl('".$this->ctrl->getLinkTarget($this,
81 "",
"",
true,
false).
"');");
83 $GLOBALS[
"tpl"]->addOnloadCode(
"il.Awareness.init();");
85 $tpl =
new ilTemplate(
"tpl.awareness.html",
true,
true,
"Services/Awareness");
87 include_once(
"./Services/Awareness/classes/class.ilAwarenessAct.php");
89 $act->setRefId($this->ref_id);
91 if ($last_update ==
"" || ($now - $last_update) >= $cache_period)
93 $cnt = explode(
":", $act->getAwarenessUserCounter());
96 $act->notifyOnNewOnlineContacts();
107 if ($hcnt > 0 || $cnt > 0)
126 $f = $this->ui->factory();
127 $renderer = $this->ui->renderer();
129 $glyph = $f->glyph()->user(
"#");
132 $glyph = $glyph->withCounter($f->counter()->status((
int) $cnt));
136 $glyph =$glyph->withCounter($f->counter()->novelty((
int) $hcnt));
138 $glyph_html = $renderer->render($glyph);
139 $tpl->setVariable(
"GLYPH", $glyph_html);
static getInstance($a_user_id)
Get instance (for a user)
$GLOBALS['loaded']
Global hash that tracks already loaded includes.
static get($a_var)
Get a value.
static set($a_var, $a_val)
Set a value.
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
special template class to simplify handling of ITX/PEAR
Add data(end) time
Method that wraps PHPs time in order to allow simulations with the workflow.