ILIAS  release_9 Revision v9.13-25-g2c18ec4c24f
class.ilObjFileBasedLMGUI.php
Go to the documentation of this file.
1 <?php
2 
20 
29 {
30  protected \ILIAS\HTMLLearningModule\InternalGUIService $gui;
33  protected ilTabsGUI $tabs;
34  protected ilHelpGUI $help;
35  public bool $output_prepared;
36 
37  public function __construct(
38  $a_data,
39  int $a_id = 0,
40  bool $a_call_by_reference = true,
41  bool $a_prepare_output = true
42  ) {
43  global $DIC;
44 
45  $this->lng = $DIC->language();
46  $this->user = $DIC->user();
47  $this->locator = $DIC["ilLocator"];
48  $this->tabs = $DIC->tabs();
49  $this->tree = $DIC->repositoryTree();
50  $this->tpl = $DIC["tpl"];
51  $this->access = $DIC->access();
52  $this->toolbar = $DIC->toolbar();
53  $this->help = $DIC["ilHelp"];
54  $lng = $DIC->language();
55  $ilCtrl = $DIC->ctrl();
56 
57  $this->ctrl = $ilCtrl;
58  $this->ctrl->saveParameter($this, array("ref_id"));
59 
60  $this->lm_request = $DIC->htmlLearningModule()
61  ->internal()
62  ->gui()
63  ->standardRequest();
64 
65  $this->type = "htlm";
66  $lng->loadLanguageModule("content");
67  $lng->loadLanguageModule("obj");
68 
69  parent::__construct($a_data, $a_id, $a_call_by_reference, false);
70  $this->output_prepared = $a_prepare_output;
71  $this->gui = $DIC->htmlLearningModule()->internal()->gui();
72  }
73 
74  public function executeCommand(): void
75  {
76  $ilUser = $this->user;
77  $ilTabs = $this->tabs;
78 
79  $next_class = $this->ctrl->getNextClass($this);
80  $cmd = $this->ctrl->getCmd();
81 
82  if (
83  $this->getCreationMode() === true ||
84  strtolower($this->lm_request->getBaseClass()) === "iladministrationgui"
85  ) {
86  $this->prepareOutput();
87  } elseif (!in_array($cmd, array("", "framset")) || $next_class != "") {
88  $this->getTemplate();
89  $this->setLocator();
90  $this->setTabs();
91  }
92 
93  switch ($next_class) {
94  case 'ilobjectmetadatagui':
95  $this->checkPermission("write");
96  $ilTabs->activateTab('id_meta_data');
97  $md_gui = new ilObjectMetaDataGUI($this->object);
98  $this->ctrl->forwardCommand($md_gui);
99  break;
100 
101  case "ilfilesystemgui":
102  $this->checkPermission("write");
103  $ilTabs->activateTab('id_list_files');
104  $fs_gui = new ilFileSystemGUI($this->object->getDataDirectory());
105  $fs_gui->activateLabels(true, $this->lng->txt("cont_purpose"));
106  $fs_gui->setUseUploadDirectory(true);
107  $fs_gui->setTableId("htlmfs" . $this->object->getId());
108  if ($this->object->getStartFile() !== "") {
109  $fs_gui->labelFile(
110  (string) $this->object->getStartFile(),
111  $this->lng->txt("cont_startfile")
112  );
113  }
114  $fs_gui->addCommand($this, "setStartFile", $this->lng->txt("cont_set_start_file"));
115 
116  $this->ctrl->forwardCommand($fs_gui);
117 
118  // try to set start file automatically
119  /* this does not work anymore, see #33348
120  if (!ilObjFileBasedLMAccess::_determineStartUrl($this->object->getId())) {
121  $do_update = false;
122 
123  $pcommand = $fs_gui->getLastPerformedCommand();
124  $last_cmd = $pcommand["cmd"] ?? "";
125  $valid = array("index.htm", "index.html", "start.htm", "start.html");
126  if ($last_cmd === "create_file") {
127  $file = strtolower(basename($pcommand["name"]));
128  if (in_array($file, $valid)) {
129  $this->object->setStartFile($pcommand["name"]);
130  $do_update = $pcommand["name"];
131  }
132  } elseif ($last_cmd === "unzip_file") {
133  $zip_file = strtolower(basename($pcommand["name"]));
134  $suffix = strrpos($zip_file, ".");
135  if ($suffix) {
136  $zip_file = substr($zip_file, 0, $suffix);
137  }
138  foreach ($pcommand["added"] as $file) {
139  $chk_file = null;
140  if (stripos($file, ".htm") !== false) {
141  $chk_file = strtolower(basename($file));
142  $suffix = strrpos($chk_file, ".");
143  if ($suffix) {
144  $chk_file = substr($chk_file, 0, $suffix);
145  }
146  }
147  if (in_array(basename($file), $valid) ||
148  ($zip_file && $chk_file && $chk_file == $zip_file)) {
149  $this->object->setStartFile($file);
150  $do_update = $file;
151  break;
152  }
153  }
154  }
155 
156  if ($do_update) {
157  $this->tpl->setOnScreenMessage('info', sprintf($this->lng->txt("cont_start_file_set_to"), $do_update), true);
158 
159  $this->object->update();
160  $this->ctrl->redirectByClass("ilfilesystemgui", "listFiles");
161  }
162  }*/
163  break;
164 
165  case "ilinfoscreengui":
166  $this->showInfoScreen();
167  break;
168 
169  case "illearningprogressgui":
170  $ilTabs->activateTab('id_learning_progress');
171  $user_id = ($this->lm_request->getUserId() > 0)
172  ? $this->lm_request->getUserId()
173  : $ilUser->getId();
174  $new_gui = new ilLearningProgressGUI(
176  $this->object->getRefId(),
177  $user_id
178  );
179  $this->ctrl->forwardCommand($new_gui);
180  break;
181 
182  case 'ilpermissiongui':
183  $ilTabs->activateTab('id_permissions');
184  $perm_gui = new ilPermissionGUI($this);
185  $ret = $this->ctrl->forwardCommand($perm_gui);
186  break;
187 
188  case "ilexportgui":
189  $ilTabs->activateTab("export");
190  $exp_gui = new ilExportGUI($this);
191  $exp_gui->addFormat("xml");
192  $exp_gui->addFormat("html", "", $this, "exportHTML");
193  $ret = $this->ctrl->forwardCommand($exp_gui);
194  break;
195 
196  case "ilcommonactiondispatchergui":
198  $this->ctrl->forwardCommand($gui);
199  break;
200 
201  default:
202  $cmd = $this->ctrl->getCmd("listFiles");
203  if (
204  $this->getCreationMode() === true ||
205  strtolower($this->lm_request->getBaseClass()) === "iladministrationgui"
206  ) {
207  $cmd .= "Object";
208  }
209  $ret = $this->$cmd();
210  break;
211  }
212 
213  $this->addHeaderAction();
214  }
215 
216  protected function initCreationForms(string $new_type): array
217  {
218  return [
219  self::CFORM_NEW => $this->initCreateForm($new_type),
220  self::CFORM_IMPORT => $this->initImportForm($new_type)
221  ];
222  }
223 
224  final public function cancelCreationObject(): void
225  {
226  $ilCtrl = $this->ctrl;
227 
228  $ilCtrl->redirectByClass("ilrepositorygui", "frameset");
229  }
230 
231  public function properties(): void
232  {
233  if (!$this->checkPermissionBool("write")) {
234  $this->error->raiseError($this->lng->txt("permission_denied"), $this->error->MESSAGE);
235  }
236 
237  $tpl = $this->tpl;
238  $ilTabs = $this->tabs;
239 
240  $ilTabs->activateTab("id_settings");
241 
242  $this->initSettingsForm();
243  $this->getSettingsFormValues();
244  $tpl->setContent($this->form->getHTML());
245  }
246 
247  public function initSettingsForm(): void
248  {
249  $obj_service = $this->getObjectService();
250  $lng = $this->lng;
251  $ilCtrl = $this->ctrl;
252 
253  $this->form = new ilPropertyFormGUI();
254 
255  // title
256  $ti = new ilTextInputGUI($this->lng->txt("title"), "title");
257  $ti->setSize(min(40, ilObject::TITLE_LENGTH));
258  $ti->setMaxLength(ilObject::TITLE_LENGTH);
259  $ti->setRequired(true);
260  $this->form->addItem($ti);
261 
262  // description
263  $ta = new ilTextAreaInputGUI($this->lng->txt("description"), "desc");
264  $ta->setCols(40);
265  $ta->setRows(2);
266  $this->form->addItem($ta);
267 
268  // online
269  $cb = new ilCheckboxInputGUI($lng->txt("cont_online"), "cobj_online");
270  $cb->setOptionTitle($lng->txt(""));
271  $cb->setValue("y");
272  $this->form->addItem($cb);
273 
274  // startfile
275  $startfile = ilObjFileBasedLMAccess::_determineStartUrl($this->object->getId());
276 
277  $ne = new ilNonEditableValueGUI($lng->txt("cont_startfile"), "");
278  if ($startfile !== "") {
279  $ne->setValue(basename($startfile));
280  } else {
281  $ne->setValue(basename($this->lng->txt("no_start_file")));
282  }
283  $this->form->addItem($ne);
284 
285  $pres = new ilFormSectionHeaderGUI();
286  $pres->setTitle($this->lng->txt('obj_presentation'));
287  $this->form->addItem($pres);
288 
289  // tile image
290  $obj_service->commonSettings()->legacyForm($this->form, $this->object)->addTileImage();
291 
292  $this->form->addCommandButton("saveProperties", $lng->txt("save"));
293  $this->form->addCommandButton("toFilesystem", $lng->txt("cont_set_start_file"));
294 
295  $this->form->setTitle($lng->txt("cont_lm_properties"));
296  $this->form->setFormAction($ilCtrl->getFormAction($this, "saveProperties"));
297 
298  // additional features
299  $section = new ilFormSectionHeaderGUI();
300  $section->setTitle($this->lng->txt('obj_features'));
301  $this->form->addItem($section);
302 
304  $this->object->getId(),
305  $this->form,
306  [
308  ]
309  );
310  }
311 
312  public function getSettingsFormValues(): void
313  {
314  $startfile = ilObjFileBasedLMAccess::_determineStartUrl($this->object->getId());
315 
316  $values = array();
317  $values['cobj_online'] = !$this->object->getOfflineStatus();
318  if ($startfile !== "") {
319  $startfile = basename($startfile);
320  } else {
321  $startfile = $this->lng->txt("no_start_file");
322  }
323 
324  $values["startfile"] = $startfile;
325  $values["title"] = $this->object->getTitle();
326  $values["desc"] = $this->object->getLongDescription();
327  $values["cont_show_info_tab"] = $this->object->isInfoEnabled();
328 
329  $this->form->setValuesByArray($values);
330  }
331 
332  public function toFilesystem(): void
333  {
334  $ilCtrl = $this->ctrl;
335  $ilCtrl->redirectByClass("ilfilesystemgui", "listFiles");
336  }
337 
338  public function saveProperties(): void
339  {
340  if (!$this->checkPermissionBool("write")) {
341  $this->error->raiseError($this->lng->txt("permission_denied"), $this->error->MESSAGE);
342  }
343 
344  $tpl = $this->tpl;
345  $ilTabs = $this->tabs;
346  $obj_service = $this->getObjectService();
347 
348  $this->initSettingsForm();
349  if ($this->form->checkInput()) {
350  $this->object->setTitle($this->form->getInput("title"));
351  $this->object->setDescription($this->form->getInput("desc"));
352  $this->object->setOfflineStatus(!(bool) $this->form->getInput("cobj_online"));
353 
354  $this->object->update();
355 
356  // tile image
357  $obj_service->commonSettings()->legacyForm($this->form, $this->object)->saveTileImage();
358 
359  // services
361  $this->object->getId(),
362  $this->form,
363  array(
365  )
366  );
367 
368  $this->tpl->setOnScreenMessage('success', $this->lng->txt("msg_obj_modified"), true);
369  $this->ctrl->redirect($this, "properties");
370  }
371 
372  $ilTabs->activateTab("id_settings");
373  $this->form->setValuesByPost();
374  $tpl->setContent($this->form->getHTML());
375  }
376 
377  public function editObject(): void
378  {
379  if (!$this->rbac_system->checkAccess("visible,write", $this->object->getRefId())) {
380  throw new ilPermissionException($this->lng->txt("permission_denied"));
381  }
382  }
383 
384  public function edit(): void
385  {
386  $this->prepareOutput();
387  $this->editObject();
388  }
389 
390  public function cancel(): void
391  {
392  $this->cancelObject();
393  }
394 
395  protected function afterSave(ilObject $new_object): void
396  {
397  if (!$new_object->getStartFile()) {
398  // try to set start file automatically
399  $files = array();
400  ilFileUtils::recursive_dirscan($new_object->getDataDirectory(), $files);
401  if (isset($files["file"])) {
402  $zip_file = null;
403  if (stripos($new_object->getTitle(), ".zip") !== false) {
404  $zip_file = strtolower($new_object->getTitle());
405  $suffix = strrpos($zip_file, ".");
406  if ($suffix) {
407  $zip_file = substr($zip_file, 0, $suffix);
408  }
409  }
410  $valid = array("index.htm", "index.html", "start.htm", "start.html");
411  foreach ($files["file"] as $idx => $file) {
412  $chk_file = null;
413  if (stripos($file, ".htm") !== false) {
414  $chk_file = strtolower($file);
415  $suffix = strrpos($chk_file, ".");
416  if ($suffix) {
417  $chk_file = substr($chk_file, 0, $suffix);
418  }
419  }
420  if (in_array($file, $valid) ||
421  ($chk_file && $zip_file && $chk_file == $zip_file)) {
422  $new_object->setStartFile(str_replace($new_object->getDataDirectory() . "/", "", $files["path"][$idx]) . $file);
423  $new_object->update();
424  break;
425  }
426  }
427  }
428  }
429 
430  // always send a message
431  $this->tpl->setOnScreenMessage('success', $this->lng->txt("object_added"), true);
432  $this->object = $new_object;
433  $this->redirectAfterCreation();
434  }
435 
436  public function update(): void
437  {
438  $this->updateObject();
439  }
440 
441  public function setStartFile(string $a_file): void
442  {
443  if (!$this->checkPermissionBool("write")) {
444  $this->error->raiseError($this->lng->txt("permission_denied"), $this->error->MESSAGE);
445  }
446  $this->object->setStartFile($a_file);
447  $this->object->update();
448  $this->ctrl->redirectByClass("ilfilesystemgui", "listFiles");
449  }
450 
451  public function getTemplate(): void
452  {
453  $this->tpl->loadStandardTemplate();
454  }
455 
456  public function showLearningModule(): void
457  {
458  $ilUser = $this->user;
459 
460  // #9483
461  if ($ilUser->getId() !== ANONYMOUS_USER_ID) {
463  $ilUser->getId(),
464  $this->object->getId(),
465  $this->object->getRefId(),
466  "htlm"
467  );
468 
469  ilLPStatusWrapper::_updateStatus($this->object->getId(), $ilUser->getId());
470  }
471 
472  $startfile = ilObjFileBasedLMAccess::_determineStartUrl($this->object->getId());
474  if ($startfile !== "") {
475  ilUtil::redirect($startfile);
476  }
477  }
478 
482  public function infoScreen(): void
483  {
484  $this->ctrl->setCmd("showSummary");
485  $this->ctrl->setCmdClass("ilinfoscreengui");
486  $this->showInfoScreen();
487  }
488 
489  public function showInfoScreen(): void
490  {
491  $ilToolbar = $this->toolbar;
492  $ilAccess = $this->access;
493  $ilTabs = $this->tabs;
494 
495  $ilTabs->activateTab('id_info');
496 
497  $this->lng->loadLanguageModule("meta");
498 
499  $info = new ilInfoScreenGUI($this);
500  $info->enablePrivateNotes();
501  $info->enableLearningProgress();
502 
503  $info->enableNews();
504  if ($ilAccess->checkAccess("write", "", $this->requested_ref_id)) {
505  $info->enableNewsEditing();
506 
507  $news_set = new ilSetting("news");
508  $enable_internal_rss = $news_set->get("enable_rss_for_internal");
509  if ($enable_internal_rss) {
510  $info->setBlockProperty("news", "settings", true);
511  }
512  }
513 
514  // add read / back button
515  if ($ilAccess->checkAccess("read", "", $this->requested_ref_id)) {
516  // #15127
517  $this->gui->link(
518  $this->lng->txt("view"),
519  "ilias.php?baseClass=ilHTLMPresentationGUI&ref_id=" . $this->object->getRefId(),
520  true
521  )->primary()->toToolbar();
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;
541  $lng = $this->lng;
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  "",
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  {
730  $ctrl = $this->ctrl;
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  {
743  $this->redrawHeaderActionObject();
744  }
745 }
redrawHeaderActionObject()
Ajax call: redraw action header only.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
activateLabels(bool $a_act, string $a_label_header)
Class ilInfoScreenGUI.
redirectByClass( $a_class, string $a_cmd=null, string $a_anchor=null, bool $is_async=false)
initImportForm(string $new_type)
__construct( $a_data, int $a_id=0, bool $a_call_by_reference=true, bool $a_prepare_output=true)
const IL_INST_ID
Definition: constants.php:40
const ANONYMOUS_USER_ID
Definition: constants.php:27
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
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...
cancelObject()
cancel action and go back to previous page
const ROOT_FOLDER_ID
Definition: constants.php:32
static _goto(string $a_target)
const TITLE_LENGTH
prepareOutput(bool $show_sub_objects=true)
static stripSlashes(string $a_str, bool $a_strip_html=true, string $a_allow="")
Help GUI class.
$valid
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static _gotoRepositoryNode(int $ref_id, string $cmd="")
setParameterByClass(string $a_class, string $a_parameter, $a_value)
static rCopy(string $a_sdir, string $a_tdir, bool $preserveTimeAttributes=false)
Copies content of a directory $a_sdir recursively to a directory $a_tdir.
loadLanguageModule(string $a_module)
Load language module.
static updateServiceSettingsForm(int $obj_id, ilPropertyFormGUI $form, array $services)
static checkAccess(int $a_ref_id, bool $a_allow_only_read=true)
check access to learning progress
static _getExportDirectory(int $a_obj_id, string $a_type="xml", string $a_obj_type="", string $a_entity="")
Get export directory for an repository object.
infoScreen()
this one is called from the info button in the repository
static _lookupObjId(int $ref_id)
afterSave(ilObject $new_object)
static _tracProgress(int $a_user_id, int $a_obj_id, int $a_ref_id, string $a_obj_type='')
global $DIC
Definition: feed.php:28
StandardGUIRequest $lm_request
Export User Interface Class.
ilLanguage $lng
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
ILIAS HTMLLearningModule InternalGUIService $gui
afterImport(ilObject $new_object)
__construct(VocabulariesInterface $vocabularies)
ilGlobalTemplateInterface $tpl
static _lookupTitle(int $obj_id)
setContent(string $a_html)
Sets content for standard template.
static signFolderOfStartFile(string $start_file_path)
static recursive_dirscan(string $dir, array &$arr)
Recursively scans a given directory and writes path and filename into referenced array.
setScreenIdComponent(string $a_comp)
static _createExportDirectory(int $a_obj_id, string $a_export_type="xml", string $a_obj_type="")
Class ilObjectGUI Basic methods of all Output classes.
static delDir(string $a_dir, bool $a_clean_only=false)
removes a dir and all its content (subdirs and files) recursively
ilToolbarGUI $toolbar
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static initServiceSettingsForm(int $obj_id, ilPropertyFormGUI $form, array $services)
$filename
Definition: buildRTE.php:78
checkPermissionBool(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
static redirect(string $a_script)
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...
activateTab(string $a_id)
form( $class_path, string $cmd, string $submit_caption="")
initCreateForm(string $new_type)
This class represents a text area property in a property form.
ilAccessHandler $access
static zip(string $a_dir, string $a_file, bool $compress_content=false)
addItem(string $a_title, string $a_link, string $a_frame="", int $a_ref_id=0, ?string $type=null)
User Interface class for file based learning modules (HTML)
updateObject()
updates object entry in object_data
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
File System Explorer GUI class.
importFileObject(int $parent_id=null)
addHeaderAction()
Add header action menu.
ilLocatorGUI $locator
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
checkPermission(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
static getInstanceFromAjaxCall()
(Re-)Build instance from ajax call
static makeDir(string $a_dir)
creates a new directory and inherits all filesystem permissions of the parent directory You may pass ...
static _gotoRepositoryRoot(bool $raise_error=false)
Goto repository root.
static _updateStatus(int $a_obj_id, int $a_usr_id, ?object $a_obj=null, bool $a_percentage=false, bool $a_force_raise=false)
initCreationForms(string $new_type)