ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
class.ilCourseLearningHistoryProvider.php
Go to the documentation of this file.
1<?php
2
25{
29 public function isActive(): bool
30 {
31 return true;
32 }
33
37 public function getEntries(int $ts_start, int $ts_end): array
38 {
39 $lng = $this->getLanguage();
41 $completions = ilLOUserResults::getCompletionsOfUser($this->getUserId(), $ts_start, $ts_end);
42
43 $entries = [];
44 foreach ($completions as $c) {
45 $text = str_replace(
46 "$3$",
47 $this->getEmphasizedTitle($c["title"]),
48 $lng->txt("crs_lhist_objective_completed")
49 );
50 $entries[] = $this->getFactory()->entry(
51 $text,
52 $text,
53 ilUtil::getImagePath("standard/icon_obj.svg"),
54 $c["tstamp"],
55 $c["course_id"]
56 );
57 }
58 return $entries;
59 }
60
64 public function getName(): string
65 {
66 $lng = $this->getLanguage();
68
69 return $lng->txt("crs_objectives");
70 }
71}
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...
static getCompletionsOfUser(int $a_user_id, int $a_from_ts, int $a_to_ts)
Get completed learning objectives for user and time frame.
loadLanguageModule(string $a_module)
Load language module.
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...
static getImagePath(string $image_name, string $module_path="", string $mode="output", bool $offline=false)
get image path (for images located in a template directory)
$c
Definition: deliver.php:25
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...