27 protected \ILIAS\DI\UIServices
$ui;
33 string $a_hier_id =
"",
38 $this->tpl = $DIC[
"tpl"];
39 $this->
ctrl = $DIC->ctrl();
40 $this->
user = $DIC->user();
41 $this->
lng = $DIC->language();
42 $this->
lng->loadLanguageModule(
"lhist");
44 $this->service = $DIC->learningHistory();
45 $this->
ui = $DIC->ui();
50 $next_class = $this->
ctrl->getNextClass($this);
51 $cmd = $this->
ctrl->getCmd();
53 switch ($next_class) {
96 $form->setFormAction($ilCtrl->getFormAction($this));
98 $form->setTitle($this->
lng->txt(
"cont_create_lhist"));
100 $form->setTitle($this->
lng->txt(
"cont_update_lhist"));
106 if ($this->content_obj->getFrom() !=
"") {
109 if ($this->content_obj->getTo() !=
"") {
113 $du->setAllowOpenIntervals(
true);
120 $radg->addOption($op1);
122 $radg->addOption($op2);
123 $form->addItem($radg);
128 foreach ($this->service->provider()->getAllProviders(
true) as $p) {
129 $options[get_class($p)] = $p->getName();
134 $si->setValue($this->content_obj->getClasses());
135 if (count($this->content_obj->getClasses()) > 0) {
139 $si->setOptions($options);
140 $op2->addSubItem($si);
143 $form->addCommandButton(
"create_lhist", $this->
lng->txt(
"insert"));
144 $form->addCommandButton(
"cancelCreate", $this->
lng->txt(
"cancel"));
146 $form->addCommandButton(
"update", $this->
lng->txt(
"save"));
147 $form->addCommandButton(
"cancelUpdate", $this->
lng->txt(
"cancel"));
161 if ($form->checkInput()) {
168 $this->content_obj->create($this->pg_obj, $this->hier_id, $this->pc_id);
169 $this->setAttributesFromInput($form);
170 $this->updated = $this->pg_obj->update();
171 if ($this->updated ===
true) {
172 $this->
ctrl->returnToParent($this,
"jump" . $this->hier_id);
176 $form->setValuesByPost();
186 if ($form->checkInput()) {
187 $this->setAttributesFromInput($form);
188 $this->updated = $this->pg_obj->update();
189 if ($this->updated ===
true) {
190 $this->tpl->setOnScreenMessage(
'info', $this->
lng->txt(
"msg_obj_modified"),
true);
191 $this->
ctrl->returnToParent($this,
"jump" . $this->hier_id);
195 $this->pg_obj->addHierIDs();
196 $form->setValuesByPost();
204 $from = (is_null($item->getStart()))
207 $to = (is_null($item->getEnd()))
211 $this->content_obj->setFrom($from);
212 $this->content_obj->setTo($to);
213 $classes = ($form->
getInput(
"mode") ==
"1" && is_array($form->
getInput(
"class")))
216 $this->content_obj->setClasses($classes);
223 $lng = $DIC->language();
227 $content =
'<div style="margin:5px" class="ilBox"><h3>' .
$lng->
txt(
"lhist_lhist") .
'</h3><div class="il_Description_no_margin">' .
228 $lng->
txt(
"lhist_cont_placeholder_text") .
'</div></div>';
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
update()
Update learning history component.
__construct(ilPageObject $a_pg_obj, ?ilPCLearningHistory $a_content_obj=null, string $a_hier_id="", string $a_pc_id="")
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...
create()
Create new learning history component.
edit(ilPropertyFormGUI $a_form=null)
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...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
loadLanguageModule(string $a_module)
Load language module.
initForm(bool $a_insert=false)
Init learning history edit form.
User Interface for Editing of Page Content Objects (Paragraphs, Tables, ...)
static getPlaceholderPresentation()
setContent(string $a_html)
Sets content for standard template.
insert(ilPropertyFormGUI $a_form=null)
Insert learning history form.
Class ilPageObject Handles PageObjects of ILIAS Learning Modules (see ILIAS DTD)
ilGlobalTemplateInterface $tpl
__construct(Container $dic, ilPlugin $plugin)
ilLearningHistoryService $service