ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
class.EditSubObjectsGUI.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
22
26use ilLMObject;
30
32{
33 protected string $lang;
34 protected array $page_layouts;
36 protected int $lm_id;
37 protected \ilLMTree $lm_tree;
38 protected int $sub_obj_id;
39
40 public function __construct(
41 protected InternalDomainService $domain,
42 protected InternalGUIService $gui,
43 protected string $sub_type,
44 protected \ilObjLearningModule $lm,
45 protected string $table_title
46 ) {
47 $this->sub_obj_id = $this->gui->editing()->request()->getObjId();
48 $this->gui->ctrl()->saveParameterByClass(self::class, "sub_type");
49 $this->lm_id = $lm->getId();
50 $this->lm_tree = $this->domain->lmTree($this->lm_id);
51 $this->request = $this->gui->editing()->request();
52 $this->page_layouts = \ilPageLayout::activeLayouts(
54 );
55 $this->lang = $this->request->getTranslation();
56 $this->gui->initFetch();
57 }
58
59 public function executeCommand(): void
60 {
61 $ctrl = $this->gui->ctrl();
62 $next_class = $ctrl->getNextClass($this);
63 $cmd = $ctrl->getCmd("list");
64
65 switch ($next_class) {
66 default:
67 if (in_array($cmd, [
68 "list", "tableCommand", "editPages",
69 "insertChapterAfter", "insertChapterBefore", "insertFirstChapter",
70 "insertPageAfter", "insertPageBefore", "insertFirstPage",
71 "editTitle", "saveTitle", "saveOrder",
72 "confirmedDelete", "delete", "cancelDelete",
73 "insertPageClip", "insertPageClipBefore", "insertPageClipAfter",
74 "insertChapterClip", "insertChapterClipBefore", "insertChapterClipAfter",
75 "activatePages",
76 "insertLayoutBefore", "insertLayoutAfter", "insertPageFromLayout",
77 "switchToLanguage", "editMasterLanguage"
78 ])) {
79 $this->$cmd();
80 }
81 }
82 }
83
84 protected function editPages(): void
85 {
86 $this->gui->ctrl()->setParameterByClass(self::class, "sub_type", "pg");
87 $this->gui->ctrl()->redirectByClass(static::class, "list");
88 }
89
90 protected function getTable(): TableAdapterGUI
91 {
92 return $this->gui->editing()->subObjectTableBuilder(
93 $this->table_title,
94 $this->lm_id,
95 $this->sub_type,
96 $this,
97 "list"
98 )->getTable();
99 }
100
101 public function switchToLanguage(): void
102 {
103 $ctrl = $this->gui->ctrl();
104 $ctrl->setParameter($this, "transl", $this->request->getToTranslation());
105 $ctrl->redirect($this, "list");
106 }
107
108 public function editMasterLanguage(): void
109 {
110 $ctrl = $this->gui->ctrl();
111 $ctrl->setParameter($this, "transl", "-");
112 $ctrl->redirect($this, "list");
113 }
114
115
116 protected function list(): void
117 {
118 $lng = $this->domain->lng();
119 $ctrl = $this->gui->ctrl();
120 $main_tpl = $this->gui->mainTemplate();
121 $user = $this->domain->user();
122
123 if ($this->getTable()->handleCommand()) {
124 return;
125 }
126
127 $retrieval = $this->domain->subObjectRetrieval(
128 $this->lm_id,
129 $this->sub_type,
130 $this->sub_obj_id,
131 $this->lang
132 );
133
134 $ml_head = \ilObjLearningModuleGUI::getMultiLangHeader($this->lm_id, $this);
135
136 if ($retrieval->count() === 0) {
137 if ($this->sub_type === "st") {
138 $this->gui->button(
139 $lng->txt("lm_insert_chapter"),
140 $ctrl->getLinkTargetByClass(self::class, "insertFirstChapter")
141 )->toToolbar();
142 if ($user->clipboardHasObjectsOfType("st")) {
143 $this->gui->button(
144 $lng->txt("lm_insert_chapter_clip"),
145 $ctrl->getLinkTargetByClass(self::class, "insertChapterClip")
146 )->toToolbar();
147 }
148 } else {
149 $this->gui->button(
150 $lng->txt("lm_insert_page"),
151 $ctrl->getLinkTargetByClass(self::class, "insertFirstPage")
152 )->toToolbar();
153 if ($user->clipboardHasObjectsOfType("pg")) {
154 $this->gui->button(
155 $lng->txt("lm_insert_page_clip"),
156 $ctrl->getLinkTargetByClass(self::class, "insertPageClip")
157 )->toToolbar();
158 }
159 }
160 }
161 $table = $this->getTable();
162
163 $main_tpl->setContent($ml_head . $table->render());
164 $main_tpl->addOnloadCode("window.setTimeout(() => { il.repository.core.trigger('il-lm-editor-tree'); }, 500);");
165 }
166
167 public function insertChapterClipBefore(): void
168 {
169 $parent = $this->sub_obj_id;
170 $target_id = $this->request->getTargetId();
171 $before_target = \ilTree::POS_FIRST_NODE;
172 foreach ($this->lm_tree->getChilds($parent) as $node) {
173 if ((int) $node["obj_id"] !== $target_id) {
174 $before_target = (int) $node["obj_id"];
175 } else {
176 break;
177 }
178 }
179 $this->insertChapterClip(
180 $before_target
181 );
182 }
183
184 public function insertChapterClipAfter(): void
185 {
186 $this->insertChapterClip(
187 $this->request->getTargetId()
188 );
189 }
190
191 public function insertChapterClip(
192 $target = \ilTree::POS_LAST_NODE
193 ): void {
194 $user = $this->domain->user();
195 $ctrl = $this->gui->ctrl();
196 $parent_id = $this->request->getObjId();
197
198 // copy and paste
199 $chapters = $user->getClipboardObjects("st", true);
200 $copied_nodes = array();
201
202 foreach ($chapters as $chap) {
203 $cid = ilLMObject::pasteTree(
204 $this->lm,
205 $chap["id"],
206 $parent_id,
207 (int) $target,
208 (string) ($chap["insert_time"] ?? ""),
209 $copied_nodes,
210 (\ilEditClipboard::getAction() == "copy")
211 );
212 $target = $cid;
213 }
214 ilLMObject::updateInternalLinks($copied_nodes);
215
216 if (\ilEditClipboard::getAction() == "cut") {
217 $user->clipboardDeleteObjectsOfType("pg");
218 $user->clipboardDeleteObjectsOfType("st");
220 }
221
222 $this->lm->checkTree();
223 $ctrl->redirect($this, "list");
224 }
225
226 public function insertPageClipBefore(): void
227 {
228 $parent = $this->sub_obj_id;
229 $target_id = $this->request->getTargetId();
230 $before_target = \ilTree::POS_FIRST_NODE;
231 foreach ($this->lm_tree->getChildsByType($parent, "pg") as $node) {
232 if ((int) $node["obj_id"] !== $target_id) {
233 $before_target = (int) $node["obj_id"];
234 } else {
235 break;
236 }
237 }
238 $this->insertPageClip(
239 $before_target
240 );
241 }
242
243 public function insertPageClipAfter(): void
244 {
245 $this->insertPageClip(
246 $this->request->getTargetId()
247 );
248 }
249
250 public function insertPageClip(
251 int $target = 0
252 ): void {
253 $user = $this->domain->user();
254 $ctrl = $this->gui->ctrl();
255
256 $parent_id = $this->request->getObjId();
257
258 // cut and paste
259 $pages = $user->getClipboardObjects("pg");
260 $copied_nodes = array();
261 foreach ($pages as $pg) {
262 $cid = ilLMObject::pasteTree(
263 $this->lm,
264 $pg["id"],
265 $parent_id,
266 $target,
267 (string) ($pg["insert_time"] ?? ""),
268 $copied_nodes,
269 (\ilEditClipboard::getAction() == "copy")
270 );
271 $target = $cid;
272 }
274
275 if (\ilEditClipboard::getAction() == "cut") {
276 $user->clipboardDeleteObjectsOfType("pg");
277 $user->clipboardDeleteObjectsOfType("st");
279 }
280
281 $ctrl->redirect($this, "list");
282 }
283
284 public function insertFirstPage(): void
285 {
286 $this->insertPage(
287 $this->sub_obj_id
288 );
289 }
290 public function insertPageAfter(): void
291 {
292 $target_id = $this->request->getTargetId();
293 $this->insertPage(
294 $this->sub_obj_id,
295 $target_id
296 );
297 }
298
299 public function insertPageBefore(): void
300 {
301 $parent = $this->sub_obj_id;
302 $target_id = $this->request->getTargetId();
303 $before_target = \ilTree::POS_FIRST_NODE;
304 foreach ($this->lm_tree->getChildsByType($parent, "pg") as $node) {
305 if ((int) $node["obj_id"] !== $target_id) {
306 $before_target = (int) $node["obj_id"];
307 } else {
308 break;
309 }
310 }
311 $this->insertPage(
312 $parent,
313 $before_target
314 );
315 }
316
317 protected function insertPage(
318 int $parent_id = 0,
319 int $target = \ilTree::POS_LAST_NODE
320 ): void {
321 $lng = $this->domain->lng();
322 $ctrl = $this->gui->ctrl();
323
324 $chap = new \ilLMPageObject($this->lm);
325 $chap->setType("pg");
326 $chap->setTitle($lng->txt("cont_new_page"));
327 $chap->setLMId($this->lm_id);
328 $chap->create();
329 \ilLMObject::putInTree($chap, $parent_id, $target);
330
331 /*
332 if ($parent_id === $this->lm_tree->readRootId()) {
333 $ctrl->setParameterByClass(static::class, "obj_id", 0);
334 } else {
335 $ctrl->setParameterByClass(static::class, "obj_id", $parent_id);
336 }*/
337
338 $ctrl->redirect($this, "list");
339 }
340
341 public function insertFirstChapter(): void
342 {
343 $this->insertChapter(
344 $this->sub_obj_id
345 );
346 }
347 public function insertChapterAfter(): void
348 {
349 $target_id = $this->request->getTargetId();
350 $this->insertChapter(
351 $this->sub_obj_id,
352 $target_id
353 );
354 }
355
356 public function insertChapterBefore(): void
357 {
358 $parent = $this->sub_obj_id;
359 if ($parent === 0) {
360 $parent = $this->lm_tree->getRootId();
361 }
362 $target_id = $this->request->getTargetId();
363 $before_target = \ilTree::POS_FIRST_NODE;
364 foreach ($this->lm_tree->getChilds($parent) as $node) {
365 if ((int) $node["obj_id"] !== $target_id) {
366 $before_target = (int) $node["obj_id"];
367 } else {
368 break;
369 }
370 }
371 $this->insertChapter(
372 $parent,
373 $before_target
374 );
375 }
376
377 protected function insertChapter(
378 int $parent_id = 0,
379 int $target = \ilTree::POS_LAST_NODE
380 ): void {
381 $lng = $this->domain->lng();
382 $ctrl = $this->gui->ctrl();
383 $chap = new \ilStructureObject($this->lm);
384 $chap->setType("st");
385 $chap->setTitle($lng->txt("cont_new_chap"));
386 $chap->setLMId($this->lm_id);
387 $chap->create();
388 \ilLMObject::putInTree($chap, $parent_id, $target);
389
390 /*
391 if ($parent_id === $this->lm_tree->readRootId()) {
392 $ctrl->setParameterByClass(static::class, "obj_id", 0);
393 } else {
394 $ctrl->setParameterByClass(static::class, "obj_id", $parent_id);
395 }*/
396
397 $ctrl->redirect($this, "list");
398 }
399
400 protected function getEditTitleForm(int $id): FormAdapterGUI
401 {
402 $lng = $this->domain->lng();
403 $this->gui->ctrl()->setParameterByClass(self::class, "edit_id", $id);
404 $ot = (new TranslationsRepository($this->domain->database()))->getFor($this->lm->getId());
405 $ml = "";
406 if ($ot->getContentTranslationActivated()) {
407 $ml = " (" . $lng->txt("meta_l_" . $ot->getBaseLanguage()) . ")";
408 }
409
410 $form = $this
411 ->gui
412 ->form(self::class, "saveTitle")
413 ->text("title", $lng->txt('title') . $ml, "", ilLMObject::_lookupTitle($id));
414 if ($ot->getContentTranslationActivated()) {
415 foreach ($ot->getLanguages() as $lang) {
416 $code = $lang->getLanguageCode();
417 if ($code === $ot->getBaseLanguage()) {
418 continue;
419 }
420 $lmobjtrans = new \ilLMObjTranslation($id, $code);
421 $title = $lmobjtrans->getTitle();
422 $form = $form->text(
423 "title_" . $code,
424 $lng->txt('title') . " (" . $lng->txt("meta_l_" . $code) . ")",
425 "",
426 $title
427 );
428 }
429 }
430 return $form;
431 }
432
433 public function editTitle(int $id): void
434 {
435 $this->gui->clearAsnyOnloadCode();
436 $modal = $this->gui->modal()->form($this->getEditTitleForm($id));
437 $modal->send();
438 }
439
440 public function saveTitle(): void
441 {
442 $mt = $this->gui->mainTemplate();
443 $lng = $this->domain->lng();
444 $form = $this->getEditTitleForm($this->request->getEditId());
445 if ($form->isValid()) {
446 \ilLMObject::saveTitle($this->request->getEditId(), $form->getData("title"));
447
448 $ot = $this->lm->getObjectProperties()->getPropertyTranslations();
449 if ($ot->getContentTranslationActivated()) {
450 foreach ($ot->getLanguages() as $lang) {
451 $code = $lang->getLanguageCode();
452 if ($code === $ot->getBaseLanguage()) {
453 continue;
454 }
455 \ilLMObject::saveTitle($this->request->getEditId(), $form->getData("title_" . $code), $code);
456 }
457 }
458 }
459 $mt->setContent("success", $lng->txt("msg_obj_modified"), true);
460 $this->gui->ctrl()->redirect($this, "list");
461 }
462
463 public function saveOrder(): void
464 {
465 $mt = $this->gui->mainTemplate();
466 $lng = $this->domain->lng();
467 $tree = $this->domain->lmTree($this->lm_id);
468 $table = $this->getTable();
469 $data = $table->getData();
470 $parent = ($this->sub_obj_id > 0)
471 ? $this->sub_obj_id
472 : $tree->readRootId();
473 if (!is_array($data)) {
474 return;
475 }
476
477 // note: moveTree has a bug and does not use the last parameter
478 // target will always be "last node"
479 // since all chapters must follow all pages
480 // we can simple call moveTree in the correct order for the chapters
481 // but if we order the pages, we must append all chapters to the data first
482 if ($this->sub_type === "pg") {
483 foreach ($tree->getChilds($parent) as $child) {
484 if ($child["type"] == "st") {
485 $data[] = $child["child"];
486 }
487 }
488 }
489 foreach ($data as $id) {
490 $tree->moveTree((int) $id, $parent);
491 }
492 $mt->setContent("success", $lng->txt("msg_obj_modified"), true);
493 $this->gui->ctrl()->redirect($this, "list");
494 }
495
502 public function delete(array $ids): void
503 {
504 $a_parent_subobj_id = $this->sub_obj_id;
505 $mt = $this->gui->mainTemplate();
506 $lng = $this->domain->lng();
507 $ctrl = $this->gui->ctrl();
508
509 if (count($ids) == 0) {
510 $mt->setOnScreenMessage('failure', $lng->txt("no_checkbox"), true);
511 $this->cancelDelete();
512 }
513
514 if (count($ids) == 1 && $ids[0] == \ilTree::POS_FIRST_NODE) {
515 $mt->setOnScreenMessage('failure', $lng->txt("cont_select_item"), true);
516 $this->cancelDelete();
517 }
518
519 $form_action = $ctrl->getFormActionByClass(self::class);
520
521 // display confirmation message
522 $cgui = new \ilConfirmationGUI();
523 $cgui->setFormAction($form_action);
524 $cgui->setHeaderText($lng->txt("info_delete_sure"));
525 $cgui->setCancel($lng->txt("cancel"), "cancelDelete");
526 $cgui->setConfirm($lng->txt("confirm"), "confirmedDelete");
527
528 foreach ($ids as $id) {
529 if ($id != \ilTree::POS_FIRST_NODE) {
530 $obj = new \ilLMObject($this->lm, $id);
531 $caption = $obj->getTitle();
532
533 $cgui->addItem("id[]", (string) $id, $caption);
534 }
535 }
536
537 $mt->setContent($cgui->getHTML());
538 }
539
540 public function cancelDelete(): void
541 {
542 $this->gui->ctrl()->redirect($this, "list");
543 }
544
552 public function confirmedDelete(int $a_parent_subobj_id = 0): void
553 {
554 $tree = $this->domain->lmTree($this->lm_id);
555 $ids = $this->request->getIds();
556 $mt = $this->gui->mainTemplate();
557 $ctrl = $this->gui->ctrl();
558 $lng = $this->domain->lng();
559
560 // check number of objects
561 if (count($ids) == 0) {
562 $mt->setOnScreenMessage('failure', $lng->txt("no_checkbox"));
563 $ctrl->redirect($this, "list");
564 }
565
566 // delete all selected objects
567 foreach ($ids as $id) {
568 if ($id != \ilTree::POS_FIRST_NODE) {
569 $obj = \ilLMObjectFactory::getInstance($this->lm, $id, false);
570 $node_data = $tree->getNodeData($id);
571 if (is_object($obj)) {
572 $obj->setLMId($this->lm->getId());
573 $obj->delete();
574 }
575 if ($tree->isInTree($id)) {
576 $tree->deleteTree($node_data);
577 }
578 }
579 }
580
581 // check the tree
582 $this->lm->checkTree();
583
584 // feedback
585 $mt->setOnScreenMessage('success', $lng->txt("info_deleted"), true);
586 $ctrl->redirect($this, "list");
587 }
588
592 public function cutItems(array $ids): void
593 {
594 $ctrl = $this->gui->ctrl();
595 $mt = $this->gui->mainTemplate();
596 $lng = $this->domain->lng();
597
598 $items = $ids;
599 if (count($items) == 0) {
600 $mt->setOnScreenMessage('failure', $lng->txt("no_checkbox"), true);
601 $ctrl->redirect($this, "list");
602 }
603
604 $todel = array(); // delete IDs < 0 (needed for non-js editing)
605 foreach ($items as $k => $item) {
606 if ($item < 0) {
607 $todel[] = $k;
608 }
609 }
610 foreach ($todel as $k) {
611 unset($items[$k]);
612 }
613
614 \ilLMObject::clipboardCut($this->lm_id, $items);
616 $mt->setOnScreenMessage('info', $lng->txt("cont_selected_items_have_been_cut"), true);
617
618 $ctrl->redirect($this, "list");
619 }
620
624 public function copyItems($ids): void
625 {
626
627 $ctrl = $this->gui->ctrl();
628 $lng = $this->domain->lng();
629 $mt = $this->gui->mainTemplate();
630
631 $items = $ids;
632 if (count($items) == 0) {
633 $mt->setOnScreenMessage('failure', $lng->txt("no_checkbox"), true);
634 $ctrl->redirect($this, "list");
635 }
636
637 $todel = array(); // delete IDs < 0 (needed for non-js editing)
638 foreach ($items as $k => $item) {
639 if ($item < 0) {
640 $todel[] = $k;
641 }
642 }
643 foreach ($todel as $k) {
644 unset($items[$k]);
645 }
646
647 \ilLMObject::clipboardCopy($this->lm_id, $items);
649
650 $mt->setOnScreenMessage('info', $lng->txt("cont_selected_items_have_been_copied"), true);
651 $ctrl->redirect($this, "list");
652 }
653
654 public function activatePages(array $ids): void
655 {
656 $ctrl = $this->gui->ctrl();
657 $mt = $this->gui->mainTemplate();
658 $lng = $this->domain->lng();
659 $lm_tree = $this->domain->lmTree($this->lm_id);
660
661 $ids = $ids;
662 if (count($ids) > 0) {
663 $act_items = array();
664 // get all "top" ids, i.e. remove ids, that have a selected parent
665 foreach ($ids as $id) {
666 $path = $lm_tree->getPathId($id);
667 $take = true;
668 foreach ($path as $path_id) {
669 if ($path_id != $id && in_array($path_id, $ids)) {
670 $take = false;
671 }
672 }
673 if ($take) {
674 $act_items[] = $id;
675 }
676 }
677
678
679 foreach ($act_items as $id) {
680 $childs = $lm_tree->getChilds($id);
681 foreach ($childs as $child) {
682 if (ilLMObject::_lookupType($child["child"]) == "pg") {
684 $child["child"],
685 $this->lm->getType()
686 );
688 $child["child"],
689 $this->lm->getType(),
690 !$act
691 );
692 }
693 }
694 if (ilLMObject::_lookupType($id) == "pg") {
696 $id,
697 $this->lm->getType()
698 );
700 $id,
701 $this->lm->getType(),
702 !$act
703 );
704 }
705 }
706 } else {
707 $mt->setOnScreenMessage('failure', $lng->txt("no_checkbox"), true);
708 }
709
710 $ctrl->redirect($this, "list");
711 }
712
713 public function insertLayoutBefore(): void
714 {
715 $this->insertLayout(true);
716 }
717
718 public function insertLayoutAfter(): void
719 {
720 $this->insertLayout();
721 }
722
723 public function insertLayout(bool $before = false): void
724 {
725 $ctrl = $this->gui->ctrl();
726 $ui = $this->gui->ui();
727 $mt = $this->gui->mainTemplate();
728 if ($before) {
729 $ctrl->setParameterByClass(self::class, "before", "1");
730 }
731 $ctrl->saveParameterByClass(self::class, ["obj_id", "target_id"]);
732 $form = $this->initInsertTemplateForm();
733 $mt->setContent($ui->renderer()->render($form) . \ilLMPageObjectGUI::getLayoutCssFix());
734 }
735
737 {
738 $ui = $this->gui->ui();
739 $f = $ui->factory();
740 $ctrl = $this->gui->ctrl();
741 $lng = $this->domain->lng();
742
743 $fields["title"] = $f->input()->field()->text($lng->txt("title"), "");
744 $ts = \ilPageLayoutGUI::getTemplateSelection((string) \ilPageLayout::MODULE_LM);
745 if (!is_null($ts)) {
746 $fields["layout_id"] = $ts;
747 }
748
749 // section
750 $section1 = $f->input()->field()->section($fields, $lng->txt("cont_insert_pagelayout"));
751
752 $form_action = $ctrl->getLinkTarget($this, "insertPageFromLayout");
753 return $f->input()->container()->form()->standard($form_action, ["sec" => $section1]);
754 }
755
756 public function insertPageFromLayout(): void
757 {
758 global $DIC;
759
760 $ctrl = $this->gui->ctrl();
761 $mt = $this->gui->mainTemplate();
762 $lng = $this->domain->lng();
763
764
765 $parent = $this->sub_obj_id;
766 $target_id = $this->request->getTargetId();
767
768 $first_child = false;
769 if ($this->request->getBefore()) {
770 $before_target = \ilTree::POS_FIRST_NODE;
771 $first_child = true;
772 foreach ($this->lm_tree->getChildsByType($parent, "pg") as $node) {
773 if ((int) $node["obj_id"] !== $target_id) {
774 $before_target = (int) $node["obj_id"];
775 $first_child = false;
776 } else {
777 break;
778 }
779 }
780 $target_id = $before_target;
781 }
782
783 $form = $this->initInsertTemplateForm();
784 $form = $form->withRequest($DIC->http()->request());
785 $data = $form->getData();
786 $layout_id = $data["sec"]["layout_id"];
788 $this->lm->getId(),
789 1,
790 $target_id,
791 $first_child,
792 (int) $layout_id,
793 $data["sec"]["title"]
794 );
795
796 $mt->setOnScreenMessage("success", $lng->txt("lm_page_added"), true);
797
798 $ctrl->redirect($this, "list");
799 }
800}
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Definition: plugin.php:23
insertChapter(int $parent_id=0, int $target=\ilTree::POS_LAST_NODE)
__construct(protected InternalDomainService $domain, protected InternalGUIService $gui, protected string $sub_type, protected \ilObjLearningModule $lm, protected string $table_title)
cutItems(array $ids)
Copy items to clipboard, then cut them from the current tree.
confirmedDelete(int $a_parent_subobj_id=0)
delete page object or structure objects
insertPage(int $parent_id=0, int $target=\ilTree::POS_LAST_NODE)
static setAction(string $a_action)
static getInstance(ilObjLearningModule $a_content_obj, int $a_id=0, bool $a_halt=true)
Class ilLMObject.
static saveTitle(int $id, string $title, string $lang="-")
static clipboardCut(int $a_cont_obj_id, array $a_ids)
Copy a set of chapters/pages into the clipboard.
static _lookupTitle(int $a_obj_id)
static clipboardCopy(int $a_cont_obj_id, array $a_ids)
Copy a set of chapters/pages into the clipboard.
static updateInternalLinks(array $a_copied_nodes, string $a_parent_type="lm")
Update internal links, after multiple pages have been copied.
static putInTree(ilLMObject $a_obj, int $a_parent_id=0, int $a_target_node_id=0)
put this object into content object tree
static _lookupType(int $a_obj_id, int $a_lm_id=0)
static getLayoutCssFix()
Get layout css fix (workaround for broken radio options)
static insertPagesFromTemplate(int $lm_id, int $num, int $node_id, bool $first_child, int $layout_id, string $title="")
Insert (multiple) pages templates at node.
static getMultiLangHeader(int $a_lm_id, object $a_gui_class, string $a_mode="")
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static activeLayouts(int $a_module=0)
Get active layouts.
static _writeActive(int $a_id, string $a_parent_type, bool $a_active)
write activation status
static _lookupActive(int $a_id, string $a_parent_type, bool $a_check_scheduled_activation=false, string $a_lang="-")
lookup activation status
const POS_LAST_NODE
const POS_FIRST_NODE
This describes a standard form.
Definition: Standard.php:29
$path
Definition: ltiservices.php:30
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
global $lng
Definition: privfeed.php:31
global $DIC
Definition: shib_login.php:26
$lang
Definition: xapiexit.php:25