ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
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{
27
33 function __construct($a_data,$a_id = 0,$a_call_by_reference = true, $a_prepare_output = true)
34 {
35 global $lng, $ilCtrl;
36
37 $this->ctrl = $ilCtrl;
38 $this->ctrl->saveParameter($this, array("ref_id"));
39
40 $this->type = "htlm";
41 $lng->loadLanguageModule("content");
42
43 parent::__construct($a_data, $a_id, $a_call_by_reference, false);
44 //$this->actions = $this->objDefinition->getActions("mep");
45 $this->output_prepared = $a_prepare_output;
46
47 }
48
52 function executeCommand()
53 {
54 global $ilUser, $ilLocator, $ilTabs;
55
56 $next_class = $this->ctrl->getNextClass($this);
57 $cmd = $this->ctrl->getCmd();
58
59 if (strtolower($_GET["baseClass"]) == "iladministrationgui" ||
60 $this->getCreationMode() == true)
61 {
62 $this->prepareOutput();
63 }
64 else
65 {
66 if (!in_array($cmd, array("", "framset")) || $next_class != "")
67 {
68 $this->getTemplate();
69 $this->setLocator();
70 $this->setTabs();
71 }
72 }
73
74 switch($next_class)
75 {
76 case 'ilobjectmetadatagui':
77 $this->checkPermission("write");
78 $ilTabs->activateTab('id_meta_data');
79 include_once "Services/Object/classes/class.ilObjectMetaDataGUI.php";
80 $md_gui = new ilObjectMetaDataGUI($this->object);
81 $this->ctrl->forwardCommand($md_gui);
82 break;
83
84 case "ilfilesystemgui":
85 $this->checkPermission("write");
86 $ilTabs->activateTab('id_list_files');
87 $fs_gui = new ilFileSystemGUI($this->object->getDataDirectory());
88 $fs_gui->activateLabels(true, $this->lng->txt("cont_purpose"));
89 $fs_gui->setUseUploadDirectory(true);
90 $fs_gui->setTableId("htlmfs".$this->object->getId());
91 if ($this->object->getStartFile() != "")
92 {
93 $fs_gui->labelFile($this->object->getStartFile(),
94 $this->lng->txt("cont_startfile"));
95 }
96 $fs_gui->addCommand($this, "setStartFile", $this->lng->txt("cont_set_start_file"));
97
98 $this->ctrl->forwardCommand($fs_gui);
99
100 // try to set start file automatically
101 require_once("./Modules/HTMLLearningModule/classes/class.ilObjFileBasedLMAccess.php");
102 if (!ilObjFileBasedLMAccess::_determineStartUrl($this->object->getId()))
103 {
104 $do_update = false;
105
106 $pcommand = $fs_gui->getLastPerformedCommand();
107 if (is_array($pcommand))
108 {
109 $valid = array("index.htm", "index.html", "start.htm", "start.html");
110 if($pcommand["cmd"] == "create_file")
111 {
112 $file = strtolower(basename($pcommand["name"]));
113 if(in_array($file, $valid))
114 {
115 $this->object->setStartFile($pcommand["name"]);
116 $do_update = $pcommand["name"];
117 }
118 }
119 else if($pcommand["cmd"] == "unzip_file")
120 {
121 $zip_file = strtolower(basename($pcommand["name"]));
122 $suffix = strrpos($zip_file, ".");
123 if($suffix)
124 {
125 $zip_file = substr($zip_file, 0, $suffix);
126 }
127 foreach($pcommand["added"] as $file)
128 {
129 $chk_file = null;
130 if(stristr($file, ".htm"))
131 {
132 $chk_file = strtolower(basename($file));
133 $suffix = strrpos($chk_file, ".");
134 if($suffix)
135 {
136 $chk_file = substr($chk_file, 0, $suffix);
137 }
138 }
139 if(in_array(basename($file), $valid) ||
140 ($zip_file && $chk_file && $chk_file == $zip_file))
141 {
142 $this->object->setStartFile($file);
143 $do_update = $file;
144 break;
145 }
146 }
147 }
148 }
149
150 if($do_update)
151 {
152 ilUtil::sendInfo(sprintf($this->lng->txt("cont_start_file_set_to"), $do_update), true);
153
154 $this->object->update();
155 $this->ctrl->redirectByClass("ilfilesystemgui", "listFiles");
156 }
157 }
158 break;
159
160 case "ilinfoscreengui":
161 $ret = $this->outputInfoScreen();
162 break;
163
164 case "illearningprogressgui":
165 $ilTabs->activateTab('id_learning_progress');
166 include_once './Services/Tracking/classes/class.ilLearningProgressGUI.php';
168 $this->object->getRefId(),
169 $_GET['user_id'] ? $_GET['user_id'] : $ilUser->getId());
170 $this->ctrl->forwardCommand($new_gui);
171 break;
172
173 case 'ilpermissiongui':
174 $ilTabs->activateTab('id_permissions');
175 include_once("Services/AccessControl/classes/class.ilPermissionGUI.php");
176 $perm_gui = new ilPermissionGUI($this);
177 $ret = $this->ctrl->forwardCommand($perm_gui);
178 break;
179
180 case "ilexportgui":
181 $ilTabs->activateTab("export");
182 include_once("./Services/Export/classes/class.ilExportGUI.php");
183 $exp_gui = new ilExportGUI($this);
184 $exp_gui->addFormat("xml");
185 $exp_gui->addFormat("html", "", $this, "exportHTML");
186 $ret = $this->ctrl->forwardCommand($exp_gui);
187// $this->tpl->show();
188 break;
189
190 case "ilcommonactiondispatchergui":
191 include_once("Services/Object/classes/class.ilCommonActionDispatcherGUI.php");
193 $this->ctrl->forwardCommand($gui);
194 break;
195
196 default:
197 $cmd = $this->ctrl->getCmd("frameset");
198 if (strtolower($_GET["baseClass"]) == "iladministrationgui" ||
199 $this->getCreationMode() == true)
200 {
201 $cmd.= "Object";
202 }
203 $ret = $this->$cmd();
204 break;
205 }
206
207 $this->addHeaderAction();
208 }
209
210 protected function initCreationForms($a_new_type)
211 {
212 $forms = array(self::CFORM_NEW => $this->initCreateForm($a_new_type),
213 self::CFORM_IMPORT => $this->initImportForm($a_new_type));
214
215 return $forms;
216 }
217
223 final function cancelCreationObject($in_rep = false)
224 {
225 global $ilCtrl;
226
227 $ilCtrl->redirectByClass("ilrepositorygui", "frameset");
228 }
229
235 function properties()
236 {
237 global $rbacsystem, $tree, $tpl, $ilTabs;
238
239 $ilTabs->activateTab("id_settings");
240
241 $this->initSettingsForm();
242 $this->getSettingsFormValues();
243 $tpl->setContent($this->form->getHTML());
244 }
245
249 public function initSettingsForm()
250 {
251 global $lng, $ilCtrl, $ilAccess;
252
253 include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
254 $this->form = new ilPropertyFormGUI();
255
256 // title
257 $ti = new ilTextInputGUI($this->lng->txt("title"), "title");
258 $ti->setSize(min(40, ilObject::TITLE_LENGTH));
259 $ti->setMaxLength(ilObject::TITLE_LENGTH);
260 $ti->setRequired(true);
261 $this->form->addItem($ti);
262
263 // description
264 $ta = new ilTextAreaInputGUI($this->lng->txt("description"), "desc");
265 $ta->setCols(40);
266 $ta->setRows(2);
267 $this->form->addItem($ta);
268
269 // online
270 $cb = new ilCheckboxInputGUI($lng->txt("cont_online"), "cobj_online");
271 $cb->setOptionTitle($lng->txt(""));
272 $cb->setValue("y");
273 $this->form->addItem($cb);
274
275 // startfile
276 require_once("./Modules/HTMLLearningModule/classes/class.ilObjFileBasedLMAccess.php");
277 $startfile = ilObjFileBasedLMAccess::_determineStartUrl($this->object->getId());
278
279 $ne = new ilNonEditableValueGUI($lng->txt("cont_startfile"), "");
280 if ($startfile != "")
281 {
282 $ne->setValue(basename($startfile));
283 }
284 else
285 {
286 $ne->setValue(basename($this->lng->txt("no_start_file")));
287 }
288 $this->form->addItem($ne);
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
300 public function getSettingsFormValues()
301 {
302 require_once("./Modules/HTMLLearningModule/classes/class.ilObjFileBasedLMAccess.php");
303 $startfile = ilObjFileBasedLMAccess::_determineStartUrl($this->object->getId());
304
305 $values = array();
306 $values["cobj_online"] = $this->object->getOnline();
307 if ($startfile != "")
308 {
309 $startfile = basename($startfile);
310 }
311 else
312 {
313 $startfile = $this->lng->txt("no_start_file");
314 }
315
316 $values["cobj_online"] = $this->object->getOnline();
317 $values["startfile"] = $startfile;
318 $values["title"] = $this->object->getTitle();
319 $values["desc"] = $this->object->getDescription();
320 //$values["lic"] = $this->object->getShowLicense();
321
322 $this->form->setValuesByArray($values);
323 }
324
331 function toFilesystem()
332 {
333 global $ilCtrl;
334
335 $ilCtrl->redirectByClass("ilfilesystemgui", "listFiles");
336 }
337
341 public function saveProperties()
342 {
343 global $tpl, $ilAccess, $ilTabs;
344
345 $this->initSettingsForm("");
346 if ($this->form->checkInput())
347 {
348 $this->object->setTitle($this->form->getInput("title"));
349 $this->object->setDescription($this->form->getInput("desc"));
350 $this->object->setOnline(ilUtil::yn2tf($_POST["cobj_online"]));
351
352 $this->object->update();
353 ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"), true);
354 $this->ctrl->redirect($this, "properties");
355 }
356
357 $ilTabs->activateTab("id_settings");
358 $this->form->setValuesByPost();
359 $tpl->setContent($this->form->getHtml());
360 }
361
367 function editObject()
368 {
369 global $rbacsystem, $tree, $tpl;
370
371 if (!$rbacsystem->checkAccess("visible,write",$this->object->getRefId()))
372 {
373 $this->ilias->raiseError($this->lng->txt("permission_denied"),$this->ilias->error_obj->MESSAGE);
374 }
375
376 }
377
381 function edit()
382 {
383 $this->prepareOutput();
384 $this->editObject();
385 }
386
390 function cancel()
391 {
392 //$this->setReturnLocation("cancel","fblm_edit.php?cmd=listFiles&ref_id=".$_GET["ref_id"]);
393 $this->cancelObject();
394 }
395
400 function afterSave(ilObject $newObj)
401 {
402 if(!$newObj->getStartFile())
403 {
404 // try to set start file automatically
405 $files = array();
406 include_once "Services/Utilities/classes/class.ilFileUtils.php";
407 ilFileUtils::recursive_dirscan($newObj->getDataDirectory(), $files);
408 if(is_array($files["file"]))
409 {
410 $zip_file = null;
411 if(stristr($newObj->getTitle(), ".zip"))
412 {
413 $zip_file = strtolower($newObj->getTitle());
414 $suffix = strrpos($zip_file, ".");
415 if($suffix)
416 {
417 $zip_file = substr($zip_file, 0, $suffix);
418 }
419 }
420 $valid = array("index.htm", "index.html", "start.htm", "start.html");
421 foreach($files["file"] as $idx => $file)
422 {
423 $chk_file = null;
424 if(stristr($file, ".htm"))
425 {
426 $chk_file = strtolower($file);
427 $suffix = strrpos($chk_file, ".");
428 if($suffix)
429 {
430 $chk_file = substr($chk_file, 0, $suffix);
431 }
432 }
433 if(in_array($file, $valid) ||
434 ($chk_file && $zip_file && $chk_file == $zip_file))
435 {
436 $newObj->setStartFile(str_replace($newObj->getDataDirectory()."/", "", $files["path"][$idx]).$file);
437 $newObj->update();
438 break;
439 }
440 }
441 }
442 }
443
444 // always send a message
445 ilUtil::sendSuccess($this->lng->txt("object_added"),true);
446 ilUtil::redirect("ilias.php?baseClass=ilHTLMEditorGUI&ref_id=".$newObj->getRefId());
447 }
448
449
453 function update()
454 {
455 //$this->setReturnLocation("update", "fblm_edit.php?cmd=listFiles&ref_id=".$_GET["ref_id"].
456 // "&obj_id=".$_GET["obj_id"]);
457 $this->updateObject();
458 }
459
460
461 function setStartFile($a_file)
462 {
463 $this->object->setStartFile($a_file);
464 $this->object->update();
465 $this->ctrl->redirectByClass("ilfilesystemgui", "listFiles");
466 }
467
471 function perm()
472 {
473 $this->setFormAction("permSave", "fblm_edit.php?cmd=permSave&ref_id=".$_GET["ref_id"].
474 "&obj_id=".$_GET["obj_id"]);
475 $this->setFormAction("addRole", "fblm_edit.php?ref_id=".$_GET["ref_id"].
476 "&obj_id=".$_GET["obj_id"]."&cmd=addRole");
477 $this->permObject();
478 }
479
480
484 function frameset()
485 {
486 global $ilCtrl;
487
488 $ilCtrl->setCmdClass("ilfilesystemgui");
489 $ilCtrl->setCmd("listFiles");
490 return $this->executeCommand();
491 }
492
496 function getTemplate()
497 {
498 global $lng;
499
500 $this->tpl->getStandardTemplate();
501 }
502
504 {
505 global $ilUser;
506
507 // #9483
508 if ($ilUser->getId() != ANONYMOUS_USER_ID)
509 {
510 include_once "Services/Tracking/classes/class.ilLearningProgress.php";
511 ilLearningProgress::_tracProgress($ilUser->getId(), $this->object->getId(),
512 $this->object->getRefId(), "htlm");
513 }
514
515 require_once("./Modules/HTMLLearningModule/classes/class.ilObjFileBasedLMAccess.php");
516 require_once('./Services/WebAccessChecker/classes/class.ilWACSignedPath.php');
517
518 $startfile = ilObjFileBasedLMAccess::_determineStartUrl($this->object->getId());
520 if ($startfile != "")
521 {
522 ilUtil::redirect($startfile);
523 }
524 }
525
526 // InfoScreen methods
532 function infoScreen()
533 {
534 $this->ctrl->setCmd("showSummary");
535 $this->ctrl->setCmdClass("ilinfoscreengui");
536 $this->outputInfoScreen();
537 }
538
542 function showInfoScreen()
543 {
544 $this->outputInfoScreen(true);
545 }
546
550 function outputInfoScreen($a_standard_locator = true)
551 {
552 global $ilToolbar, $ilAccess, $ilTabs;
553
554 $ilTabs->activateTab('id_info');
555
556 $this->lng->loadLanguageModule("meta");
557 include_once("./Services/InfoScreen/classes/class.ilInfoScreenGUI.php");
558
559 $info = new ilInfoScreenGUI($this);
560 $info->enablePrivateNotes();
561 $info->enableLearningProgress();
562
563 $info->enableNews();
564 if ($ilAccess->checkAccess("write", "", $_GET["ref_id"]))
565 {
566 $info->enableNewsEditing();
567
568 $news_set = new ilSetting("news");
569 $enable_internal_rss = $news_set->get("enable_rss_for_internal");
570 if ($enable_internal_rss)
571 {
572 $info->setBlockProperty("news", "settings", true);
573 }
574 }
575
576 // add read / back button
577 if ($ilAccess->checkAccess("read", "", $_GET["ref_id"]))
578 {
579 // #15127
580 include_once "Services/UIComponent/Button/classes/class.ilLinkButton.php";
581 $button = ilLinkButton::getInstance();
582 $button->setCaption("view");
583 $button->setPrimary(true);
584 $button->setUrl("ilias.php?baseClass=ilHTLMPresentationGUI&ref_id=".$this->object->getRefID());
585 $button->setTarget("ilContObj".$this->object->getId());
586 $ilToolbar->addButtonInstance($button);
587 }
588
589 // show standard meta data section
590 $info->addMetaDataSections($this->object->getId(),0, $this->object->getType());
591
592 // forward the command
593 $this->ctrl->forwardCommand($info);
594 }
595
596
597
601 function setTabs()
602 {
603 $this->tpl->setTitleIcon(ilUtil::getImagePath("icon_lm.svg"));
604
605 $this->getTabs();
606 $this->tpl->setTitle($this->object->getTitle());
607 }
608
612 function getTabs()
613 {
614 global $ilUser, $ilAccess, $ilTabs, $lng, $ilHelp;
615
616 $ilHelp->setScreenIdComponent("htlm");
617
618 if($ilAccess->checkAccess('write', '', $this->ref_id))
619 {
620 $ilTabs->addTab("id_list_files",
621 $lng->txt("cont_list_files"),
622 $this->ctrl->getLinkTargetByClass("ilfilesystemgui", "listFiles"));
623 }
624
625 if($ilAccess->checkAccess('visible', '', $this->ref_id))
626 {
627 $ilTabs->addTab("id_info",
628 $lng->txt("info_short"),
629 $this->ctrl->getLinkTargetByClass(array("ilobjfilebasedlmgui", "ilinfoscreengui"), "showSummary"));
630 }
631
632 if($ilAccess->checkAccess('write', '', $this->ref_id))
633 {
634 $ilTabs->addTab("id_settings",
635 $lng->txt("settings"),
636 $this->ctrl->getLinkTarget($this, "properties"));
637 }
638
639 include_once './Services/Tracking/classes/class.ilLearningProgressAccess.php';
640 if(ilLearningProgressAccess::checkAccess($this->object->getRefId()))
641 {
642 $ilTabs->addTab("id_learning_progress",
643 $lng->txt("learning_progress"),
644 $this->ctrl->getLinkTargetByClass(array('ilobjfilebasedlmgui','illearningprogressgui'), ''));
645 }
646
647 if($ilAccess->checkAccess('write', '', $this->ref_id))
648 {
649 include_once "Services/Object/classes/class.ilObjectMetaDataGUI.php";
650 $mdgui = new ilObjectMetaDataGUI($this->object);
651 $mdtab = $mdgui->getTab();
652 if($mdtab)
653 {
654 $ilTabs->addTab("id_meta_data",
655 $lng->txt("meta_data"),
656 $mdtab);
657 }
658
659 }
660
661
662 // export
663 if ($ilAccess->checkAccess("write", "", $this->object->getRefId()))
664 {
665 $ilTabs->addTab("export",
666 $lng->txt("export"),
667 $this->ctrl->getLinkTargetByClass("ilexportgui", ""));
668 }
669
670 if ($ilAccess->checkAccess('edit_permission', '', $this->object->getRefId()))
671 {
672 $ilTabs->addTab("id_permissions",
673 $lng->txt("perm_settings"),
674 $this->ctrl->getLinkTargetByClass(array(get_class($this),'ilpermissiongui'), "perm"));
675 }
676
677 require_once("./Modules/HTMLLearningModule/classes/class.ilObjFileBasedLMAccess.php");
678 $startfile = ilObjFileBasedLMAccess::_determineStartUrl($this->object->getId());
679
680 if ($startfile != "")
681 {
682 $ilTabs->addNonTabbedLink("presentation_view",
683 $this->lng->txt("glo_presentation_view"),
684 "ilias.php?baseClass=ilHTLMPresentationGUI&ref_id=".$this->object->getRefID(),
685 "_blank"
686 );
687 }
688
689 }
690
696 public static function _goto($a_target)
697 {
698 global $rbacsystem, $ilErr, $lng, $ilAccess;
699
700 if ($ilAccess->checkAccess("read", "", $a_target) ||
701 $ilAccess->checkAccess("visible", "", $a_target))
702 {
703 ilObjectGUI::_gotoRepositoryNode($a_target, "infoScreen");
704 }
705 else if ($ilAccess->checkAccess("read", "", ROOT_FOLDER_ID))
706 {
707 ilUtil::sendFailure(sprintf($lng->txt("msg_no_perm_read_item"),
710 }
711
712 $ilErr->raiseError($lng->txt("msg_no_perm_read_lm"), $ilErr->FATAL);
713 }
714
716 {
717 global $ilLocator;
718
719 if (is_object($this->object))
720 {
721 $ilLocator->addItem($this->object->getTitle(),
722 $this->ctrl->getLinkTargetByClass("ilinfoscreengui", "showSummary"), "", $_GET["ref_id"]);
723 }
724 }
725
726
733 function importFileObject($parent_id = null, $a_catch_errors = true)
734 {
735 try
736 {
737 return parent::importFileObject();
738 }
740 {
741 // since there is no manifest xml we assume that this is an HTML export file
742 $this->createFromDirectory($e->getTmpDir());
743 }
744 }
745
752 function createFromDirectory($a_dir)
753 {
754 global $ilErr;
755
756 if (!$this->checkPermissionBool("create", "", "htlm") || $a_dir == "")
757 {
758 $ilErr->raiseError($this->lng->txt("no_create_permission"));
759 }
760
761 // create instance
762 $newObj = new ilObjFileBasedLM();
763 $filename = ilUtil::stripSlashes($_FILES["importfile"]["name"]);
764 $newObj->setTitle($filename);
765 $newObj->setDescription("");
766 $newObj->create();
767 $newObj->populateByDirectoy($a_dir, $filename);
768 $this->putObjectInTree($newObj);
769
770 $this->afterSave($newObj);
771 }
772
773
774
775
779
780
784 function exportHTML()
785 {
786 $inst_id = IL_INST_ID;
787
788 include_once("./Services/Export/classes/class.ilExport.php");
789
790 ilExport::_createExportDirectory($this->object->getId(), "html",
791 $this->object->getType());
792 $export_dir = ilExport::_getExportDirectory($this->object->getId(), "html",
793 $this->object->getType());
794
795 $subdir = $this->object->getType()."_".$this->object->getId();
796 $filename = $this->subdir.".zip";
797
798 $target_dir = $export_dir."/".$subdir;
799
800 ilUtil::delDir($target_dir);
801 ilUtil::makeDir($target_dir);
802
803 $source_dir = $this->object->getDataDirectory();
804
805 ilUtil::rCopy($source_dir, $target_dir);
806
807 // zip it all
808 $date = time();
809 $zip_file = $export_dir."/".$date."__".IL_INST_ID."__".
810 $this->object->getType()."_".$this->object->getId().".zip";
811 ilUtil::zip($target_dir, $zip_file);
812
813 ilUtil::delDir($target_dir);
814 }
815
816}
817?>
sprintf('%.4f', $callTime)
$files
Definition: add-vimline.php:18
$_GET["client_id"]
$_POST["username"]
An exception for terminatinating execution or to throw for unit testing.
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.
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)
check wether learning module is online
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
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
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
getRefId()
get reference id @access public
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 sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
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)
http redirect to other script
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
static zip($a_dir, $a_file, $compress_content=false)
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
static yn2tf($a_yn)
convert "y"/"n" to true/false
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, ilWACCookieInterface $ilWACCookieInterface=null)
$valid
$info
Definition: example_052.php:80
global $ilCtrl
Definition: ilias.php:18
redirection script todo: (a better solution should control the processing via a xml file)
$ret
Definition: parser.php:6
global $ilErr
Definition: raiseError.php:16
if(!file_exists("$old.txt")) if( $old===$new) if(file_exists("$new.txt")) $file
$cmd
Definition: sahs_server.php:35
$ilUser
Definition: imgupload.php:18