ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
class.ilFirstLoginLearningHistoryProvider.php
Go to the documentation of this file.
1<?php
2
3/* Copyright (c) 1998-2018 ILIAS open source, Extended GPL, see docs/LICENSE */
4
12{
13
17 public function isActive()
18 {
19 return true;
20 }
21
25 public function getEntries($ts_start, $ts_end)
26 {
27 $entries = [];
29 if ($ts != "") {
30 $ts = new ilDateTime($ts, IL_CAL_DATETIME);
31 $ts = $ts->get(IL_CAL_UNIX);
32
33 $lng = $this->getLanguage();
34 $lng->loadLanguageModule("lhist");
35
36 $text1 = $lng->txt("lhist_first_login");
37 $entries[] = $this->getFactory()->entry(
38 $text1,
39 $text1,
40 ilUtil::getImagePath("icon_rate_on_user.svg"),
41 $ts,
42 0
43 );
44 }
45 return $entries;
46 }
47
51 public function getName() : string
52 {
53 $lng = $this->getLanguage();
54 $lng->loadLanguageModule("lhist");
55
56 return $lng->txt("lhist_first_login");
57 }
58}
An exception for terminatinating execution or to throw for unit testing.
const IL_CAL_UNIX
const IL_CAL_DATETIME
@classDescription Date and time handling
getEntries($ts_start, $ts_end)
Get entries.ilLearningHistoryEntry[]
getName()
Get name of provider (in user language)string
static _lookupFirstLogin($a_user_id)
lookup first login
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)