25 protected \ILIAS\DI\UIServices
$ui;
54 $tpl =
new ilTemplate(
"tpl.timeline_item_inner.html",
true,
true,
"components/ILIAS/LearningHistory");
56 $f = $this->
ui->factory();
57 $r = $this->
ui->renderer();
59 $ico =
$f->symbol()->icon()->custom($this->lh_entry->getIconPath(),
'')->withSize(\
ILIAS\UI\
Component\Symbol\Icon\Icon::MEDIUM);
61 $obj_id = $this->lh_entry->getObjId();
63 if ($this->lh_entry->getRefId() === 0) {
66 $ref_ids = [$this->lh_entry->getRefId()];
75 if ($readable_ref_id > 0) {
77 $parent_ref_id = $readable_ref_id;
79 $parent_ref_id = $this->tree->checkForParentType($readable_ref_id,
"crs",
true);
83 if ($parent_ref_id > 0) {
84 $text = $this->lh_entry->getAchieveInText();
85 $obj_placeholder =
"<a href='" . ilLink::_getLink($parent_ref_id) .
"'>" .
87 $text = str_replace(
"$2$", $obj_placeholder, $text);
89 $text = $this->lh_entry->getAchieveText();
92 $obj_placeholder = ($readable_ref_id > 0)
93 ?
"<a href='" . ilLink::_getLink($readable_ref_id) .
"'>" . $this->
getEmphasizedTitle($title) .
"</a>"
95 $text = str_replace(
"$1$", $obj_placeholder, $text);
97 $tpl->setVariable(
"TEXT", $text);
98 $tpl->setVariable(
"ICON", $r->render($ico));
105 $tpl =
new ilTemplate(
"tpl.emphasized_title.php",
true,
true,
"components/ILIAS/LearningHistory");
106 $tpl->setVariable(
"TITLE", $title);
@classDescription Date and time handling
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
ilLearningHistoryEntry $lh_entry
__construct(ilLearningHistoryEntry $lh_entry, \ILIAS\DI\UIServices $ui, int $user_id, ilAccessHandler $access, ilTree $tree)
getEmphasizedTitle(string $title)
static _lookupType(int $id, bool $reference=false)
static _getAllReferences(int $id)
get all reference ids for object ID
static _lookupObjId(int $ref_id)
static _lookupTitle(int $obj_id)
special template class to simplify handling of ITX/PEAR
Tree class data representation in hierachical trees using the Nested Set Model with Gaps by Joe Celco...
Interface ilAccessHandler This interface combines all available interfaces which can be called via gl...
checkAccessOfUser(int $a_user_id, string $a_permission, string $a_cmd, int $a_ref_id, string $a_type="", ?int $a_obj_id=null, ?int $a_tree_id=null)
check access for an object (provide $a_type and $a_obj_id if available for better performance)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Interface Observer \BackgroundTasks Contains several chained tasks and infos about them.