ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
class.ilObjFileBasedLMGUI.php
Go to the documentation of this file.
1<?php
2
3/* Copyright (c) 1998-2010 ILIAS open source, Extended GPL, see docs/LICENSE */
4
5
19require_once("./Services/Object/classes/class.ilObjectGUI.php");
20require_once("./Modules/HTMLLearningModule/classes/class.ilObjFileBasedLM.php");
21require_once("./Services/Table/classes/class.ilTableGUI.php");
22require_once("./Services/FileSystem/classes/class.ilFileSystemGUI.php");
23
25{
29 protected $tabs;
30
34 protected $rbacsystem;
35
39 protected $error;
40
44 protected $help;
45
47
53 public function __construct($a_data, $a_id = 0, $a_call_by_reference = true, $a_prepare_output = true)
54 {
55 global $DIC;
56
57 $this->lng = $DIC->language();
58 $this->user = $DIC->user();
59 $this->locator = $DIC["ilLocator"];
60 $this->tabs = $DIC->tabs();
61 $this->rbacsystem = $DIC->rbac()->system();
62 $this->tree = $DIC->repositoryTree();
63 $this->tpl = $DIC["tpl"];
64 $this->access = $DIC->access();
65 $this->error = $DIC["ilErr"];
66 $this->toolbar = $DIC->toolbar();
67 $this->help = $DIC["ilHelp"];
68 $lng = $DIC->language();
69 $ilCtrl = $DIC->ctrl();
70
71 $this->ctrl = $ilCtrl;
72 $this->ctrl->saveParameter($this, array("ref_id"));
73
74 $this->type = "htlm";
75 $lng->loadLanguageModule("content");
76 $lng->loadLanguageModule("obj");
77
78 parent::__construct($a_data, $a_id, $a_call_by_reference, false);
79 //$this->actions = $this->objDefinition->getActions("mep");
80 $this->output_prepared = $a_prepare_output;
81 }
82
86 public function executeCommand()
87 {
89 $ilLocator = $this->locator;
90 $ilTabs = $this->tabs;
91
92 $next_class = $this->ctrl->getNextClass($this);
93 $cmd = $this->ctrl->getCmd();
94
95 if (strtolower($_GET["baseClass"]) == "iladministrationgui" ||
96 $this->getCreationMode() == true) {
97 $this->prepareOutput();
98 } else {
99 if (!in_array($cmd, array("", "framset")) || $next_class != "") {
100 $this->getTemplate();
101 $this->setLocator();
102 $this->setTabs();
103 }
104 }
105
106 switch ($next_class) {
107 case 'ilobjectmetadatagui':
108 $this->checkPermission("write");
109 $ilTabs->activateTab('id_meta_data');
110 include_once "Services/Object/classes/class.ilObjectMetaDataGUI.php";
111 $md_gui = new ilObjectMetaDataGUI($this->object);
112 $this->ctrl->forwardCommand($md_gui);
113 break;
114
115 case "ilfilesystemgui":
116 $this->checkPermission("write");
117 $ilTabs->activateTab('id_list_files');
118 $fs_gui = new ilFileSystemGUI($this->object->getDataDirectory());
119 $fs_gui->activateLabels(true, $this->lng->txt("cont_purpose"));
120 $fs_gui->setUseUploadDirectory(true);
121 $fs_gui->setTableId("htlmfs" . $this->object->getId());
122 if ($this->object->getStartFile() != "") {
123 $fs_gui->labelFile(
124 $this->object->getStartFile(),
125 $this->lng->txt("cont_startfile")
126 );
127 }
128 $fs_gui->addCommand($this, "setStartFile", $this->lng->txt("cont_set_start_file"));
129
130 $this->ctrl->forwardCommand($fs_gui);
131
132 // try to set start file automatically
133 require_once("./Modules/HTMLLearningModule/classes/class.ilObjFileBasedLMAccess.php");
134 if (!ilObjFileBasedLMAccess::_determineStartUrl($this->object->getId())) {
135 $do_update = false;
136
137 $pcommand = $fs_gui->getLastPerformedCommand();
138 if (is_array($pcommand)) {
139 $valid = array("index.htm", "index.html", "start.htm", "start.html");
140 if ($pcommand["cmd"] == "create_file") {
141 $file = strtolower(basename($pcommand["name"]));
142 if (in_array($file, $valid)) {
143 $this->object->setStartFile($pcommand["name"]);
144 $do_update = $pcommand["name"];
145 }
146 } elseif ($pcommand["cmd"] == "unzip_file") {
147 $zip_file = strtolower(basename($pcommand["name"]));
148 $suffix = strrpos($zip_file, ".");
149 if ($suffix) {
150 $zip_file = substr($zip_file, 0, $suffix);
151 }
152 foreach ($pcommand["added"] as $file) {
153 $chk_file = null;
154 if (stristr($file, ".htm")) {
155 $chk_file = strtolower(basename($file));
156 $suffix = strrpos($chk_file, ".");
157 if ($suffix) {
158 $chk_file = substr($chk_file, 0, $suffix);
159 }
160 }
161 if (in_array(basename($file), $valid) ||
162 ($zip_file && $chk_file && $chk_file == $zip_file)) {
163 $this->object->setStartFile($file);
164 $do_update = $file;
165 break;
166 }
167 }
168 }
169 }
170
171 if ($do_update) {
172 ilUtil::sendInfo(sprintf($this->lng->txt("cont_start_file_set_to"), $do_update), true);
173
174 $this->object->update();
175 $this->ctrl->redirectByClass("ilfilesystemgui", "listFiles");
176 }
177 }
178 break;
179
180 case "ilinfoscreengui":
181 $ret = $this->outputInfoScreen();
182 break;
183
184 case "illearningprogressgui":
185 $ilTabs->activateTab('id_learning_progress');
186 include_once './Services/Tracking/classes/class.ilLearningProgressGUI.php';
187 $new_gui = new ilLearningProgressGUI(
189 $this->object->getRefId(),
190 $_GET['user_id'] ? $_GET['user_id'] : $ilUser->getId()
191 );
192 $this->ctrl->forwardCommand($new_gui);
193 break;
194
195 case 'ilpermissiongui':
196 $ilTabs->activateTab('id_permissions');
197 include_once("Services/AccessControl/classes/class.ilPermissionGUI.php");
198 $perm_gui = new ilPermissionGUI($this);
199 $ret = $this->ctrl->forwardCommand($perm_gui);
200 break;
201
202 case "ilexportgui":
203 $ilTabs->activateTab("export");
204 include_once("./Services/Export/classes/class.ilExportGUI.php");
205 $exp_gui = new ilExportGUI($this);
206 $exp_gui->addFormat("xml");
207 $exp_gui->addFormat("html", "", $this, "exportHTML");
208 $ret = $this->ctrl->forwardCommand($exp_gui);
209// $this->tpl->show();
210 break;
211
212 case "ilcommonactiondispatchergui":
213 include_once("Services/Object/classes/class.ilCommonActionDispatcherGUI.php");
215 $this->ctrl->forwardCommand($gui);
216 break;
217
218 default:
219 $cmd = $this->ctrl->getCmd("frameset");
220 if (strtolower($_GET["baseClass"]) == "iladministrationgui" ||
221 $this->getCreationMode() == true) {
222 $cmd .= "Object";
223 }
224 $ret = $this->$cmd();
225 break;
226 }
227
228 $this->addHeaderAction();
229 }
230
231 protected function initCreationForms($a_new_type)
232 {
233 $forms = array(self::CFORM_NEW => $this->initCreateForm($a_new_type),
234 self::CFORM_IMPORT => $this->initImportForm($a_new_type));
235
236 return $forms;
237 }
238
244 final public function cancelCreationObject($in_rep = false)
245 {
247
248 $ilCtrl->redirectByClass("ilrepositorygui", "frameset");
249 }
250
256 public function properties()
257 {
261 $ilTabs = $this->tabs;
262
263 $ilTabs->activateTab("id_settings");
264
265 $this->initSettingsForm();
266 $this->getSettingsFormValues();
267 $tpl->setContent($this->form->getHTML());
268 }
269
273 public function initSettingsForm()
274 {
275 $obj_service = $this->getObjectService();
278 $ilAccess = $this->access;
279
280 include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
281 $this->form = new ilPropertyFormGUI();
282
283 // title
284 $ti = new ilTextInputGUI($this->lng->txt("title"), "title");
285 $ti->setSize(min(40, ilObject::TITLE_LENGTH));
286 $ti->setMaxLength(ilObject::TITLE_LENGTH);
287 $ti->setRequired(true);
288 $this->form->addItem($ti);
289
290 // description
291 $ta = new ilTextAreaInputGUI($this->lng->txt("description"), "desc");
292 $ta->setCols(40);
293 $ta->setRows(2);
294 $this->form->addItem($ta);
295
296 // online
297 $cb = new ilCheckboxInputGUI($lng->txt("cont_online"), "cobj_online");
298 $cb->setOptionTitle($lng->txt(""));
299 $cb->setValue("y");
300 $this->form->addItem($cb);
301
302 // startfile
303 require_once("./Modules/HTMLLearningModule/classes/class.ilObjFileBasedLMAccess.php");
304 $startfile = ilObjFileBasedLMAccess::_determineStartUrl($this->object->getId());
305
306 $ne = new ilNonEditableValueGUI($lng->txt("cont_startfile"), "");
307 if ($startfile != "") {
308 $ne->setValue(basename($startfile));
309 } else {
310 $ne->setValue(basename($this->lng->txt("no_start_file")));
311 }
312 $this->form->addItem($ne);
313
314 $pres = new ilFormSectionHeaderGUI();
315 $pres->setTitle($this->lng->txt('obj_presentation'));
316 $this->form->addItem($pres);
317
318 // tile image
319 $obj_service->commonSettings()->legacyForm($this->form, $this->object)->addTileImage();
320
321 $this->form->addCommandButton("saveProperties", $lng->txt("save"));
322 $this->form->addCommandButton("toFilesystem", $lng->txt("cont_set_start_file"));
323
324 $this->form->setTitle($lng->txt("cont_lm_properties"));
325 $this->form->setFormAction($ilCtrl->getFormAction($this, "saveProperties"));
326 }
327
331 public function getSettingsFormValues()
332 {
333 require_once("./Modules/HTMLLearningModule/classes/class.ilObjFileBasedLMAccess.php");
334 $startfile = ilObjFileBasedLMAccess::_determineStartUrl($this->object->getId());
335
336 $values = array();
337 $values['cobj_online'] = !$this->object->getOfflineStatus();
338 if ($startfile != "") {
339 $startfile = basename($startfile);
340 } else {
341 $startfile = $this->lng->txt("no_start_file");
342 }
343
344 $values["startfile"] = $startfile;
345 $values["title"] = $this->object->getTitle();
346 $values["desc"] = $this->object->getLongDescription();
347 //$values["lic"] = $this->object->getShowLicense();
348
349 $this->form->setValuesByArray($values);
350 }
351
358 public function toFilesystem()
359 {
361
362 $ilCtrl->redirectByClass("ilfilesystemgui", "listFiles");
363 }
364
368 public function saveProperties()
369 {
371 $ilAccess = $this->access;
372 $ilTabs = $this->tabs;
373 $obj_service = $this->getObjectService();
374
375 $this->initSettingsForm("");
376 if ($this->form->checkInput()) {
377 $this->object->setTitle($this->form->getInput("title"));
378 $this->object->setDescription($this->form->getInput("desc"));
379 $this->object->setOfflineStatus(!(bool) $_POST['cobj_online']);
380
381 $this->object->update();
382
383 // tile image
384 $obj_service->commonSettings()->legacyForm($this->form, $this->object)->saveTileImage();
385
386 ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"), true);
387 $this->ctrl->redirect($this, "properties");
388 }
389
390 $ilTabs->activateTab("id_settings");
391 $this->form->setValuesByPost();
392 $tpl->setContent($this->form->getHtml());
393 }
394
400 public function editObject()
401 {
404
405 if (!$rbacsystem->checkAccess("visible,write", $this->object->getRefId())) {
406 $ilErr->raiseError($this->lng->txt("permission_denied"), $ilErr->MESSAGE);
407 }
408 }
409
413 public function edit()
414 {
415 $this->prepareOutput();
416 $this->editObject();
417 }
418
422 public function cancel()
423 {
424 //$this->setReturnLocation("cancel","fblm_edit.php?cmd=listFiles&ref_id=".$_GET["ref_id"]);
425 $this->cancelObject();
426 }
427
432 public function afterSave(ilObject $newObj)
433 {
434 if (!$newObj->getStartFile()) {
435 // try to set start file automatically
436 $files = array();
437 include_once "Services/Utilities/classes/class.ilFileUtils.php";
438 ilFileUtils::recursive_dirscan($newObj->getDataDirectory(), $files);
439 if (is_array($files["file"])) {
440 $zip_file = null;
441 if (stristr($newObj->getTitle(), ".zip")) {
442 $zip_file = strtolower($newObj->getTitle());
443 $suffix = strrpos($zip_file, ".");
444 if ($suffix) {
445 $zip_file = substr($zip_file, 0, $suffix);
446 }
447 }
448 $valid = array("index.htm", "index.html", "start.htm", "start.html");
449 foreach ($files["file"] as $idx => $file) {
450 $chk_file = null;
451 if (stristr($file, ".htm")) {
452 $chk_file = strtolower($file);
453 $suffix = strrpos($chk_file, ".");
454 if ($suffix) {
455 $chk_file = substr($chk_file, 0, $suffix);
456 }
457 }
458 if (in_array($file, $valid) ||
459 ($chk_file && $zip_file && $chk_file == $zip_file)) {
460 $newObj->setStartFile(str_replace($newObj->getDataDirectory() . "/", "", $files["path"][$idx]) . $file);
461 $newObj->update();
462 break;
463 }
464 }
465 }
466 }
467
468 // always send a message
469 ilUtil::sendSuccess($this->lng->txt("object_added"), true);
470 $this->object = $newObj;
471 $this->redirectAfterCreation();
472 }
473
474
478 public function update()
479 {
480 //$this->setReturnLocation("update", "fblm_edit.php?cmd=listFiles&ref_id=".$_GET["ref_id"].
481 // "&obj_id=".$_GET["obj_id"]);
482 $this->updateObject();
483 }
484
485
486 public function setStartFile($a_file)
487 {
488 $this->object->setStartFile($a_file);
489 $this->object->update();
490 $this->ctrl->redirectByClass("ilfilesystemgui", "listFiles");
491 }
492
496 public function perm()
497 {
498 $this->setFormAction("permSave", "fblm_edit.php?cmd=permSave&ref_id=" . $_GET["ref_id"] .
499 "&obj_id=" . $_GET["obj_id"]);
500 $this->setFormAction("addRole", "fblm_edit.php?ref_id=" . $_GET["ref_id"] .
501 "&obj_id=" . $_GET["obj_id"] . "&cmd=addRole");
502 $this->permObject();
503 }
504
505
509 public function frameset()
510 {
512
513 $ilCtrl->setCmdClass("ilfilesystemgui");
514 $ilCtrl->setCmd("listFiles");
515 return $this->executeCommand();
516 }
517
521 public function getTemplate()
522 {
524
525 $this->tpl->getStandardTemplate();
526 }
527
528 public function showLearningModule()
529 {
531
532 // #9483
533 if ($ilUser->getId() != ANONYMOUS_USER_ID) {
534 include_once "Services/Tracking/classes/class.ilLearningProgress.php";
536 $ilUser->getId(),
537 $this->object->getId(),
538 $this->object->getRefId(),
539 "htlm"
540 );
541 }
542
543 require_once("./Modules/HTMLLearningModule/classes/class.ilObjFileBasedLMAccess.php");
544 require_once('./Services/WebAccessChecker/classes/class.ilWACSignedPath.php');
545
546 $startfile = ilObjFileBasedLMAccess::_determineStartUrl($this->object->getId());
548 if ($startfile != "") {
549 ilUtil::redirect($startfile);
550 }
551 }
552
553 // InfoScreen methods
559 public function infoScreen()
560 {
561 $this->ctrl->setCmd("showSummary");
562 $this->ctrl->setCmdClass("ilinfoscreengui");
563 $this->outputInfoScreen();
564 }
565
569 public function showInfoScreen()
570 {
571 $this->outputInfoScreen(true);
572 }
573
577 public function outputInfoScreen($a_standard_locator = true)
578 {
579 $ilToolbar = $this->toolbar;
580 $ilAccess = $this->access;
581 $ilTabs = $this->tabs;
582
583 $ilTabs->activateTab('id_info');
584
585 $this->lng->loadLanguageModule("meta");
586 include_once("./Services/InfoScreen/classes/class.ilInfoScreenGUI.php");
587
588 $info = new ilInfoScreenGUI($this);
589 $info->enablePrivateNotes();
590 $info->enableLearningProgress();
591
592 $info->enableNews();
593 if ($ilAccess->checkAccess("write", "", $_GET["ref_id"])) {
594 $info->enableNewsEditing();
595
596 $news_set = new ilSetting("news");
597 $enable_internal_rss = $news_set->get("enable_rss_for_internal");
598 if ($enable_internal_rss) {
599 $info->setBlockProperty("news", "settings", true);
600 }
601 }
602
603 // add read / back button
604 if ($ilAccess->checkAccess("read", "", $_GET["ref_id"])) {
605 // #15127
606 include_once "Services/UIComponent/Button/classes/class.ilLinkButton.php";
607 $button = ilLinkButton::getInstance();
608 $button->setCaption("view");
609 $button->setPrimary(true);
610 $button->setUrl("ilias.php?baseClass=ilHTLMPresentationGUI&ref_id=" . $this->object->getRefID());
611 $button->setTarget("ilContObj" . $this->object->getId());
612 $ilToolbar->addButtonInstance($button);
613 }
614
615 // show standard meta data section
616 $info->addMetaDataSections($this->object->getId(), 0, $this->object->getType());
617
618 // forward the command
619 $this->ctrl->forwardCommand($info);
620 }
621
622
623
627 public function setTabs()
628 {
629 $this->tpl->setTitleIcon(ilUtil::getImagePath("icon_lm.svg"));
630
631 $this->getTabs();
632 $this->tpl->setTitle($this->object->getTitle());
633 }
634
638 public function getTabs()
639 {
641 $ilAccess = $this->access;
642 $ilTabs = $this->tabs;
644 $ilHelp = $this->help;
645
646 $ilHelp->setScreenIdComponent("htlm");
647
648 if ($ilAccess->checkAccess('write', '', $this->ref_id)) {
649 $ilTabs->addTab(
650 "id_list_files",
651 $lng->txt("cont_list_files"),
652 $this->ctrl->getLinkTargetByClass("ilfilesystemgui", "listFiles")
653 );
654 }
655
656 if ($ilAccess->checkAccess('visible', '', $this->ref_id)) {
657 $ilTabs->addTab(
658 "id_info",
659 $lng->txt("info_short"),
660 $this->ctrl->getLinkTargetByClass(array("ilobjfilebasedlmgui", "ilinfoscreengui"), "showSummary")
661 );
662 }
663
664 if ($ilAccess->checkAccess('write', '', $this->ref_id)) {
665 $ilTabs->addTab(
666 "id_settings",
667 $lng->txt("settings"),
668 $this->ctrl->getLinkTarget($this, "properties")
669 );
670 }
671
672 include_once './Services/Tracking/classes/class.ilLearningProgressAccess.php';
673 if (ilLearningProgressAccess::checkAccess($this->object->getRefId())) {
674 $ilTabs->addTab(
675 "id_learning_progress",
676 $lng->txt("learning_progress"),
677 $this->ctrl->getLinkTargetByClass(array('ilobjfilebasedlmgui','illearningprogressgui'), '')
678 );
679 }
680
681 if ($ilAccess->checkAccess('write', '', $this->ref_id)) {
682 include_once "Services/Object/classes/class.ilObjectMetaDataGUI.php";
683 $mdgui = new ilObjectMetaDataGUI($this->object);
684 $mdtab = $mdgui->getTab();
685 if ($mdtab) {
686 $ilTabs->addTab(
687 "id_meta_data",
688 $lng->txt("meta_data"),
689 $mdtab
690 );
691 }
692 }
693
694
695 // export
696 if ($ilAccess->checkAccess("write", "", $this->object->getRefId())) {
697 $ilTabs->addTab(
698 "export",
699 $lng->txt("export"),
700 $this->ctrl->getLinkTargetByClass("ilexportgui", "")
701 );
702 }
703
704 if ($ilAccess->checkAccess('edit_permission', '', $this->object->getRefId())) {
705 $ilTabs->addTab(
706 "id_permissions",
707 $lng->txt("perm_settings"),
708 $this->ctrl->getLinkTargetByClass(array(get_class($this),'ilpermissiongui'), "perm")
709 );
710 }
711
712 require_once("./Modules/HTMLLearningModule/classes/class.ilObjFileBasedLMAccess.php");
713 $startfile = ilObjFileBasedLMAccess::_determineStartUrl($this->object->getId());
714
715 if ($startfile != "") {
716 $ilTabs->addNonTabbedLink(
717 "presentation_view",
718 $this->lng->txt("glo_presentation_view"),
719 "ilias.php?baseClass=ilHTLMPresentationGUI&ref_id=" . $this->object->getRefID(),
720 "_blank"
721 );
722 }
723 }
724
730 public static function _goto($a_target)
731 {
732 global $DIC;
733
734 $rbacsystem = $DIC->rbac()->system();
735 $ilErr = $DIC["ilErr"];
736 $lng = $DIC->language();
737 $ilAccess = $DIC->access();
738
739 if ($ilAccess->checkAccess("read", "", $a_target) ||
740 $ilAccess->checkAccess("visible", "", $a_target)) {
741 ilObjectGUI::_gotoRepositoryNode($a_target, "infoScreen");
742 } elseif ($ilAccess->checkAccess("read", "", ROOT_FOLDER_ID)) {
743 ilUtil::sendFailure(sprintf(
744 $lng->txt("msg_no_perm_read_item"),
746 ), true);
748 }
749
750 $ilErr->raiseError($lng->txt("msg_no_perm_read_lm"), $ilErr->FATAL);
751 }
752
753 public function addLocatorItems()
754 {
755 $ilLocator = $this->locator;
756
757 if (is_object($this->object)) {
758 $ilLocator->addItem(
759 $this->object->getTitle(),
760 $this->ctrl->getLinkTargetByClass("ilinfoscreengui", "showSummary"),
761 "",
762 $_GET["ref_id"]
763 );
764 }
765 }
766
767
774 public function importFileObject($parent_id = null, $a_catch_errors = true)
775 {
776 try {
777 return parent::importFileObject();
779 // since there is no manifest xml we assume that this is an HTML export file
780 $this->createFromDirectory($e->getTmpDir());
781 }
782 }
783
790 public function createFromDirectory($a_dir)
791 {
793
794 if (!$this->checkPermissionBool("create", "", "htlm") || $a_dir == "") {
795 $ilErr->raiseError($this->lng->txt("no_create_permission"));
796 }
797
798 // create instance
799 $newObj = new ilObjFileBasedLM();
800 $filename = ilUtil::stripSlashes($_FILES["importfile"]["name"]);
801 $newObj->setTitle($filename);
802 $newObj->setDescription("");
803 $newObj->create();
804 $newObj->populateByDirectoy($a_dir, $filename);
805 $this->putObjectInTree($newObj);
806
807 $this->afterSave($newObj);
808 }
809
810
811
812
816
817
821 public function exportHTML()
822 {
823 $inst_id = IL_INST_ID;
824
825 include_once("./Services/Export/classes/class.ilExport.php");
826
828 $this->object->getId(),
829 "html",
830 $this->object->getType()
831 );
832 $export_dir = ilExport::_getExportDirectory(
833 $this->object->getId(),
834 "html",
835 $this->object->getType()
836 );
837
838 $subdir = $this->object->getType() . "_" . $this->object->getId();
839 $filename = $this->subdir . ".zip";
840
841 $target_dir = $export_dir . "/" . $subdir;
842
843 ilUtil::delDir($target_dir);
844 ilUtil::makeDir($target_dir);
845
846 $source_dir = $this->object->getDataDirectory();
847
848 ilUtil::rCopy($source_dir, $target_dir);
849
850 // zip it all
851 $date = time();
852 $zip_file = $export_dir . "/" . $date . "__" . IL_INST_ID . "__" .
853 $this->object->getType() . "_" . $this->object->getId() . ".zip";
854 ilUtil::zip($target_dir, $zip_file);
855
856 ilUtil::delDir($target_dir);
857 }
858
862 public function redirectAfterCreation()
863 {
865 $ctrl->setParameterByClass("ilObjFileBasedLMGUI", "ref_id", $this->object->getRefId());
866 $ctrl->redirectByClass(["ilrepositorygui", "ilObjFileBasedLMGUI"], "properties");
867 }
868}
user()
Definition: user.php:4
$filename
Definition: buildRTE.php:89
$_GET["client_id"]
$_POST["username"]
An exception for terminatinating execution or to throw for unit testing.
error($a_errmsg)
set error message @access public
This class represents a checkbox property in a property form.
static getInstanceFromAjaxCall()
(Re-)Build instance from ajax call
Export User Interface Class.
static _getExportDirectory($a_obj_id, $a_type="xml", $a_obj_type="", $a_entity="")
Get export directory for an repository object.
static _createExportDirectory($a_obj_id, $a_export_type="xml", $a_obj_type="")
File System Explorer GUI class.
static recursive_dirscan($dir, &$arr)
Recursively scans a given directory and writes path and filename into referenced array.
This class represents a section header in a property form.
Class ilInfoScreenGUI.
static checkAccess($a_ref_id, $a_allow_only_read=true)
check access to learning progress
Class ilObjUserTrackingGUI.
static _tracProgress($a_user_id, $a_obj_id, $a_ref_id, $a_obj_type='')
static getInstance()
Factory.
manifest.xml file not found-exception for import
This class represents a non editable value in a property form.
static _determineStartUrl($a_id)
determine start url
User Interface class for file based learning modules (HTML)
initCreationForms($a_new_type)
Init creation froms.
properties()
edit properties of object (admin form)
addLocatorItems()
should be overwritten to add object specific items (repository items are preloaded)
showInfoScreen()
info screen call from inside learning module
outputInfoScreen($a_standard_locator=true)
info screen
edit()
edit properties of object (module form)
exportHTML()
create html package
saveProperties()
Save properties form.
createFromDirectory($a_dir)
Create new object from a html zip file.
editObject()
edit properties of object (admin form)
initSettingsForm()
Init settings form.
importFileObject($parent_id=null, $a_catch_errors=true)
Import file.
infoScreen()
this one is called from the info button in the repository not very nice to set cmdClass/Cmd manually,...
__construct($a_data, $a_id=0, $a_call_by_reference=true, $a_prepare_output=true)
Constructor.
cancelCreationObject($in_rep=false)
cancel action and go back to previous page @access public
redirectAfterCreation()
Redirect after creation, see https://docu.ilias.de/goto_docu_wiki_wpage_5035_1357....
getTabs()
adds tabs to tab gui object
getSettingsFormValues()
Get current values for settings from.
static _goto($a_target)
redirect script
getTemplate()
output main header (title and locator)
frameset()
Frameset -> Output list of files.
afterSave(ilObject $newObj)
save object @access public
File Based Learning Module (HTML) object.
Class ilObjectGUI Basic methods of all Output classes.
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission and redirect on error.
initImportForm($a_new_type)
Init object import form.
putObjectInTree(ilObject $a_obj, $a_parent_node_id=null)
Add object to tree at given position.
prepareOutput($a_show_subobjects=true)
prepare output
initCreateForm($a_new_type)
Init object creation form.
static _gotoRepositoryNode($a_ref_id, $a_cmd="frameset")
Goto repository root.
cancelObject()
cancel action and go back to previous page @access public
static _gotoRepositoryRoot($a_raise_error=false)
Goto repository root.
getCreationMode()
get creation mode
checkPermissionBool($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission.
addHeaderAction()
Add header action menu.
setFormAction($a_cmd, $a_formaction)
set specific form action for command
setLocator()
set Locator
getObjectService()
Get object service.
updateObject()
updates object entry in object_data
Class ilObjectMetaDataGUI.
Class ilObject Basic functions for all objects.
static _lookupObjId($a_id)
const TITLE_LENGTH
max length of object title
update()
update object in db
static _lookupTitle($a_id)
lookup object title
getTitle()
get object title @access public
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
This class represents a property form user interface.
ILIAS Setting Class.
This class represents a text area property in a property form.
This class represents a text property in a property form.
static delDir($a_dir, $a_clean_only=false)
removes a dir and all its content (subdirs and files) recursively
static rCopy($a_sdir, $a_tdir, $preserveTimeAttributes=false)
Copies content of a directory $a_sdir recursively to a directory $a_tdir.
static redirect($a_script)
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
static zip($a_dir, $a_file, $compress_content=false)
zips given directory/file into given zip.file
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
static makeDir($a_dir)
creates a new directory and inherits all filesystem permissions of the parent directory You may pass ...
static signFolderOfStartFile($start_file_path)
$valid
global $ilCtrl
Definition: ilias.php:18
$info
Definition: index.php:5
$files
Definition: metarefresh.php:49
$ret
Definition: parser.php:6
global $DIC
Definition: saml.php:7
$values
$ilUser
Definition: imgupload.php:18