ILIAS  release_8 Revision v8.24
class.ilObjFileBasedLMGUI.php
Go to the documentation of this file.
1<?php
2
20
29{
32 protected ilTabsGUI $tabs;
33 protected ilHelpGUI $help;
34 public bool $output_prepared;
35
36 public function __construct(
37 $a_data,
38 int $a_id = 0,
39 bool $a_call_by_reference = true,
40 bool $a_prepare_output = true
41 ) {
42 global $DIC;
43
44 $this->lng = $DIC->language();
45 $this->user = $DIC->user();
46 $this->locator = $DIC["ilLocator"];
47 $this->tabs = $DIC->tabs();
48 $this->tree = $DIC->repositoryTree();
49 $this->tpl = $DIC["tpl"];
50 $this->access = $DIC->access();
51 $this->toolbar = $DIC->toolbar();
52 $this->help = $DIC["ilHelp"];
53 $lng = $DIC->language();
54 $ilCtrl = $DIC->ctrl();
55
56 $this->ctrl = $ilCtrl;
57 $this->ctrl->saveParameter($this, array("ref_id"));
58
59 $this->lm_request = $DIC->htmlLearningModule()
60 ->internal()
61 ->gui()
62 ->standardRequest();
63
64 $this->type = "htlm";
65 $lng->loadLanguageModule("content");
67
68 parent::__construct($a_data, $a_id, $a_call_by_reference, false);
69 $this->output_prepared = $a_prepare_output;
70 }
71
72 public function executeCommand(): void
73 {
75 $ilTabs = $this->tabs;
76
77 $next_class = $this->ctrl->getNextClass($this);
78 $cmd = $this->ctrl->getCmd();
79
80 if (
81 $this->getCreationMode() === true ||
82 strtolower($this->lm_request->getBaseClass()) === "iladministrationgui"
83 ) {
84 $this->prepareOutput();
85 } elseif (!in_array($cmd, array("", "framset")) || $next_class != "") {
86 $this->getTemplate();
87 $this->setLocator();
88 $this->setTabs();
89 }
90
91 switch ($next_class) {
92 case 'ilobjectmetadatagui':
93 $this->checkPermission("write");
94 $ilTabs->activateTab('id_meta_data');
95 $md_gui = new ilObjectMetaDataGUI($this->object);
96 $this->ctrl->forwardCommand($md_gui);
97 break;
98
99 case "ilfilesystemgui":
100 $this->checkPermission("write");
101 $ilTabs->activateTab('id_list_files');
102 $fs_gui = new ilFileSystemGUI($this->object->getDataDirectory());
103 $fs_gui->activateLabels(true, $this->lng->txt("cont_purpose"));
104 $fs_gui->setUseUploadDirectory(true);
105 $fs_gui->setTableId("htlmfs" . $this->object->getId());
106 if ($this->object->getStartFile() !== "") {
107 $fs_gui->labelFile(
108 (string) $this->object->getStartFile(),
109 $this->lng->txt("cont_startfile")
110 );
111 }
112 $fs_gui->addCommand($this, "setStartFile", $this->lng->txt("cont_set_start_file"));
113
114 $this->ctrl->forwardCommand($fs_gui);
115
116 // try to set start file automatically
117 /* this does not work anymore, see #33348
118 if (!ilObjFileBasedLMAccess::_determineStartUrl($this->object->getId())) {
119 $do_update = false;
120
121 $pcommand = $fs_gui->getLastPerformedCommand();
122 $last_cmd = $pcommand["cmd"] ?? "";
123 $valid = array("index.htm", "index.html", "start.htm", "start.html");
124 if ($last_cmd === "create_file") {
125 $file = strtolower(basename($pcommand["name"]));
126 if (in_array($file, $valid)) {
127 $this->object->setStartFile($pcommand["name"]);
128 $do_update = $pcommand["name"];
129 }
130 } elseif ($last_cmd === "unzip_file") {
131 $zip_file = strtolower(basename($pcommand["name"]));
132 $suffix = strrpos($zip_file, ".");
133 if ($suffix) {
134 $zip_file = substr($zip_file, 0, $suffix);
135 }
136 foreach ($pcommand["added"] as $file) {
137 $chk_file = null;
138 if (stripos($file, ".htm") !== false) {
139 $chk_file = strtolower(basename($file));
140 $suffix = strrpos($chk_file, ".");
141 if ($suffix) {
142 $chk_file = substr($chk_file, 0, $suffix);
143 }
144 }
145 if (in_array(basename($file), $valid) ||
146 ($zip_file && $chk_file && $chk_file == $zip_file)) {
147 $this->object->setStartFile($file);
148 $do_update = $file;
149 break;
150 }
151 }
152 }
153
154 if ($do_update) {
155 $this->tpl->setOnScreenMessage('info', sprintf($this->lng->txt("cont_start_file_set_to"), $do_update), true);
156
157 $this->object->update();
158 $this->ctrl->redirectByClass("ilfilesystemgui", "listFiles");
159 }
160 }*/
161 break;
162
163 case "ilinfoscreengui":
164 $this->showInfoScreen();
165 break;
166
167 case "illearningprogressgui":
168 $ilTabs->activateTab('id_learning_progress');
169 $user_id = ($this->lm_request->getUserId() > 0)
170 ? $this->lm_request->getUserId()
171 : $ilUser->getId();
172 $new_gui = new ilLearningProgressGUI(
174 $this->object->getRefId(),
175 $user_id
176 );
177 $this->ctrl->forwardCommand($new_gui);
178 break;
179
180 case 'ilpermissiongui':
181 $ilTabs->activateTab('id_permissions');
182 $perm_gui = new ilPermissionGUI($this);
183 $ret = $this->ctrl->forwardCommand($perm_gui);
184 break;
185
186 case "ilexportgui":
187 $ilTabs->activateTab("export");
188 $exp_gui = new ilExportGUI($this);
189 $exp_gui->addFormat("xml");
190 $exp_gui->addFormat("html", "", $this, "exportHTML");
191 $ret = $this->ctrl->forwardCommand($exp_gui);
192 break;
193
194 case "ilcommonactiondispatchergui":
196 $this->ctrl->forwardCommand($gui);
197 break;
198
199 default:
200 $cmd = $this->ctrl->getCmd("listFiles");
201 if (
202 $this->getCreationMode() === true ||
203 strtolower($this->lm_request->getBaseClass()) === "iladministrationgui"
204 ) {
205 $cmd .= "Object";
206 }
207 $ret = $this->$cmd();
208 break;
209 }
210
211 $this->addHeaderAction();
212 }
213
214 protected function initCreationForms(string $new_type): array
215 {
216 return [
217 self::CFORM_NEW => $this->initCreateForm($new_type),
218 self::CFORM_IMPORT => $this->initImportForm($new_type)
219 ];
220 }
221
222 final public function cancelCreationObject(): void
223 {
224 $ilCtrl = $this->ctrl;
225
226 $ilCtrl->redirectByClass("ilrepositorygui", "frameset");
227 }
228
229 public function properties(): void
230 {
231 if (!$this->checkPermissionBool("write")) {
232 $this->error->raiseError($this->lng->txt("permission_denied"), $this->error->MESSAGE);
233 }
234
236 $ilTabs = $this->tabs;
237
238 $ilTabs->activateTab("id_settings");
239
240 $this->initSettingsForm();
241 $this->getSettingsFormValues();
242 $tpl->setContent($this->form->getHTML());
243 }
244
245 public function initSettingsForm(): void
246 {
247 $obj_service = $this->getObjectService();
249 $ilCtrl = $this->ctrl;
250
251 $this->form = new ilPropertyFormGUI();
252
253 // title
254 $ti = new ilTextInputGUI($this->lng->txt("title"), "title");
255 $ti->setSize(min(40, ilObject::TITLE_LENGTH));
256 $ti->setMaxLength(ilObject::TITLE_LENGTH);
257 $ti->setRequired(true);
258 $this->form->addItem($ti);
259
260 // description
261 $ta = new ilTextAreaInputGUI($this->lng->txt("description"), "desc");
262 $ta->setCols(40);
263 $ta->setRows(2);
264 $this->form->addItem($ta);
265
266 // online
267 $cb = new ilCheckboxInputGUI($lng->txt("cont_online"), "cobj_online");
268 $cb->setOptionTitle($lng->txt(""));
269 $cb->setValue("y");
270 $this->form->addItem($cb);
271
272 // startfile
273 $startfile = ilObjFileBasedLMAccess::_determineStartUrl($this->object->getId());
274
275 $ne = new ilNonEditableValueGUI($lng->txt("cont_startfile"), "");
276 if ($startfile !== "") {
277 $ne->setValue(basename($startfile));
278 } else {
279 $ne->setValue(basename($this->lng->txt("no_start_file")));
280 }
281 $this->form->addItem($ne);
282
283 $pres = new ilFormSectionHeaderGUI();
284 $pres->setTitle($this->lng->txt('obj_presentation'));
285 $this->form->addItem($pres);
286
287 // tile image
288 $obj_service->commonSettings()->legacyForm($this->form, $this->object)->addTileImage();
289
290 $this->form->addCommandButton("saveProperties", $lng->txt("save"));
291 $this->form->addCommandButton("toFilesystem", $lng->txt("cont_set_start_file"));
292
293 $this->form->setTitle($lng->txt("cont_lm_properties"));
294 $this->form->setFormAction($ilCtrl->getFormAction($this, "saveProperties"));
295
296 // additional features
297 $section = new ilFormSectionHeaderGUI();
298 $section->setTitle($this->lng->txt('obj_features'));
299 $this->form->addItem($section);
300
302 $this->object->getId(),
303 $this->form,
304 [
306 ]
307 );
308 }
309
310 public function getSettingsFormValues(): void
311 {
312 $startfile = ilObjFileBasedLMAccess::_determineStartUrl($this->object->getId());
313
314 $values = array();
315 $values['cobj_online'] = !$this->object->getOfflineStatus();
316 if ($startfile !== "") {
317 $startfile = basename($startfile);
318 } else {
319 $startfile = $this->lng->txt("no_start_file");
320 }
321
322 $values["startfile"] = $startfile;
323 $values["title"] = $this->object->getTitle();
324 $values["desc"] = $this->object->getLongDescription();
325 $values["cont_show_info_tab"] = $this->object->isInfoEnabled();
326
327 $this->form->setValuesByArray($values);
328 }
329
330 public function toFilesystem(): void
331 {
332 $ilCtrl = $this->ctrl;
333 $ilCtrl->redirectByClass("ilfilesystemgui", "listFiles");
334 }
335
336 public function saveProperties(): void
337 {
338 if (!$this->checkPermissionBool("write")) {
339 $this->error->raiseError($this->lng->txt("permission_denied"), $this->error->MESSAGE);
340 }
341
343 $ilTabs = $this->tabs;
344 $obj_service = $this->getObjectService();
345
346 $this->initSettingsForm();
347 if ($this->form->checkInput()) {
348 $this->object->setTitle($this->form->getInput("title"));
349 $this->object->setDescription($this->form->getInput("desc"));
350 $this->object->setOfflineStatus(!(bool) $this->form->getInput("cobj_online"));
351
352 $this->object->update();
353
354 // tile image
355 $obj_service->commonSettings()->legacyForm($this->form, $this->object)->saveTileImage();
356
357 // services
359 $this->object->getId(),
360 $this->form,
361 array(
363 )
364 );
365
366 $this->tpl->setOnScreenMessage('success', $this->lng->txt("msg_obj_modified"), true);
367 $this->ctrl->redirect($this, "properties");
368 }
369
370 $ilTabs->activateTab("id_settings");
371 $this->form->setValuesByPost();
372 $tpl->setContent($this->form->getHTML());
373 }
374
375 public function editObject(): void
376 {
377 if (!$this->rbac_system->checkAccess("visible,write", $this->object->getRefId())) {
378 throw new ilPermissionException($this->lng->txt("permission_denied"));
379 }
380 }
381
382 public function edit(): void
383 {
384 $this->prepareOutput();
385 $this->editObject();
386 }
387
388 public function cancel(): void
389 {
390 $this->cancelObject();
391 }
392
393 protected function afterSave(ilObject $new_object): void
394 {
395 if (!$new_object->getStartFile()) {
396 // try to set start file automatically
397 $files = array();
398 ilFileUtils::recursive_dirscan($new_object->getDataDirectory(), $files);
399 if (isset($files["file"])) {
400 $zip_file = null;
401 if (stripos($new_object->getTitle(), ".zip") !== false) {
402 $zip_file = strtolower($new_object->getTitle());
403 $suffix = strrpos($zip_file, ".");
404 if ($suffix) {
405 $zip_file = substr($zip_file, 0, $suffix);
406 }
407 }
408 $valid = array("index.htm", "index.html", "start.htm", "start.html");
409 foreach ($files["file"] as $idx => $file) {
410 $chk_file = null;
411 if (stripos($file, ".htm") !== false) {
412 $chk_file = strtolower($file);
413 $suffix = strrpos($chk_file, ".");
414 if ($suffix) {
415 $chk_file = substr($chk_file, 0, $suffix);
416 }
417 }
418 if (in_array($file, $valid) ||
419 ($chk_file && $zip_file && $chk_file == $zip_file)) {
420 $new_object->setStartFile(str_replace($new_object->getDataDirectory() . "/", "", $files["path"][$idx]) . $file);
421 $new_object->update();
422 break;
423 }
424 }
425 }
426 }
427
428 // always send a message
429 $this->tpl->setOnScreenMessage('success', $this->lng->txt("object_added"), true);
430 $this->object = $new_object;
431 $this->redirectAfterCreation();
432 }
433
434 public function update(): void
435 {
436 $this->updateObject();
437 }
438
439 public function setStartFile(string $a_file): void
440 {
441 if (!$this->checkPermissionBool("write")) {
442 $this->error->raiseError($this->lng->txt("permission_denied"), $this->error->MESSAGE);
443 }
444
445 $this->object->setStartFile($a_file);
446 $this->object->update();
447 $this->ctrl->redirectByClass("ilfilesystemgui", "listFiles");
448 }
449
450 public function getTemplate(): void
451 {
452 $this->tpl->loadStandardTemplate();
453 }
454
455 public function showLearningModule(): void
456 {
458
459 // #9483
460 if ($ilUser->getId() !== ANONYMOUS_USER_ID) {
462 $ilUser->getId(),
463 $this->object->getId(),
464 $this->object->getRefId(),
465 "htlm"
466 );
467
468 ilLPStatusWrapper::_updateStatus($this->object->getId(), $ilUser->getId());
469 }
470
471 $startfile = ilObjFileBasedLMAccess::_determineStartUrl($this->object->getId());
473 if ($startfile !== "") {
474 ilUtil::redirect($startfile);
475 }
476 }
477
481 public function infoScreen(): void
482 {
483 $this->ctrl->setCmd("showSummary");
484 $this->ctrl->setCmdClass("ilinfoscreengui");
485 $this->showInfoScreen();
486 }
487
488 public function showInfoScreen(): void
489 {
490 $ilToolbar = $this->toolbar;
491 $ilAccess = $this->access;
492 $ilTabs = $this->tabs;
493
494 $ilTabs->activateTab('id_info');
495
496 $this->lng->loadLanguageModule("meta");
497
498 $info = new ilInfoScreenGUI($this);
499 $info->enablePrivateNotes();
500 $info->enableLearningProgress();
501
502 $info->enableNews();
503 if ($ilAccess->checkAccess("write", "", $this->requested_ref_id)) {
504 $info->enableNewsEditing();
505
506 $news_set = new ilSetting("news");
507 $enable_internal_rss = $news_set->get("enable_rss_for_internal");
508 if ($enable_internal_rss) {
509 $info->setBlockProperty("news", "settings", true);
510 }
511 }
512
513 // add read / back button
514 if ($ilAccess->checkAccess("read", "", $this->requested_ref_id)) {
515 // #15127
516 $button = ilLinkButton::getInstance();
517 $button->setCaption("view");
518 $button->setPrimary(true);
519 $button->setUrl("ilias.php?baseClass=ilHTLMPresentationGUI&ref_id=" . $this->object->getRefId());
520 $button->setTarget("ilContObj" . $this->object->getId());
521 $ilToolbar->addButtonInstance($button);
522 }
523
524 // show standard meta data section
525 $info->addMetaDataSections($this->object->getId(), 0, $this->object->getType());
526
527 // forward the command
528 $this->ctrl->forwardCommand($info);
529 }
530
531 protected function setTabs(): void
532 {
533 $this->getTabs();
534 $this->setTitleAndDescription();
535 }
536
537 protected function getTabs(): void
538 {
539 $ilAccess = $this->access;
540 $ilTabs = $this->tabs;
542 $ilHelp = $this->help;
543
544 $ilHelp->setScreenIdComponent("htlm");
545
546 if ($ilAccess->checkAccess('write', '', $this->ref_id)) {
547 $ilTabs->addTab(
548 "id_list_files",
549 $lng->txt("cont_list_files"),
550 $this->ctrl->getLinkTargetByClass("ilfilesystemgui", "listFiles")
551 );
552 }
553
554 if ($ilAccess->checkAccess('visible', '', $this->ref_id) && $this->object->isInfoEnabled()) {
555 $ilTabs->addTab(
556 "id_info",
557 $lng->txt("info_short"),
558 $this->ctrl->getLinkTargetByClass(array("ilobjfilebasedlmgui", "ilinfoscreengui"), "showSummary")
559 );
560 }
561
562 if ($ilAccess->checkAccess('write', '', $this->ref_id)) {
563 $ilTabs->addTab(
564 "id_settings",
565 $lng->txt("settings"),
566 $this->ctrl->getLinkTarget($this, "properties")
567 );
568 }
569
570 if (ilLearningProgressAccess::checkAccess($this->object->getRefId())) {
571 $ilTabs->addTab(
572 "id_learning_progress",
573 $lng->txt("learning_progress"),
574 $this->ctrl->getLinkTargetByClass(array('ilobjfilebasedlmgui','illearningprogressgui'), '')
575 );
576 }
577
578 if ($ilAccess->checkAccess('write', '', $this->ref_id)) {
579 $mdgui = new ilObjectMetaDataGUI($this->object);
580 $mdtab = $mdgui->getTab();
581 if ($mdtab) {
582 $ilTabs->addTab(
583 "id_meta_data",
584 $lng->txt("meta_data"),
585 $mdtab
586 );
587 }
588 }
589
590
591 // export
592 if ($ilAccess->checkAccess("write", "", $this->object->getRefId())) {
593 $ilTabs->addTab(
594 "export",
595 $lng->txt("export"),
596 $this->ctrl->getLinkTargetByClass("ilexportgui", "")
597 );
598 }
599
600 if ($ilAccess->checkAccess('edit_permission', '', $this->object->getRefId())) {
601 $ilTabs->addTab(
602 "id_permissions",
603 $lng->txt("perm_settings"),
604 $this->ctrl->getLinkTargetByClass(array(get_class($this),'ilpermissiongui'), "perm")
605 );
606 }
607
608 $startfile = ilObjFileBasedLMAccess::_determineStartUrl($this->object->getId());
609 if ($startfile !== "" && $ilAccess->checkAccess('read', '', $this->ref_id)) {
610 $ilTabs->addNonTabbedLink(
611 "presentation_view",
612 $this->lng->txt("glo_presentation_view"),
613 "ilias.php?baseClass=ilHTLMPresentationGUI&ref_id=" . $this->object->getRefId(),
614 "_blank"
615 );
616 }
617 }
618
619 public static function _goto(string $a_target): void
620 {
621 global $DIC;
622 $main_tpl = $DIC->ui()->mainTemplate();
623
624 $lng = $DIC->language();
625 $ilAccess = $DIC->access();
626
627 if ($ilAccess->checkAccess("read", "", $a_target) ||
628 $ilAccess->checkAccess("visible", "", $a_target)) {
629 ilObjectGUI::_gotoRepositoryNode($a_target, "infoScreen");
630 } elseif ($ilAccess->checkAccess("read", "", ROOT_FOLDER_ID)) {
631 $main_tpl->setOnScreenMessage('failure', sprintf(
632 $lng->txt("msg_no_perm_read_item"),
634 ), true);
636 }
637
638 throw new ilPermissionException($lng->txt("msg_no_perm_read_lm"));
639 }
640
641 protected function addLocatorItems(): void
642 {
643 $ilLocator = $this->locator;
644
645 if (is_object($this->object)) {
646 $ilLocator->addItem(
647 $this->object->getTitle(),
648 $this->ctrl->getLinkTargetByClass("ilinfoscreengui", "showSummary"),
649 "",
650 $this->requested_ref_id
651 );
652 }
653 }
654
655 protected function importFileObject(int $parent_id = null): void
656 {
657 try {
658 parent::importFileObject();
660 // since there is no manifest xml we assume that this is an HTML export file
661 $this->createFromDirectory($e->getTmpDir());
662 }
663 }
664
665 protected function afterImport(ilObject $new_object): void
666 {
667 $this->ctrl->setParameter($this, "ref_id", $new_object->getRefId());
668 $this->tpl->setOnScreenMessage('success', $this->lng->txt("object_added"), true);
669 $this->ctrl->redirect($this, "properties");
670 }
671
672 public function createFromDirectory(string $a_dir): void
673 {
674 if ($a_dir === "" || !$this->checkPermissionBool("create", "", "htlm")) {
675 throw new ilPermissionException($this->lng->txt("no_create_permission"));
676 }
677
678 // create instance
679 $newObj = new ilObjFileBasedLM();
680 $filename = ilUtil::stripSlashes($_FILES["importfile"]["name"]);
681 $newObj->setTitle($filename);
682 $newObj->setDescription("");
683 $newObj->create();
684 $newObj->populateByDirectoy($a_dir, $filename);
685 $this->putObjectInTree($newObj);
686
687 $this->afterSave($newObj);
688 }
689
690
694
695 public function exportHTML(): void
696 {
698 $this->object->getId(),
699 "html",
700 $this->object->getType()
701 );
702 $export_dir = ilExport::_getExportDirectory(
703 $this->object->getId(),
704 "html",
705 $this->object->getType()
706 );
707
708 $subdir = $this->object->getType() . "_" . $this->object->getId();
709
710 $target_dir = $export_dir . "/" . $subdir;
711
712 ilFileUtils::delDir($target_dir);
713 ilFileUtils::makeDir($target_dir);
714
715 $source_dir = $this->object->getDataDirectory();
716
717 ilFileUtils::rCopy($source_dir, $target_dir);
718
719 // zip it all
720 $date = time();
721 $zip_file = $export_dir . "/" . $date . "__" . IL_INST_ID . "__" .
722 $this->object->getType() . "_" . $this->object->getId() . ".zip";
723 ilFileUtils::zip($target_dir, $zip_file);
724
725 ilFileUtils::delDir($target_dir);
726 }
727
728 public function redirectAfterCreation(): void
729 {
731 $ctrl->setParameterByClass("ilObjFileBasedLMGUI", "ref_id", $this->object->getRefId());
732 $ctrl->redirectByClass(["ilrepositorygui", "ilObjFileBasedLMGUI"], "properties");
733 }
734
735
736 public function learningProgress(): void
737 {
738 $this->ctrl->redirectByClass("illearningprogressgui", "");
739 }
740
741 public function redrawHeaderAction(): void
742 {
744 }
745}
$filename
Definition: buildRTE.php:78
error(string $a_errmsg)
This class represents a checkbox property in a property form.
static getInstanceFromAjaxCall()
(Re-)Build instance from ajax call
redirectByClass( $a_class, string $a_cmd=null, string $a_anchor=null, bool $is_async=false)
@inheritDoc
setParameterByClass(string $a_class, string $a_parameter, $a_value)
@inheritDoc
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static _createExportDirectory(int $a_obj_id, string $a_export_type="xml", string $a_obj_type="")
static _getExportDirectory(int $a_obj_id, string $a_type="xml", string $a_obj_type="", string $a_entity="")
Get export directory for an repository object.
File System Explorer GUI class.
static recursive_dirscan(string $dir, array &$arr)
Recursively scans a given directory and writes path and filename into referenced array.
static zip(string $a_dir, string $a_file, bool $compress_content=false)
zips given directory/file into given zip.file
static makeDir(string $a_dir)
creates a new directory and inherits all filesystem permissions of the parent directory You may pass ...
static delDir(string $a_dir, bool $a_clean_only=false)
removes a dir and all its content (subdirs and files) recursively
static rCopy(string $a_sdir, string $a_tdir, bool $preserveTimeAttributes=false)
Copies content of a directory $a_sdir recursively to a directory $a_tdir.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Help GUI class.
setScreenIdComponent(string $a_comp)
Class ilInfoScreenGUI.
static _updateStatus(int $a_obj_id, int $a_usr_id, ?object $a_obj=null, bool $a_percentage=false, bool $a_force_raise=false)
loadLanguageModule(string $a_module)
Load language module.
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...
static checkAccess(int $a_ref_id, bool $a_allow_only_read=true)
check access to learning progress
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static _tracProgress(int $a_user_id, int $a_obj_id, int $a_ref_id, string $a_obj_type='')
addItem(string $a_title, string $a_link, string $a_frame="", int $a_ref_id=0, ?string $type=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...
User Interface class for file based learning modules (HTML)
initCreationForms(string $new_type)
Init creation forms.
afterSave(ilObject $new_object)
Post (successful) object creation hook.
addLocatorItems()
should be overwritten to add object specific items (repository items are preloaded)
infoScreen()
this one is called from the info button in the repository
__construct( $a_data, int $a_id=0, bool $a_call_by_reference=true, bool $a_prepare_output=true)
static _goto(string $a_target)
redirectAfterCreation()
Redirect after creation, see https://docu.ilias.de/goto_docu_wiki_wpage_5035_1357....
getTabs()
@abstract overwrite in derived GUI class of your object type
StandardGUIRequest $lm_request
importFileObject(int $parent_id=null)
afterImport(ilObject $new_object)
Post (successful) object import hook.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Class ilObjectGUI Basic methods of all Output classes.
ilAccessHandler $access
initImportForm(string $new_type)
ilGlobalTemplateInterface $tpl
static _gotoRepositoryRoot(bool $raise_error=false)
Goto repository root.
checkPermission(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
cancelObject()
cancel action and go back to previous page
checkPermissionBool(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
addHeaderAction()
Add header action menu.
static _gotoRepositoryNode(int $ref_id, string $cmd="")
ilToolbarGUI $toolbar
ilLocatorGUI $locator
prepareOutput(bool $show_sub_objects=true)
ilLanguage $lng
initCreateForm(string $new_type)
updateObject()
updates object entry in object_data
redrawHeaderActionObject()
Ajax call: redraw action header only.
putObjectInTree(ilObject $obj, int $parent_node_id=null)
Add object to tree at given position.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static updateServiceSettingsForm(int $obj_id, ilPropertyFormGUI $form, array $services)
static initServiceSettingsForm(int $obj_id, ilPropertyFormGUI $form, array $services)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
const TITLE_LENGTH
static _lookupObjId(int $ref_id)
static _lookupTitle(int $obj_id)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
This class represents a property form user interface.
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...
activateTab(string $a_id)
This class represents a text area property in a property form.
This class represents a text property in a property form.
static stripSlashes(string $a_str, bool $a_strip_html=true, string $a_allow="")
static redirect(string $a_script)
static signFolderOfStartFile(string $start_file_path)
const IL_INST_ID
Definition: constants.php:40
const ANONYMOUS_USER_ID
Definition: constants.php:27
const ROOT_FOLDER_ID
Definition: constants.php:32
$valid
global $DIC
Definition: feed.php:28
$ilUser
Definition: imgupload.php:34
setContent(string $a_html)
Sets content for standard template.
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
form( $class_path, string $cmd)