Learning history main GUI class.
More...
◆ __construct()
ilLearningHistoryGUI::__construct |
( |
| ) |
|
Constructor.
Definition at line 52 of file class.ilLearningHistoryGUI.php.
References $_GET, and $DIC.
56 $this->ctrl = $DIC->ctrl();
58 $this->lhist_service = $DIC->learningHistory();
59 $this->ui = $this->lhist_service->ui();
60 $this->main_tpl = $this->ui->mainTemplate();
61 $this->lng = $this->lhist_service->language();
62 $this->access = $this->lhist_service->access();
63 $this->tabs = $DIC->tabs();
65 $this->lng->loadLanguageModule(
"lhist");
67 $this->user_id = $this->lhist_service->user()->getId();
69 $this->certificateSettings =
new ilSetting(
"certificate");
72 $this->to = ((int)
$_GET[
"to_ts"] > 0)
73 ? (int)
$_GET[
"to_ts"]
76 $this->main_tpl->addJavaScript(
"./Services/LearningHistory/js/LearningHistory.js");
◆ executeCommand()
ilLearningHistoryGUI::executeCommand |
( |
| ) |
|
Execute command.
Definition at line 93 of file class.ilLearningHistoryGUI.php.
References $ctrl.
97 $next_class =
$ctrl->getNextClass($this);
98 $cmd =
$ctrl->getCmd(
"show");
100 switch ($next_class) {
102 if (in_array($cmd, array(
"show",
"renderAsync"))) {
◆ getEmbeddedHTML()
ilLearningHistoryGUI::getEmbeddedHTML |
( |
|
$from = null , |
|
|
|
$to = null , |
|
|
|
$classes = null , |
|
|
|
$a_mode = null |
|
) |
| |
Get HTML.
- Parameters
-
null | $from | |
null | $to | |
null | $classes | |
- Returns
- string
- Exceptions
-
Definition at line 152 of file class.ilLearningHistoryGUI.php.
References $ctrl, and $from.
156 return $ctrl->getHTML($this, [
"from" =>
$from,
"to" => $to,
"classes" => $classes,
"mode" => $a_mode]);
◆ getHistoryHtml()
ilLearningHistoryGUI::getHistoryHtml |
( |
|
$from = null , |
|
|
|
$to = null , |
|
|
|
$classes = null , |
|
|
|
$mode = null |
|
) |
| |
|
protected |
Get history html.
- Returns
- string
Definition at line 175 of file class.ilLearningHistoryGUI.php.
References $ctrl, $from, $html, $tpl, ilTimelineGUI\getInstance(), and renderButton().
Referenced by getHTML(), and show().
177 $tpl =
new ilTemplate(
"tpl.timeline.html",
true,
true,
"Services/LearningHistory");
179 $tpl->setVariable(
"TIMELINE", $this->renderTimeline(
$from, $to, $classes, $mode));
181 if ($this->show_more && $mode !=
"print") {
182 $tpl->setCurrentBlock(
"show_more");
184 $tpl->parseCurrentBlock();
special template class to simplify handling of ITX/PEAR
renderButton()
render Button
◆ getHTML()
ilLearningHistoryGUI::getHTML |
( |
|
$par | ) |
|
◆ renderAsync()
ilLearningHistoryGUI::renderAsync |
( |
| ) |
|
|
protected |
◆ renderButton()
ilLearningHistoryGUI::renderButton |
( |
| ) |
|
|
protected |
render Button
Definition at line 244 of file class.ilLearningHistoryGUI.php.
References $ctrl, $f, $id, $url, and ILIAS\UI\Implementation\Component\withLoadingAnimationOnClick().
Referenced by getHistoryHtml(), and renderAsync().
247 $f = $this->ui->factory();
248 $renderer = $this->ui->renderer();
249 $ctrl->setParameter($this,
"to_ts", $this->last_ts - 1);
250 $url =
$ctrl->getLinkTarget($this,
"renderAsync",
"",
true);
252 $button =
$f->button()->standard($this->lng->txt(
"lhist_show_more"),
"")
254 ->withOnLoadCode(
function (
$id) use (
$url) {
255 return "il.LearningHistory.initShowMore('$id', '" .
$url .
"');";
257 if (
$ctrl->isAsynch()) {
258 return $renderer->renderAsync($button);
260 return $renderer->render($button);
if(!array_key_exists('StateId', $_REQUEST)) $id
withLoadingAnimationOnClick(bool $loading_animation_on_click=true)
◆ setUserId()
ilLearningHistoryGUI::setUserId |
( |
|
$user_id | ) |
|
◆ show()
ilLearningHistoryGUI::show |
( |
| ) |
|
|
protected |
◆ $certificateSettings
ilLearningHistoryGUI::$certificateSettings |
|
protected |
◆ $ctrl
ilLearningHistoryGUI::$ctrl |
|
protected |
◆ $last_ts
ilLearningHistoryGUI::$last_ts = 0 |
|
protected |
◆ $lng
ilLearningHistoryGUI::$lng |
|
protected |
◆ $main_tpl
ilLearningHistoryGUI::$main_tpl |
|
protected |
◆ $show_more
ilLearningHistoryGUI::$show_more = false |
|
protected |
◆ $tabs
ilLearningHistoryGUI::$tabs |
|
protected |
◆ $ui
ilLearningHistoryGUI::$ui |
|
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: