29     public const MAX = 50;
    30     protected \ILIAS\HTTP\Services 
$http;
    39     protected \ILIAS\DI\UIServices 
$ui;
    49         $this->
ctrl = $DIC->ctrl();
    51         $this->lhist_service = $DIC->learningHistory();
    52         $this->
ui = $this->lhist_service->ui();
    53         $this->main_tpl = $this->
ui->mainTemplate();
    54         $this->
lng = $this->lhist_service->language();
    55         $this->
access = $this->lhist_service->access();
    56         $this->
tabs = $DIC->tabs();
    58         $this->
lng->loadLanguageModule(
"lhist");
    60         $this->user_id = $this->lhist_service->user()->getId();
    62         $this->certificateSettings = 
new ilSetting(
"certificate");
    64         $request = $this->lhist_service->request();
    65         $to = $request->getToTS();
    71         $this->main_tpl->addJavaScript(
"assets/js/LearningHistory.js");
    72         $this->
http = $DIC->http();
    85         $cmd = $ctrl->
getCmd(
"show");
    87         switch ($next_class) {
    89                 if (in_array($cmd, array(
"show", 
"renderAsync"))) {
    95     protected function show(): void
    99         $f = $this->
ui->factory();
   109                     $f->messageBox()->info($lng->
txt(
"lhist_no_entries"))
   126     protected function send(
string $output): void
   128         $this->
http->saveResponse($this->
http->response()->withBody(
   129             Streams::ofString($output)
   131         $this->
http->sendResponse();
   132         $this->
http->close();
   141         ?array $classes = null,
   142         ?
string $a_mode = null
   144         return $this->
ctrl->getHTML($this, [
"from" => $from, 
"to" => $to, 
"classes" => $classes, 
"mode" => $a_mode]);
   152         return $this->
getHistoryHtml($par[
"from"], $par[
"to"], $par[
"classes"], $par[
"mode"]);
   161         ?array $classes = null,
   164         $tpl = 
new ilTemplate(
"tpl.timeline.html", 
true, 
true, 
"components/ILIAS/LearningHistory");
   166         $tpl->setVariable(
"TIMELINE", $this->renderTimeline($from, $to, $classes, $mode));
   168         if ($this->show_more && $mode !== 
"print") {
   169             $tpl->setCurrentBlock(
"show_more");
   170             $tpl->setVariable(
"SHOW_MORE_BUTTON", $this->
renderButton());
   171             $tpl->parseCurrentBlock();
   180     protected function renderTimeline(
   183         array $classes = null,
   186         $collector = $this->lhist_service->factory()->collector();
   192         $from = (is_null($from))
   193             ? $to - (365 * 24 * 60 * 60)
   196         $entries = $collector->getEntries($from, $to, $this->user_id, $classes);
   202         while ((
$e = current($entries)) && $cnt < 
self::MAX) {
   209                 $this->lhist_service->repositoryTree()
   211             $this->last_ts = 
$e->getTimestamp();
   217         if (count($entries) > 0) {
   218             $html = $timeline->render($ctrl->
isAsynch());
   221         $this->show_more = (count($entries) > $cnt);
   229         $f = $this->
ui->factory();
   231         $ctrl->
setParameter($this, 
"to_ts", $this->last_ts - 1);
   234         $button = 
$f->button()->standard($this->
lng->txt(
"lhist_show_more"), 
"")
   236             ->withOnLoadCode(
static function (
$id) use (
$url): 
string {
   237                 return "il.LearningHistory.initShowMore('$id', '" . 
$url . 
"');";
 
getHTML(array $par)
Get HTML. 
 
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
 
getCmd(string $fallback_command=null)
 
ilSetting $certificateSettings
 
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
getHistoryHtml(?int $from=null, ?int $to=null, ?array $classes=null, ?string $mode=null)
Get history html. 
 
getNextClass($a_gui_class=null)
 
static http()
Fetches the global http state from ILIAS. 
 
setContent(string $a_html)
Sets content for standard template. 
 
getEmbeddedHTML(?int $from=null, ?int $to=null, ?array $classes=null, ?string $a_mode=null)
 
const TAB_ID_LEARNING_HISTORY
 
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
to(\GdImage $image, int $quality=null)
Currently this is the only way to make a FileStream from a GD image resource. 
 
ILIAS HTTP Services $http
 
getLinkTarget(object $a_gui_obj, string $a_cmd=null, string $a_anchor=null, bool $is_async=false, bool $has_xml_style=false)
 
const TAB_ID_MY_CERTIFICATES
 
ilLearningHistoryService $lhist_service
 
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins 
 
ilGlobalTemplateInterface $main_tpl
 
setParameter(object $a_gui_obj, string $a_parameter, $a_value)