Learning history main GUI class.
More...
Learning history main GUI class.
- Author
- Alexander Killing killi.nosp@m.ng@l.nosp@m.eifos.nosp@m..de
Definition at line 25 of file class.ilLearningHistoryGUI.php.
◆ __construct()
ilLearningHistoryGUI::__construct |
( |
| ) |
|
Definition at line 45 of file class.ilLearningHistoryGUI.php.
46 {
48
49 $this->
ctrl = $DIC->ctrl();
50
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();
57
58 $this->
lng->loadLanguageModule(
"lhist");
59
60 $this->user_id = $this->lhist_service->user()->getId();
61
62 $this->certificateSettings =
new ilSetting(
"certificate");
63
64 $request = $this->lhist_service->request();
65 $to = $request->getToTS();
69 : null;
70
71 $this->main_tpl->addJavaScript("assets/js/LearningHistory.js");
72 $this->
http = $DIC->http();
73 }
static http()
Fetches the global http state from ILIAS.
to(\GdImage $image, ?int $quality=null)
Currently this is the only way to make a FileStream from a GD image resource.
References $DIC, $to, ILIAS\Repository\access(), ILIAS\Repository\ctrl(), ILIAS\ResourceStorage\Flavour\Machine\DefaultMachines\from(), ILIAS\FileDelivery\http(), ILIAS\Repository\lng(), ILIAS\Repository\tabs(), ILIAS\ResourceStorage\Flavour\Machine\DefaultMachines\to(), and ILIAS\Repository\ui().
◆ executeCommand()
ilLearningHistoryGUI::executeCommand |
( |
| ) |
|
◆ getEmbeddedHTML()
ilLearningHistoryGUI::getEmbeddedHTML |
( |
?int |
$from = null , |
|
|
?int |
$to = null , |
|
|
?array |
$classes = null , |
|
|
?string |
$a_mode = null |
|
) |
| |
◆ getHistoryHtml()
ilLearningHistoryGUI::getHistoryHtml |
( |
?int |
$from = null , |
|
|
?int |
$to = null , |
|
|
?array |
$classes = null , |
|
|
?string |
$mode = null |
|
) |
| |
|
protected |
Get history html.
Definition at line 158 of file class.ilLearningHistoryGUI.php.
163 : string {
164 $tpl =
new ilTemplate(
"tpl.timeline.html",
true,
true,
"components/ILIAS/LearningHistory");
165
166 $tpl->setVariable(
"TIMELINE", $this->renderTimeline(
$from,
$to, $classes, $mode));
167
168 if ($this->show_more && $mode !== "print") {
169 $tpl->setCurrentBlock("show_more");
170 $tpl->setVariable(
"SHOW_MORE_BUTTON", $this->
renderButton());
171 $tpl->parseCurrentBlock();
172 }
173
174 return $tpl->get();
175 }
special template class to simplify handling of ITX/PEAR
Referenced by show().
◆ getHTML()
ilLearningHistoryGUI::getHTML |
( |
array |
$par | ) |
|
Get HTML.
Definition at line 150 of file class.ilLearningHistoryGUI.php.
150 : string
151 {
152 return $this->
getHistoryHtml($par[
"from"], $par[
"to"], $par[
"classes"], $par[
"mode"]);
153 }
getHistoryHtml(?int $from=null, ?int $to=null, ?array $classes=null, ?string $mode=null)
Get history html.
◆ renderAsync()
ilLearningHistoryGUI::renderAsync |
( |
| ) |
|
|
protected |
◆ renderButton()
ilLearningHistoryGUI::renderButton |
( |
| ) |
|
|
protected |
Definition at line 226 of file class.ilLearningHistoryGUI.php.
226 : string
227 {
229 $f = $this->
ui->factory();
233
234 $button =
$f->button()->standard($this->
lng->txt(
"lhist_show_more"),
"")
235 ->withLoadingAnimationOnClick(true)
236 ->withOnLoadCode(
static function (
$id) use (
$url):
string {
237 return "il.LearningHistory.initShowMore('$id', '" .
$url .
"');";
238 });
241 }
242
244 }
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
getLinkTarget(object $a_gui_obj, ?string $a_cmd=null, ?string $a_anchor=null, bool $is_async=false, bool $has_xml_style=false)
@inheritDoc
setParameter(object $a_gui_obj, string $a_parameter, $a_value)
@inheritDoc
References Vendor\Package\$f, $id, $renderer, $url, ilCtrl\getLinkTarget(), ilCtrl\isAsynch(), ILIAS\Repository\lng(), ilCtrl\setParameter(), and ILIAS\Repository\ui().
Referenced by renderAsync().
◆ send()
ilLearningHistoryGUI::send |
( |
string |
$output | ) |
|
|
protected |
◆ setUserId()
ilLearningHistoryGUI::setUserId |
( |
int |
$user_id | ) |
|
◆ show()
ilLearningHistoryGUI::show |
( |
| ) |
|
|
protected |
Definition at line 95 of file class.ilLearningHistoryGUI.php.
95 : void
96 {
99 $f = $this->
ui->factory();
101
103
104 if ($html !== "") {
106 } else {
109 $f->messageBox()->info(
$lng->
txt(
"lhist_no_entries"))
110 )
111 );
112 }
113 }
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...
ilGlobalTemplateInterface $main_tpl
setContent(string $a_html)
Sets content for standard template.
References Vendor\Package\$f, $lng, $main_tpl, $renderer, ILIAS\ResourceStorage\Flavour\Machine\DefaultMachines\from(), getHistoryHtml(), ILIAS\UICore\GlobalTemplate\setContent(), ILIAS\ResourceStorage\Flavour\Machine\DefaultMachines\to(), ilLanguage\txt(), and ILIAS\Repository\ui().
◆ $access
◆ $certificateSettings
ilSetting ilLearningHistoryGUI::$certificateSettings |
|
protected |
◆ $ctrl
ilCtrl ilLearningHistoryGUI::$ctrl |
|
protected |
◆ $from
int ilLearningHistoryGUI::$from |
|
protected |
◆ $http
ILIAS HTTP Services ilLearningHistoryGUI::$http |
|
protected |
◆ $last_ts
int ilLearningHistoryGUI::$last_ts = 0 |
|
protected |
◆ $lhist_service
◆ $lng
◆ $main_tpl
◆ $show_more
bool ilLearningHistoryGUI::$show_more = false |
|
protected |
◆ $tabs
◆ $to
int ilLearningHistoryGUI::$to |
|
protected |
◆ $ui
ILIAS DI UIServices ilLearningHistoryGUI::$ui |
|
protected |
◆ $user_id
int ilLearningHistoryGUI::$user_id |
|
protected |
◆ MAX
const ilLearningHistoryGUI::MAX = 50 |
◆ TAB_ID_LEARNING_HISTORY
const ilLearningHistoryGUI::TAB_ID_LEARNING_HISTORY = 'lhist_learning_history' |
◆ TAB_ID_MY_CERTIFICATES
const ilLearningHistoryGUI::TAB_ID_MY_CERTIFICATES = 'certificates' |
The documentation for this class was generated from the following file: