Class ilLearningModuleKioskModeView.
More...
|
| updateGet (State $state, string $command, int $param=null) |
|
| buildInitialState (State $state) |
|
| buildControls (State $state, ControlBuilder $builder) |
|
| updatePost (State $state, string $command, array $post) |
|
| render (State $state, Factory $factory, URLBuilder $url_builder, array $post=null) |
|
| __construct (\ilObject $object, \ilCtrl $ctrl, \ilLanguage $lng, \ilAccessHandler $access) |
|
| render (State $state, UI\Factory $factory, URLBuilder $url_builder, array $post=null) |
| Render a state using the ui-factory and URLs from the builder. More...
|
|
◆ buildControls()
Implements ILIAS\KioskMode\View.
Definition at line 155 of file class.ilLearningModuleKioskModeView.php.
References $builder, $DIC, ILIAS\KioskMode\ControlBuilder\genericWithSignal(), getMenuEntries(), ILIAS\KioskMode\State\getValueFor(), initLMService(), maybeBuildLearningProgressToggleControl(), ILIAS\KioskMode\ControlBuilder\next(), ILIAS\KioskMode\ControlBuilder\previous(), and ILIAS\KioskMode\ControlBuilder\tableOfContent().
159 $main_tpl = $DIC->ui()->mainTemplate();
165 $nav_stat = $this->lm_pres_service->getNavigationStatus();
168 $succ_id = $nav_stat->getSuccessorPageId();
170 $builder->
next(
"layout", $succ_id);
174 $prev_id = $nav_stat->getPredecessorPageId();
176 $builder->
previous(
"layout", $prev_id);
179 $toc = $builder->
tableOfContent($this->lm->getTitle(),
'layout', 0);
181 $lm_toc_renderer->renderLSToc($toc, $lm_toc_renderer, 0);
189 if (is_object($entry[
"signal"])) {
195 if ($entry[
"on_load"] !=
"") {
196 $main_tpl->addOnLoadCode($entry[
"on_load"]);
next(string $command, int $parameter=null)
A next control allows the user to progress to the next item in the object.
getValueFor(string $key)
Get the value for the given key.
tableOfContent(string $label, string $command, int $parameter=null, $state=null)
A table of content allows the user to get an overview over the generally available content in the obj...
genericWithSignal(string $label, UI\Component\Signal $signal)
A genericWithSignal will trigger the Signal rather than refreshing the View.
maybeBuildLearningProgressToggleControl(ControlBuilder $builder)
initLMService($current_page)
Init learning module presentation service.
previous(string $command, int $parameter=null)
A previous control allows the user to go back to the previous item in the object. ...
Build controls for the view.
◆ buildInitialState()
ilLearningModuleKioskModeView::buildInitialState |
( |
State |
$state | ) |
|
◆ getMenuEntries()
ilLearningModuleKioskModeView::getMenuEntries |
( |
| ) |
|
|
protected |
◆ getObjectClass()
ilLearningModuleKioskModeView::getObjectClass |
( |
| ) |
|
|
protected |
◆ hasPermissionToAccessKioskMode()
ilLearningModuleKioskModeView::hasPermissionToAccessKioskMode |
( |
| ) |
|
|
protected |
◆ initLMService()
ilLearningModuleKioskModeView::initLMService |
( |
|
$current_page | ) |
|
|
protected |
Init learning module presentation service.
Definition at line 118 of file class.ilLearningModuleKioskModeView.php.
Referenced by buildControls(), and render().
120 if (is_object($this->lm_pres)) {
128 [
"ref_id" => $this->lm->getRefId(),
129 "obj_id" => (int) $current_page],
133 $this->lm_pres_service = $this->lm_pres->getService();
Class ilLMPresentationGUI.
◆ maybeBuildLearningProgressToggleControl()
ilLearningModuleKioskModeView::maybeBuildLearningProgressToggleControl |
( |
ControlBuilder |
$builder | ) |
|
|
protected |
- Parameters
-
Definition at line 223 of file class.ilLearningModuleKioskModeView.php.
References $builder, ilLPMarks\_hasCompleted(), ILIAS\KioskMode\ControlBuilder\generic(), ilObjectLP\getInstance(), ilLPObjSettings\LP_MODE_MANUAL, and user().
Referenced by buildControls().
229 $this->lng->loadLanguageModule(
'lm');
230 $learningProgressToggleCtrlLabel = $this->lng->txt(
'lm_btn_lp_toggle_state_completed');
232 $learningProgressToggleCtrlLabel = $this->lng->txt(
'lm_btn_lp_toggle_state_not_completed');
235 $learningProgressToggleCtrlLabel,
236 self::CMD_TOGGLE_LEARNING_PROGRESS,
static _hasCompleted($a_usr_id, $a_obj_id)
Build controls for the view.
static getInstance($a_obj_id)
generic(string $label, string $command, int $parameter=null)
A generic control needs to have a label that tells what it does.
◆ render()
ilLearningModuleKioskModeView::render |
( |
State |
$state, |
|
|
Factory |
$factory, |
|
|
URLBuilder |
$url_builder, |
|
|
array |
$post = null |
|
) |
| |
Definition at line 276 of file class.ilLearningModuleKioskModeView.php.
References $additional_content, getMenuEntries(), ILIAS\KioskMode\State\getValueFor(), initLMService(), and ILIAS\UI\Factory\legacy().
286 if (is_object($entry[
"modal"])) {
287 $additional_content[] = $entry[
"modal"];
291 $this->ctrl->setParameterByClass(
"illmpresentationgui",
'ref_id', $this->lm->getRefId());
292 $content = $this->uiRenderer->render($this->messages);
293 $content .= $this->ctrl->getHTML($this->lm_pres, [
"cmd" =>
"layout"], [
"illmpresentationgui"]);
294 $content .= $this->uiRenderer->render($additional_content);
295 return $factory->
legacy($content);
getValueFor(string $key)
Get the value for the given key.
legacy($content)
description: purpose: > This component is used to wrap an existing ILIAS UI element into a UI compon...
initLMService($current_page)
Init learning module presentation service.
◆ renderContentStyle()
ilLearningModuleKioskModeView::renderContentStyle |
( |
| ) |
|
|
protected |
◆ setObject()
ilLearningModuleKioskModeView::setObject |
( |
\ilObject |
$object | ) |
|
|
protected |
Definition at line 79 of file class.ilLearningModuleKioskModeView.php.
References $DIC, and user().
84 $this->ctrl = $DIC->ctrl();
85 $this->mainTemplate = $DIC->ui()->mainTemplate();
86 $this->uiFactory = $DIC->ui()->factory();
87 $this->uiRenderer = $DIC->ui()->renderer();
88 $this->httpRequest = $DIC->http()->request();
89 $this->tabs = $DIC->tabs();
90 $this->
user = $DIC->user();
◆ toggleLearningProgress()
ilLearningModuleKioskModeView::toggleLearningProgress |
( |
string |
$command | ) |
|
|
protected |
◆ updateGet()
ilLearningModuleKioskModeView::updateGet |
( |
State |
$state, |
|
|
string |
$command, |
|
|
int |
$param = null |
|
) |
| |
◆ updatePost()
ilLearningModuleKioskModeView::updatePost |
( |
State |
$state, |
|
|
string |
$command, |
|
|
array |
$post |
|
) |
| |
◆ $additional_content
ilLearningModuleKioskModeView::$additional_content = [] |
|
protected |
◆ $ctrl
ilLearningModuleKioskModeView::$ctrl |
|
protected |
◆ $current_page_id
ilLearningModuleKioskModeView::$current_page_id = 0 |
|
protected |
◆ $httpRequest
ilLearningModuleKioskModeView::$httpRequest |
|
protected |
◆ $lm
ilLearningModuleKioskModeView::$lm |
|
protected |
◆ $lm_pres
ilLearningModuleKioskModeView::$lm_pres |
|
protected |
◆ $lm_pres_service
ilLearningModuleKioskModeView::$lm_pres_service |
|
protected |
◆ $mainTemplate
ilLearningModuleKioskModeView::$mainTemplate |
|
protected |
◆ $menu_entries
ilLearningModuleKioskModeView::$menu_entries = null |
|
protected |
◆ $messages
ilLearningModuleKioskModeView::$messages = [] |
|
protected |
◆ $tabs
ilLearningModuleKioskModeView::$tabs |
|
protected |
◆ $uiFactory
ilLearningModuleKioskModeView::$uiFactory |
|
protected |
◆ $uiRenderer
ilLearningModuleKioskModeView::$uiRenderer |
|
protected |
◆ $user
ilLearningModuleKioskModeView::$user |
|
protected |
◆ CMD_TOGGLE_LEARNING_PROGRESS
const ilLearningModuleKioskModeView::CMD_TOGGLE_LEARNING_PROGRESS = 'toggleManualLearningProgress' |
The documentation for this class was generated from the following file: