ILIAS  release_8 Revision v8.24
class.ilContainer.php
Go to the documentation of this file.
1<?php
2
26class ilContainer extends ilObject
27{
28 protected \ILIAS\Style\Content\DomainService $content_style_domain;
30 // container view constants
31 public const VIEW_SESSIONS = 0;
32 public const VIEW_OBJECTIVE = 1;
33 public const VIEW_TIMING = 2;
34 public const VIEW_ARCHIVE = 3;
35 public const VIEW_SIMPLE = 4;
36 public const VIEW_BY_TYPE = 5;
37 public const VIEW_INHERIT = 6;
38
40
41 public const SORT_TITLE = 0;
42 public const SORT_MANUAL = 1;
43 public const SORT_ACTIVATION = 2;
44 public const SORT_INHERIT = 3;
45 public const SORT_CREATION = 4;
46
47 public const SORT_DIRECTION_ASC = 0;
48 public const SORT_DIRECTION_DESC = 1;
49
52
56
57 public const TILE_NORMAL = 0;
58 public const TILE_SMALL = 1;
59 public const TILE_LARGE = 2;
60 public const TILE_EXTRA_LARGE = 3;
61 public const TILE_FULL = 4;
62
63 public static bool $data_preloaded = false;
64
67 protected ilObjUser $user;
68 public array $items = [];
70 protected int $order_type = 0;
71 protected bool $hiddenfilesfound = false;
72 protected bool $news_timeline = false;
73 protected bool $news_timeline_auto_entries = false;
76 protected int $style_id = 0;
77 protected bool $news_timeline_landing_page = false;
78 protected bool $news_block_activated = false;
79 protected bool $use_news = false;
81
82 public function __construct(int $a_id = 0, bool $a_reference = true)
83 {
85 global $DIC;
86
87 $this->db = $DIC->database();
88 $this->log = $DIC["ilLog"];
89 $this->access = $DIC->access();
90 $this->error = $DIC["ilErr"];
91 $this->rbacsystem = $DIC->rbac()->system();
92 $this->tree = $DIC->repositoryTree();
93 $this->user = $DIC->user();
94 $this->obj_definition = $DIC["objDefinition"];
95 $this->news = $DIC->news();
96
97
98 $this->setting = $DIC["ilSetting"];
99 parent::__construct($a_id, $a_reference);
100
101 if ($this->getId() > 0) {
102 $this->obj_trans = ilObjectTranslation::getInstance($this->getId());
103 }
104 $this->recommended_content_manager = new ilRecommendedContentManager();
105 $this->content_style_domain = $DIC->contentStyle()->domain();
106 }
107
111 public function getTileSizes(): array
112 {
114 return [
115 self::TILE_SMALL => $lng->txt("cont_tile_size_1"),
116 self::TILE_NORMAL => $lng->txt("cont_tile_size_0"),
117 self::TILE_LARGE => $lng->txt("cont_tile_size_2"),
118 self::TILE_EXTRA_LARGE => $lng->txt("cont_tile_size_3"),
119 self::TILE_FULL => $lng->txt("cont_tile_size_4")
120 ];
121 }
122
124 {
125 return $this->obj_trans;
126 }
127
129 {
130 $this->obj_trans = $obj_trans;
131 }
132
133 // <webspace_dir>/container_data.
134 public function createContainerDirectory(): void
135 {
136 $webspace_dir = ilFileUtils::getWebspaceDir();
137 $cont_dir = $webspace_dir . "/container_data";
138 if (!is_dir($cont_dir)) {
139 ilFileUtils::makeDir($cont_dir);
140 }
141 $obj_dir = $cont_dir . "/obj_" . $this->getId();
142 if (!is_dir($obj_dir)) {
143 ilFileUtils::makeDir($obj_dir);
144 }
145 }
146
147 public function getContainerDirectory(): string
148 {
149 return self::_getContainerDirectory($this->getId());
150 }
151
152 public static function _getContainerDirectory(int $a_id): string
153 {
154 return ilFileUtils::getWebspaceDir() . "/container_data/obj_" . $a_id;
155 }
156
157 // Set Found hidden files (set by getSubItems).
158 public function setHiddenFilesFound(bool $a_hiddenfilesfound): void
159 {
160 $this->hiddenfilesfound = $a_hiddenfilesfound;
161 }
162
163 public function getHiddenFilesFound(): bool
164 {
166 }
167
168 public function getStyleSheetId(): int
169 {
170 return $this->style_id;
171 }
172
173 public function setStyleSheetId(int $a_style_id): void
174 {
175 $this->style_id = $a_style_id;
176 }
177
178 public function setNewsTimeline(bool $a_val): void
179 {
180 $this->news_timeline = $a_val;
181 }
182
183 public function getNewsTimeline(): bool
184 {
186 }
187
188 public function setNewsTimelineAutoEntries(bool $a_val): void
189 {
190 $this->news_timeline_auto_entries = $a_val;
191 }
192
193 public function getNewsTimelineAutoEntries(): bool
194 {
196 }
197
198 public function setNewsTimelineLandingPage(bool $a_val): void
199 {
200 $this->news_timeline_landing_page = $a_val;
201 }
202
203 public function getNewsTimelineLandingPage(): bool
204 {
206 }
207
208 public function isNewsTimelineEffective(): bool
209 {
210 if (!$this->news->isGloballyActivated()) {
211 return false;
212 }
213 if ($this->getUseNews() && $this->getNewsTimeline()) {
214 return true;
215 }
216 return false;
217 }
218
220 {
221 if ($this->getUseNews() && $this->getNewsTimeline() && $this->getNewsTimelineLandingPage()) {
222 return true;
223 }
224 return false;
225 }
226
227
228 public function setNewsBlockActivated(bool $a_val): void
229 {
230 $this->news_block_activated = $a_val;
231 }
232
233 public function getNewsBlockActivated(): bool
234 {
236 }
237
238 public function setUseNews(bool $a_val): void
239 {
240 $this->use_news = $a_val;
241 }
242
243 public function getUseNews(): bool
244 {
245 return $this->use_news;
246 }
247
248 public static function _lookupContainerSetting(
249 int $a_id,
250 string $a_keyword,
251 string $a_default_value = null
252 ): string {
253 global $DIC;
254
255 $ilDB = $DIC->database();
256
257 $q = "SELECT value FROM container_settings WHERE " .
258 " id = " . $ilDB->quote($a_id, 'integer') . " AND " .
259 " keyword = " . $ilDB->quote($a_keyword, 'text');
260 $set = $ilDB->query($q);
261 $rec = $set->fetchRow(ilDBConstants::FETCHMODE_ASSOC);
262
263 if (isset($rec['value'])) {
264 return $rec["value"];
265 }
266
267 return $a_default_value ?? '';
268 }
269
270 public static function _hasContainerSetting(
271 int $a_id,
272 string $a_keyword
273 ): string {
274 global $DIC;
275
276 $ilDB = $DIC->database();
277
278 $q = "SELECT value FROM container_settings WHERE " .
279 " id = " . $ilDB->quote($a_id, 'integer') . " AND " .
280 " keyword = " . $ilDB->quote($a_keyword, 'text');
281 $set = $ilDB->query($q);
282 $rec = $set->fetchRow(ilDBConstants::FETCHMODE_ASSOC);
283
284 return (bool) $rec;
285 }
286
287 public static function _writeContainerSetting(
288 int $a_id,
289 string $a_keyword,
290 string $a_value
291 ): void {
292 global $DIC;
293
294 $ilDB = $DIC->database();
295
296 $query = "DELETE FROM container_settings WHERE " .
297 "id = " . $ilDB->quote($a_id, 'integer') . " " .
298 "AND keyword = " . $ilDB->quote($a_keyword, 'text');
299 $ilDB->manipulate($query);
300
302 $log->debug("Write container setting, id: " . $a_id . ", keyword: " . $a_keyword . ", value: " . $a_value);
303
304 $query = "INSERT INTO container_settings (id, keyword, value) VALUES (" .
305 $ilDB->quote($a_id, 'integer') . ", " .
306 $ilDB->quote($a_keyword, 'text') . ", " .
307 $ilDB->quote($a_value, 'text') .
308 ")";
309
310 $ilDB->manipulate($query);
311 }
312
317 public static function _getContainerSettings(int $a_id): array
318 {
319 global $DIC;
320
321 $ilDB = $DIC->database();
322
323 $res = [];
324
325 $sql = "SELECT keyword, value FROM container_settings WHERE " .
326 " id = " . $ilDB->quote($a_id, 'integer');
327 $set = $ilDB->query($sql);
328 while ($row = $ilDB->fetchAssoc($set)) {
329 $res[$row["keyword"]] = $row["value"];
330 }
331
332 return $res;
333 }
334
335 public static function _deleteContainerSettings(
336 int $a_id,
337 string $a_keyword = "",
338 bool $a_keyword_like = false
339 ): void {
340 global $DIC;
341
342 $ilDB = $DIC->database();
343
344 if (!$a_id) {
345 return;
346 }
347
348 $sql = "DELETE FROM container_settings WHERE " .
349 " id = " . $ilDB->quote($a_id, 'integer');
350 if ($a_keyword !== "") {
351 if (!$a_keyword_like) {
352 $sql .= " AND keyword = " . $ilDB->quote($a_keyword, "text");
353 } else {
354 $sql .= " AND " . $ilDB->like("keyword", "text", $a_keyword);
355 }
356 }
357 $ilDB->manipulate($sql);
358 }
359
360 public static function _exportContainerSettings(
361 ilXmlWriter $a_xml,
362 int $a_obj_id
363 ): void {
364 // container settings
365 $settings = self::_getContainerSettings($a_obj_id);
366 if (count($settings)) {
367 $a_xml->xmlStartTag("ContainerSettings");
368
369 foreach ($settings as $keyword => $value) {
370 // :TODO: proper custom icon export/import
371 if (stripos($keyword, "icon") !== false) {
372 continue;
373 }
374
375 $a_xml->xmlStartTag(
376 'ContainerSetting',
377 [
378 'id' => $keyword,
379 ]
380 );
381
382 $a_xml->xmlData((string) $value);
383 $a_xml->xmlEndTag("ContainerSetting");
384 }
385
386 $a_xml->xmlEndTag("ContainerSettings");
387 }
388 }
389
398 public function cloneObject(int $target_id, int $copy_id = 0, bool $omit_tree = false): ?ilObject
399 {
401 $new_obj = parent::cloneObject($target_id, $copy_id, $omit_tree);
402
404
405 // translations
407 $ot->setDefaultTitle($new_obj->getTitle()); // get possible "- COPY" extension
408 $ot->copy($new_obj->getId());
409 $ot2 = ilObjectTranslation::getInstance($new_obj->getId());
410 $ot2->read();
411 $new_obj->setObjectTranslation($ot2);
412 if ($ot2->getDefaultDescription() !== "") {
413 $new_obj->setDescription($ot2->getDefaultDescription());
414 }
415 $log->debug("**1**" . count($new_obj->getObjectTranslation()->getLanguages()));
416 $log->debug("ilContainer: cloning translations from " . $this->getId() . " to " .
417 $new_obj->getId());
418
419 #18624 - copy all sorting settings
420 ilContainerSortingSettings::_cloneSettings($this->getId(), $new_obj->getId());
421
422 // copy content page
424 "cont",
425 $this->getId()
426 )) {
427 $orig_page = new ilContainerPage($this->getId());
428 $orig_page->copy($new_obj->getId(), "cont", $new_obj->getId());
429 }
430
431 // #20614 - copy style
432 $this->content_style_domain->styleForRefId($this->getRefId())->cloneTo($new_obj->getId());
433
434 // #10271 - copy start objects page
436 "cstr",
437 $this->getId()
438 )) {
439 $orig_page = new ilContainerStartObjectsPage($this->getId());
440 $orig_page->copy($new_obj->getId(), "cstr", $new_obj->getId());
441 }
442
443 // #10271
444 foreach (self::_getContainerSettings($this->getId()) as $keyword => $value) {
445 self::_writeContainerSetting($new_obj->getId(), (string) $keyword, (string) $value);
446 }
447
448 $new_obj->setNewsTimeline($this->getNewsTimeline());
449 $new_obj->setNewsBlockActivated($this->getNewsBlockActivated());
450 $new_obj->setUseNews($this->getUseNews());
451 $new_obj->setNewsTimelineAutoEntries($this->getNewsTimelineAutoEntries());
452 $new_obj->setNewsTimelineLandingPage($this->getNewsTimelineLandingPage());
453 ilBlockSetting::cloneSettingsOfBlock("news", $this->getId(), $new_obj->getId());
454 $mom_noti = new ilMembershipNotifications($this->getRefId());
455 $mom_noti->cloneSettings($new_obj->getRefId());
456
457 return $new_obj;
458 }
459
468 public function cloneDependencies(int $target_id, int $copy_id): bool
469 {
470 $ilLog = $this->log;
471
472 parent::cloneDependencies($target_id, $copy_id);
473
474 ilContainerSorting::_getInstance($this->getId())->cloneSorting($target_id, $copy_id);
475
476 // fix internal links to other objects
477 self::fixInternalLinksAfterCopy($target_id, $copy_id, $this->getRefId());
478
479 // fix item group references in page content
481
482 $olp = ilObjectLP::getInstance($this->getId());
483 $collection = $olp->getCollectionInstance();
484 if ($collection) {
485 $collection->cloneCollection($target_id, $copy_id);
486 }
487
488 return true;
489 }
490
502 public function cloneAllObject(
503 string $session_id,
504 string $client_id,
505 string $new_type,
506 int $ref_id,
507 int $clone_source,
508 array $options,
509 bool $soap_call = false,
510 int $a_submode = 1
511 ): array {
512 $ilLog = $this->log;
513 $ilUser = $this->user;
514
515 // Save wizard options
517 $wizard_options = ilCopyWizardOptions::_getInstance($copy_id);
518 $wizard_options->saveOwner($ilUser->getId());
519 $wizard_options->saveRoot($clone_source);
520
521 // add entry for source container
522 $wizard_options->initContainer($clone_source, $ref_id);
523
524 foreach ($options as $source_id => $option) {
525 $wizard_options->addEntry($source_id, $option);
526 }
527 $wizard_options->read();
528 $wizard_options->storeTree($clone_source);
529
530 if ($a_submode === ilObjectCopyGUI::SUBMODE_CONTENT_ONLY) {
531 ilLoggerFactory::getLogger('obj')->info('Copy content only...');
532 ilLoggerFactory::getLogger('obj')->debug('Added mapping, source ID: ' . $clone_source . ', target ID: ' . $ref_id);
533 $wizard_options->read();
534 $wizard_options->dropFirstNode();
535 $wizard_options->appendMapping($clone_source, $ref_id);
536 }
537
538
539 #print_r($options);
540 // Duplicate session to avoid logout problems with backgrounded SOAP calls
541 $new_session_id = ilSession::_duplicate($session_id);
542 // Start cloning process using soap call
543 $soap_client = new ilSoapClient();
544 $soap_client->setResponseTimeout($soap_client->getResponseTimeout());
545 $soap_client->enableWSDL(true);
546
547 $ilLog->write(__METHOD__ . ': Trying to call Soap client...');
548 if ($soap_client->init()) {
549 ilLoggerFactory::getLogger('obj')->info('Calling soap clone method');
550 $res = $soap_client->call('ilClone', [$new_session_id . '::' . $client_id, $copy_id]);
551 } else {
552 ilLoggerFactory::getLogger('obj')->warning('SOAP clone call failed. Calling clone method manually');
553 $wizard_options->disableSOAP();
554 $wizard_options->read();
555 $res = ilSoapFunctions::ilClone($new_session_id . '::' . $client_id, $copy_id);
556 }
557 return [
558 'copy_id' => $copy_id,
559 'ref_id' => (int) $res
560 ];
561 }
562
568 public function delete(): bool
569 {
570 // always call parent delete function first!!
571 if (!parent::delete()) {
572 return false;
573 }
574 // delete translations
575 $this->obj_trans->delete();
576
577 return true;
578 }
579
580 public function getViewMode(): int
581 {
582 return self::VIEW_BY_TYPE;
583 }
584
585 public function getOrderType(): int
586 {
587 return $this->order_type ?: self::SORT_TITLE;
588 }
589
590 public function setOrderType(int $a_value): void
591 {
592 $this->order_type = $a_value;
593 }
594
595 public function isClassificationFilterActive(): bool
596 {
597 // apply container classification filters
598 $repo = new ilClassificationSessionRepository($this->getRefId());
599 foreach (ilClassificationProvider::getValidProviders($this->getRefId(), $this->getId(), $this->getType()) as $class_provider) {
600 $id = get_class($class_provider);
601 $current = $repo->getValueForProvider($id);
602 if ($current) {
603 return true;
604 }
605 }
606 return false;
607 }
608
613 public function filteredSubtree(): bool
614 {
615 if ($this->isClassificationFilterActive() && in_array($this->getType(), ["grp", "crs"])) {
616 return true;
617 }
618 return false;
619 }
620
621 protected function getInitialSubitems(): array
622 {
623 $tree = $this->tree;
624 if ($this->filteredSubtree()) {
625 $objects = $tree->getSubTree($tree->getNodeData($this->getRefId()));
626 } else {
627 $objects = $tree->getChilds($this->getRefId(), "title");
628 }
629 return $objects;
630 }
631
632 public function getSubItems(
633 bool $a_admin_panel_enabled = false,
634 bool $a_include_side_block = false,
635 int $a_get_single = 0,
636 ilContainerUserFilter $container_user_filter = null
637 ): array {
638 $objDefinition = $this->obj_definition;
639
640 // Caching
641 if (
642 isset($this->items[(int) $a_admin_panel_enabled][(int) $a_include_side_block]) &&
643 is_array($this->items[(int) $a_admin_panel_enabled][(int) $a_include_side_block]) &&
644 !$a_get_single
645 ) {
646 return $this->items[(int) $a_admin_panel_enabled][(int) $a_include_side_block];
647 }
648
649 $objects = $this->getInitialSubitems();
650 $objects = $this->applyContainerUserFilter($objects, $container_user_filter);
651 $objects = self::getCompleteDescriptions($objects);
652
653 // apply container classification filters
654 $repo = new ilClassificationSessionRepository($this->getRefId());
655 foreach (ilClassificationProvider::getValidProviders($this->getRefId(), $this->getId(), $this->getType()) as $class_provider) {
656 $id = get_class($class_provider);
657 $current = $repo->getValueForProvider($id);
658 if ($current) {
659 $class_provider->setSelection($current);
660 $filtered = $class_provider->getFilteredObjects();
661 $objects = array_filter($objects, static function (array $i) use ($filtered): bool {
662 return (is_array($filtered) && in_array($i["obj_id"], $filtered));
663 });
664 //if (count($filtered) > 0) {
665 // var_dump($filtered);
666 // echo "<br><br>";
667 // var_dump($objects);
668 // exit;
669 //}
670 }
671 }
672
673 $found = false;
674 $all_ref_ids = [];
675
676 $preloader = null;
677 if (!self::$data_preloaded) {
679 }
680
681 $sort = ilContainerSorting::_getInstance($this->getId());
682
683 // TODO: check this
684 // get items attached to a session
685
686 $classification_filter_active = $this->isClassificationFilterActive();
687 foreach ($objects as $key => $object) {
688 // see #41377, this ensures session materials to be preloaded
689 if (!self::$data_preloaded) {
690 if ($object["type"] === "sess") {
691 $ev_items = ilObjectActivation::getItemsByEvent((int) $object["obj_id"]);
692 foreach ($ev_items as $ev_item) {
693 $preloader->addItem((int) $ev_item["obj_id"], $ev_item["type"], $ev_item["ref_id"]);
694 }
695 }
696 }
697 if ($a_get_single > 0 && $object["child"] != $a_get_single) {
698 continue;
699 }
700
701 // hide object types in devmode
702 if ($object["type"] === "adm" || $object["type"] === "rolf" || $objDefinition->getDevMode($object["type"])) {
703 continue;
704 }
705
706 // remove inactive plugins
707 if ($objDefinition->isInactivePlugin($object["type"])) {
708 continue;
709 }
710 // BEGIN WebDAV: Don't display hidden Files, Folders and Categories
711 if (in_array(
712 $object['type'],
713 ['file', 'fold', 'cat'],
714 true
715 ) && ilObjFileAccess::_isFileHidden((string) $object['title'])) {
716 $this->setHiddenFilesFound(true);
717 if (!$a_admin_panel_enabled) {
718 continue;
719 }
720 }
721 // END WebDAV: Don't display hidden Files, Folders and Categories
722
723 if (!self::$data_preloaded) {
724 $preloader->addItem((int) $object["obj_id"], $object["type"], $object["child"]);
725 }
726
727 // filter side block items
728 if (!$a_include_side_block && $objDefinition->isSideBlock($object['type'])) {
729 continue;
730 }
731
732 $all_ref_ids[] = (int) $object["child"];
733 }
734
735 // data preloader
736 if (!self::$data_preloaded) {
737 $preloader->preload();
738 unset($preloader);
739
740 self::$data_preloaded = true;
741 }
742
743 foreach ($objects as $key => $object) {
744 // see above, objects were filtered
745 if (!in_array($object["child"], $all_ref_ids)) {
746 continue;
747 }
748
749 // group object type groups together (e.g. learning resources)
750 $type = $objDefinition->getGroupOfObj($object["type"]);
751 if ($type == "") {
752 $type = $object["type"];
753 }
754
755 // this will add activation properties
756 $this->addAdditionalSubItemInformation($object);
757
758 $this->items[$type][$key] = $object;
759
760 $this->items["_all"][$key] = $object;
761 if ($object["type"] !== "sess") {
762 $this->items["_non_sess"][$key] = $object;
763 }
764 }
765 $this->items[(int) $a_admin_panel_enabled][(int) $a_include_side_block]
766 = $sort->sortItems($this->items);
767
768 return $this->items[(int) $a_admin_panel_enabled][(int) $a_include_side_block];
769 }
770
771 // Check whether we got any items
772 public function gotItems(): bool
773 {
774 if (isset($this->items["_all"]) && is_array($this->items["_all"]) && count($this->items["_all"]) > 0) {
775 return true;
776 }
777 return false;
778 }
779
784 public function addAdditionalSubItemInformation(array &$object): void
785 {
786 }
787
788 // Get grouped repository object types.
789 public function getGroupedObjTypes(): array
790 {
791 $objDefinition = $this->obj_definition;
792
793 if (empty($this->type_grps)) {
794 $this->type_grps = $objDefinition::getGroupedRepositoryObjectTypes($this->getType());
795 }
796 return $this->type_grps;
797 }
798
799 public function enablePageEditing(): bool
800 {
801 $ilSetting = $this->setting;
802
803 // @todo: this will need a more general approach
804 if ($ilSetting->get("enable_cat_page_edit")) {
805 return true;
806 }
807 return false;
808 }
809
810 public function create(): int
811 {
812 global $DIC;
813
814 $lng = $DIC->language();
815
816 $ret = parent::create();
817
818 // set translation object, since we have an object id now
819 $this->obj_trans = ilObjectTranslation::getInstance($this->getId());
820
821 // add default translation
822 $this->addTranslation(
823 $this->getTitle(),
824 $this->getDescription(),
825 $lng->getDefaultLanguage(),
826 '1'
827 );
828
829 if (($this->getStyleSheetId()) > 0) {
830 //ilObjStyleSheet::writeStyleUsage($this->getId(), $this->getStyleSheetId());
831 }
832
834 $log->debug("Create Container, id: " . $this->getId());
835
836 self::_writeContainerSetting($this->getId(), "news_timeline", (string) ((int) $this->getNewsTimeline()));
837 self::_writeContainerSetting($this->getId(), "news_timeline_incl_auto", (string) ((int) $this->getNewsTimelineAutoEntries()));
838 self::_writeContainerSetting($this->getId(), "news_timeline_landing_page", (string) ((int) $this->getNewsTimelineLandingPage()));
839 self::_writeContainerSetting($this->getId(), ilObjectServiceSettingsGUI::NEWS_VISIBILITY, (string) ((int) $this->getNewsBlockActivated()));
840 self::_writeContainerSetting($this->getId(), ilObjectServiceSettingsGUI::USE_NEWS, (string) ((int) $this->getUseNews()));
841
842 return $ret;
843 }
844
845 public function putInTree(int $parent_ref_id): void
846 {
847 parent::putInTree($parent_ref_id);
848
849 // copy title, icon actions visibilities
850 if (self::_lookupContainerSetting(ilObject::_lookupObjId($parent_ref_id), "hide_header_icon_and_title")) {
851 self::_writeContainerSetting($this->getId(), "hide_header_icon_and_title", '1');
852 }
853 if (self::_lookupContainerSetting(ilObject::_lookupObjId($parent_ref_id), "hide_top_actions")) {
854 self::_writeContainerSetting($this->getId(), "hide_top_actions", '1');
855 }
856 }
857
858 public function update(): bool
859 {
860 $ret = parent::update();
861
863 $log->debug("**5**" . count($this->getObjectTranslation()->getLanguages()));
864
865 $trans = $this->getObjectTranslation();
866 $trans->setDefaultTitle($this->getTitle());
867 $trans->setDefaultDescription($this->getLongDescription());
868 $trans->save();
869
871 $log->debug(":::::::::::::::::::::::::::");
872 $log->logStack(10);
873
874 //ilObjStyleSheet::writeStyleUsage($this->getId(), $this->getStyleSheetId());
875
877 $log->debug("Update Container, id: " . $this->getId());
878
879 self::_writeContainerSetting($this->getId(), "news_timeline", (string) ((int) $this->getNewsTimeline()));
880 self::_writeContainerSetting($this->getId(), "news_timeline_incl_auto", (string) (int) $this->getNewsTimelineAutoEntries());
881 self::_writeContainerSetting($this->getId(), "news_timeline_landing_page", (string) ((int) ($this->getNewsTimelineLandingPage())));
882 self::_writeContainerSetting($this->getId(), ilObjectServiceSettingsGUI::NEWS_VISIBILITY, (string) ((int) $this->getNewsBlockActivated()));
883 self::_writeContainerSetting($this->getId(), ilObjectServiceSettingsGUI::USE_NEWS, (string) ((int) $this->getUseNews()));
884
885 return $ret;
886 }
887
888 public function read(): void
889 {
890 parent::read();
891
892 $this->setOrderType(ilContainerSortingSettings::_lookupSortMode($this->getId()));
893
894 //$this->setStyleSheetId(ilObjStyleSheet::lookupObjectStyle($this->getId()));
895
896 $this->readContainerSettings();
897 $this->obj_trans = ilObjectTranslation::getInstance($this->getId());
898 }
899
900 public function readContainerSettings(): void
901 {
902 $this->setNewsTimeline((bool) self::_lookupContainerSetting($this->getId(), "news_timeline"));
903 $this->setNewsTimelineAutoEntries((bool) self::_lookupContainerSetting($this->getId(), "news_timeline_incl_auto"));
904 $this->setNewsTimelineLandingPage((bool) self::_lookupContainerSetting($this->getId(), "news_timeline_landing_page"));
905 $this->setNewsBlockActivated((bool) self::_lookupContainerSetting(
906 $this->getId(),
908 $this->setting->get('block_activated_news', '1')
909 ));
910 $this->setUseNews((bool) self::_lookupContainerSetting($this->getId(), ilObjectServiceSettingsGUI::USE_NEWS, '1') &&
911 $this->news->isGloballyActivated());
912 }
913
914
919 public static function getCompleteDescriptions(array $objects): array
920 {
921 global $DIC;
922
923 $ilSetting = $DIC->settings();
924 $ilObjDataCache = $DIC["ilObjDataCache"];
925
926 // using long descriptions?
927 $short_desc = $ilSetting->get("rep_shorten_description");
928 $short_desc_max_length = $ilSetting->get("rep_shorten_description_length");
929 if (!$short_desc || $short_desc_max_length > 0) {
930 // using (part of) shortened description
931 if ($short_desc && $short_desc_max_length && $short_desc_max_length < ilObject::DESC_LENGTH) {
932 foreach ($objects as $key => $object) {
933 $objects[$key]["description"] = ilStr::shortenTextExtended(
934 $object["description"],
935 (int) $short_desc_max_length,
936 true
937 );
938 }
939 }
940 // using (part of) long description
941 else {
942 $obj_ids = [];
943 foreach ($objects as $key => $object) {
944 $obj_ids[] = $object["obj_id"];
945 }
946 if (count($obj_ids)) {
947 $long_desc = ilObject::getLongDescriptions($obj_ids);
948 foreach ($objects as $key => $object) {
949 // #12166 - keep translation, ignore long description
950 if ($ilObjDataCache->isTranslatedDescription((int) $object["obj_id"])) {
951 $long_desc[$object["obj_id"]] = $object["description"];
952 }
953 if ($short_desc && $short_desc_max_length) {
954 $long_desc[$object["obj_id"]] = ilStr::shortenTextExtended(
955 $long_desc[$object["obj_id"]] ?? '',
956 (int) $short_desc_max_length,
957 true
958 );
959 }
960 $objects[$key]["description"] = $long_desc[$object["obj_id"]] ?? '';
961 }
962 }
963 }
964 }
965 return $objects;
966 }
967
968 protected static function fixInternalLinksAfterCopy(
969 int $a_target_id,
970 int $a_copy_id,
971 int $a_source_ref_id
972 ): void {
973 global $DIC;
974
976 $obj_definition = $DIC["objDefinition"];
977
978 $obj_id = ilObject::_lookupObjId($a_target_id);
979 $cwo = ilCopyWizardOptions::_getInstance($a_copy_id);
980 $mapping = $cwo->getMappings();
981
982 if (ilContainerPage::_exists("cont", $obj_id)) {
983 $pg = new ilContainerPage($obj_id);
984 $pg->handleRepositoryLinksOnCopy($mapping, $a_source_ref_id);
985 $pg->update(true, true);
986 }
987
988 foreach ($mapping as $old_ref_id => $new_ref_id) {
989 if (!is_numeric($old_ref_id) || !is_numeric($new_ref_id)) {
990 continue;
991 }
992
993 $type = ilObject::_lookupType($new_ref_id, true);
994 $class = 'il' . $obj_definition->getClassName($type) . 'PageCollector';
995 $loc = $obj_definition->getLocation($type);
996 $file = $loc . '/class.' . $class . '.php';
997
998 if (is_file($file)) {
1000 $coll = new $class();
1001 foreach ($coll->getAllPageIds(ilObject::_lookupObjId($new_ref_id)) as $page_id) {
1002 if (ilPageObject::_exists($page_id['parent_type'], $page_id['id'], $page_id['lang'])) {
1004 $page = ilPageObjectFactory::getInstance($page_id['parent_type'], $page_id['id'], 0, $page_id['lang']);
1005 $page->handleRepositoryLinksOnCopy($mapping, $a_source_ref_id);
1006 $page->update(true, true);
1007 }
1008 }
1009 }
1010 }
1011 }
1012
1013 // Remove all translations of container
1014 public function removeTranslations(): void
1015 {
1016 $this->obj_trans->delete();
1017 }
1018
1019 public function deleteTranslation(string $a_lang): void
1020 {
1021 $this->obj_trans->removeLanguage($a_lang);
1022 $this->obj_trans->save();
1023 }
1024
1025 public function addTranslation(
1026 string $a_title,
1027 string $a_desc,
1028 string $a_lang,
1029 string $a_lang_default
1030 ): void {
1031 if (empty($a_title)) {
1032 $a_title = "NO TITLE";
1033 }
1034
1035 $this->obj_trans->addLanguage($a_lang, $a_title, $a_desc, (bool) $a_lang_default, true);
1036 $this->obj_trans->save();
1037 }
1038
1046 protected function applyContainerUserFilter(
1047 array $objects,
1048 ilContainerUserFilter $container_user_filter = null
1049 ): array {
1050 global $DIC;
1051 $db = $DIC->database();
1052
1053 if (is_null($container_user_filter)) {
1054 return $objects;
1055 }
1056
1057 if ($container_user_filter->isEmpty() && !self::_lookupContainerSetting($this->getId(), "filter_show_empty", '0')) {
1058 return [];
1059 }
1060
1061 $result = null;
1062
1063 $obj_ids = array_map(static function (array $i): int {
1064 return (int) $i["obj_id"];
1065 }, $objects);
1066 $filter_data = $container_user_filter->getData();
1067 if (is_array($filter_data)) {
1068 foreach ($filter_data as $key => $val) {
1069 if (count($obj_ids) === 0) { // stop if no object ids are left
1070 continue;
1071 }
1072 if (!in_array(substr($key, 0, 4), ["adv_", "std_"], true)) {
1073 continue;
1074 }
1075 if ($val == "") {
1076 continue;
1077 }
1078 $field_id = substr($key, 4);
1079 $val = ilUtil::stripSlashes($val);
1080 $query_parser = new ilQueryParser($val);
1081 if (strpos($key, "std_") === 0) {
1082 // object type
1083 if ((int) $field_id === ilContainerFilterField::STD_FIELD_OBJECT_TYPE) {
1084 $result = null;
1085 $set = $db->queryF(
1086 "SELECT obj_id FROM object_data " .
1087 " WHERE " . $db->in("obj_id", $obj_ids, false, "integer") .
1088 " AND type = %s",
1089 ["text"],
1090 [$val]
1091 );
1092 $result_obj_ids = [];
1093 while ($rec = $db->fetchAssoc($set)) {
1094 $result_obj_ids[] = $rec["obj_id"];
1095 }
1096 $obj_ids = array_intersect($obj_ids, $result_obj_ids);
1097 } elseif ((int) $field_id === ilContainerFilterField::STD_FIELD_ONLINE) {
1098 if (in_array($val, [1, 2])) {
1099 $online_where = ($val == 1)
1100 ? " (offline <> " . $db->quote(1, "integer") . " OR offline IS NULL) "
1101 : " offline = " . $db->quote(1, "integer") . " ";
1102 $result = null;
1103 $set = $db->queryF(
1104 "SELECT obj_id FROM object_data " .
1105 " WHERE " . $db->in("obj_id", $obj_ids, false, "integer") .
1106 " AND " . $online_where,
1107 [],
1108 []
1109 );
1110 $result_obj_ids = [];
1111 while ($rec = $db->fetchAssoc($set)) {
1112 $result_obj_ids[] = $rec["obj_id"];
1113 }
1114 $obj_ids = array_intersect($obj_ids, $result_obj_ids);
1115 $obj_ids = $this->legacyOnlineFilter($obj_ids, $objects, (int) $val);
1116 }
1117 } elseif ((int) $field_id === ilContainerFilterField::STD_FIELD_TUTORIAL_SUPPORT) {
1118 $result = null;
1119 $set = $db->queryF(
1120 "SELECT DISTINCT(obj_id) FROM obj_members m JOIN usr_data u ON (u.usr_id = m.usr_id) " .
1121 " WHERE " . $db->in("m.obj_id", $obj_ids, false, "integer") .
1122 " AND " . $db->like("u.lastname", "text", $val) .
1123 " AND m.contact = %s",
1124 ["integer"],
1125 [1]
1126 );
1127 $result_obj_ids = [];
1128 while ($rec = $db->fetchAssoc($set)) {
1129 $result_obj_ids[] = $rec["obj_id"];
1130 }
1131 $obj_ids = array_intersect($obj_ids, $result_obj_ids);
1132 } elseif ((int) $field_id === ilContainerFilterField::STD_FIELD_COPYRIGHT) {
1133 $obj_ids = $this->filterObjIdsByCopyright($obj_ids, $val);
1134 } else {
1135 #$query_parser->setCombination($this->options['title_ao']);
1136 $query_parser->setCombination(ilQueryParser::QP_COMBINATION_OR);
1137 $query_parser->parse();
1138 $meta_search = ilObjectSearchFactory::_getAdvancedSearchInstance($query_parser);
1139
1140 //$meta_search->setFilter($this->filter); // object types ['lm', ...]
1141 switch ($field_id) {
1143 $meta_search->setMode('title_description');
1144 break;
1146 $meta_search->setMode('description');
1147 break;
1149 $meta_search->setMode('title');
1150 break;
1152 $meta_search->setMode('keyword_all');
1153 break;
1155 $meta_search->setMode('contribute');
1156 break;
1157
1158 }
1159 //$meta_search->setOptions($this->options);
1160 $result = $meta_search->performSearch();
1161 }
1162 } else { // advanced metadata search
1163 $field = ilAdvancedMDFieldDefinition::getInstance((int) $field_id);
1164
1165 $field_form = ilADTFactory::getInstance()->getSearchBridgeForDefinitionInstance(
1166 $field->getADTDefinition(),
1167 true,
1168 false
1169 );
1170 $field_form->setElementId("query[" . $key . "]");
1171 $field_form->validate();
1172
1179 if ($field instanceof ilAdvancedMDFieldDefinitionSelectMulti) {
1180 $field_form->getADT()->setSelections([$val]);
1181 }
1182 if ($field instanceof ilAdvancedMDFieldDefinitionSelect) {
1183 $adt = $field_form->getADT();
1184 if ($adt instanceof ilADTMultiEnumText) {
1185 $field_form->getADT()->setSelections([$val]);
1186 } else {
1187 $field_form->getADT()->setSelection($val);
1188 }
1189 }
1190 if ($field instanceof ilAdvancedMDFieldDefinitionInteger) {
1191 $field_form->getADT()->setNumber((int) $val);
1192 }
1193
1194 $query_parser->setCombination(ilQueryParser::QP_COMBINATION_OR);
1195 $adv_md_search = ilObjectSearchFactory::_getAdvancedMDSearchInstance($query_parser);
1196 //$adv_md_search->setFilter($this->filter); // this could be set to an array of object types
1197 $adv_md_search->setDefinition($field); // e.g. ilAdvancedMDFieldDefinitionSelectMulti
1198 $adv_md_search->setIdFilter([0]);
1199 $adv_md_search->setSearchElement($field_form); // e.g. ilADTEnumSearchBridgeMulti
1200 $result = $adv_md_search->performSearch();
1201 }
1202
1203 // intersect results
1204 if ($result instanceof ilSearchResult) {
1205 $result_obj_ids = array_map(
1206 static function (array $i): int {
1207 return (int) $i["obj_id"];
1208 },
1209 $result->getEntries()
1210 );
1211 $obj_ids = array_intersect($obj_ids, $result_obj_ids);
1212 }
1213 }
1214 }
1215 $objects = array_filter($objects, static function (array $o) use ($obj_ids): bool {
1216 return in_array($o["obj_id"], $obj_ids);
1217 });
1218
1219 return $objects;
1220 }
1221
1222 protected function filterObjIdsByCopyright(array $obj_ids, string $copyright_id): array
1223 {
1224 $identifier = \ilMDCopyrightSelectionEntry::createIdentifier($copyright_id);
1227 );
1228
1229 if ($identifier === $default_identifier) {
1230 return $this->filterObjIdsByDefaultCopyright($obj_ids, $default_identifier);
1231 }
1232
1233 $db = $this->db;
1234 $set = $db->queryF(
1235 "SELECT DISTINCT(rbac_id) FROM il_meta_rights " .
1236 " WHERE " . $db->in("rbac_id", $obj_ids, false, "integer") .
1237 " AND description = %s ",
1238 array("text"),
1239 array($identifier)
1240 );
1241 $result_obj_ids = [];
1242 while ($rec = $db->fetchAssoc($set)) {
1243 $result_obj_ids[] = $rec["rbac_id"];
1244 }
1245 return array_intersect($obj_ids, $result_obj_ids);
1246 }
1247
1249 array $obj_ids,
1250 string $default_identifier
1251 ): array {
1252 /*
1253 * Objects with no entry in il_meta_rights need to be treated like they
1254 * have the default copyright.
1255 */
1256 $db = $this->db;
1257 $set = $db->queryF(
1258 "SELECT DISTINCT(rbac_id) FROM il_meta_rights " .
1259 " WHERE " . $db->in("rbac_id", $obj_ids, false, "integer") .
1260 " AND NOT description = %s ",
1261 array("text"),
1262 array($default_identifier)
1263 );
1264 $filtered_out_obj_ids = [];
1265 while ($rec = $db->fetchAssoc($set)) {
1266 $filtered_out_obj_ids[] = $rec["rbac_id"];
1267 }
1268 return array_diff($obj_ids, $filtered_out_obj_ids);
1269 }
1270
1280 protected function legacyOnlineFilter(
1281 array $obj_ids,
1282 array $objects,
1283 int $val
1284 ): array {
1285 $legacy_types = ["glo", "wiki", "qpl", "book", "dcl", "prtt", "mcst", "spl"];
1286 foreach ($legacy_types as $type) {
1287 $lobjects = array_filter($objects, static function (array $o) use ($type): bool {
1288 return ($o["type"] === $type);
1289 });
1290 $lobj_ids = array_map(static function (array $i): int {
1291 return (int) $i["obj_id"];
1292 }, $lobjects);
1293 $status = [];
1294 switch ($type) {
1295 case "glo":
1296 $status = ilObjGlossaryAccess::_lookupOnlineStatus($lobj_ids);
1297 break;
1298 case "wiki":
1299 $status = ilObjWikiAccess::_lookupOnlineStatus($lobj_ids);
1300 break;
1301 case "book":
1303 break;
1304 case "qpl":
1305 $status = [];
1306 foreach ($lobj_ids as $lid) {
1307 $status[$lid] = ilObjQuestionPoolAccess::isOnline($lid);
1308 }
1309 break;
1310 case "dcl":
1311 $status = [];
1312 foreach ($lobj_ids as $lid) {
1313 $status[$lid] = ilObjDataCollectionAccess::_lookupOnline($lid);
1314 }
1315 break;
1316 case "prtt":
1318 break;
1319 case "mcst":
1320 foreach ($lobj_ids as $lid) {
1321 $status[$lid] = \ilObjMediaCastAccess::_lookupOnline($lid);
1322 }
1323 break;
1324 case "spl":
1325 foreach ($lobj_ids as $lid) {
1326 $status[$lid] = \ilObjSurveyQuestionPool::_lookupOnline($lid);
1327 }
1328 }
1329 foreach ($status as $obj_id => $online) {
1330 if (($val == 1 && !$online) || ($val == 2 && $online)) {
1331 if (($key = array_search($obj_id, $obj_ids)) !== false) {
1332 unset($obj_ids[$key]);
1333 }
1334 } elseif (!in_array($obj_id, $obj_ids)) {
1335 $obj_ids[] = $obj_id;
1336 }
1337 }
1338 }
1339 return $obj_ids;
1340 }
1341}
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Definition: plugin.php:23
error(string $a_errmsg)
static getInstance(?int $a_field_id, ?int $a_type=null, string $language='')
static cloneSettingsOfBlock(string $block_type, int $block_id, int $new_block_id)
static getValidProviders(int $a_parent_ref_id, int $a_parent_obj_id, string $a_parent_obj_type)
Get all valid providers (for parent container)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static _cloneSettings(int $a_old_id, int $a_new_id)
static _getInstance(int $a_obj_id)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
ILIAS Style Content DomainService $content_style_domain
cloneAllObject(string $session_id, string $client_id, string $new_type, int $ref_id, int $clone_source, array $options, bool $soap_call=false, int $a_submode=1)
static _writeContainerSetting(int $a_id, string $a_keyword, string $a_value)
const SORT_DIRECTION_DESC
setUseNews(bool $a_val)
ilObjectDefinition $obj_definition
ilRecommendedContentManager $recommended_content_manager
applyContainerUserFilter(array $objects, ilContainerUserFilter $container_user_filter=null)
Apply container user filter on objects.
ilRbacSystem $rbacsystem
static getCompleteDescriptions(array $objects)
overwrites description fields to long or short description in an assoc array keys needed (obj_id and ...
deleteTranslation(string $a_lang)
static _lookupContainerSetting(int $a_id, string $a_keyword, string $a_default_value=null)
cloneDependencies(int $target_id, int $copy_id)
Clone object dependencies (container sorting)
create()
note: title, description and type should be set when this function is called
setNewsTimelineAutoEntries(bool $a_val)
filterObjIdsByCopyright(array $obj_ids, string $copyright_id)
const SORT_NEW_ITEMS_ORDER_ACTIVATION
bool $news_timeline_auto_entries
setOrderType(int $a_value)
setStyleSheetId(int $a_style_id)
filterObjIdsByDefaultCopyright(array $obj_ids, string $default_identifier)
addTranslation(string $a_title, string $a_desc, string $a_lang, string $a_lang_default)
setNewsBlockActivated(bool $a_val)
static _getContainerSettings(int $a_id)
filteredSubtree()
Note grp/crs currently allow to filter in their whole subtrees Catetories only their direct childs.
const SORT_NEW_ITEMS_ORDER_TITLE
getSubItems(bool $a_admin_panel_enabled=false, bool $a_include_side_block=false, int $a_get_single=0, ilContainerUserFilter $container_user_filter=null)
legacyOnlineFilter(array $obj_ids, array $objects, int $val)
Legacy online filter.
const SORT_NEW_ITEMS_ORDER_CREATION
setNewsTimelineLandingPage(bool $a_val)
addAdditionalSubItemInformation(array &$object)
Add additional information to sub item, e.g.
putInTree(int $parent_ref_id)
maybe this method should be in tree object!?
setHiddenFilesFound(bool $a_hiddenfilesfound)
static _hasContainerSetting(int $a_id, string $a_keyword)
bool $news_timeline_landing_page
const SORT_NEW_ITEMS_POSITION_BOTTOM
ilAccessHandler $access
static _getContainerDirectory(int $a_id)
setNewsTimeline(bool $a_val)
const SORT_NEW_ITEMS_POSITION_TOP
const SORT_DIRECTION_ASC
ilNewsService $news
ilSetting $setting
static _deleteContainerSettings(int $a_id, string $a_keyword="", bool $a_keyword_like=false)
static bool $data_preloaded
isNewsTimelineLandingPageEffective()
setObjectTranslation(?ilObjectTranslation $obj_trans)
static _exportContainerSettings(ilXmlWriter $a_xml, int $a_obj_id)
bool $news_block_activated
ilObjectTranslation $obj_trans
static _allocateCopyId()
Allocate a copy for further entries.
static _getInstance(int $a_copy_id)
static getWebspaceDir(string $mode="filesystem")
get webspace directory
static makeDir(string $a_dir)
creates a new directory and inherits all filesystem permissions of the parent directory You may pass ...
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
static getLogger(string $a_component_id)
Get component logger.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static _lookupOnlineStatus(array $a_ids)
Check whether booking pool is online (legacy version)
static _lookupOnline(int $a_id)
Check wether datacollection is online.
static _isFileHidden(string $a_file_name)
Returns true, if a file with the specified name, is usually hidden from the user.
static _lookupOnlineStatus(array $a_ids)
static fixContainerItemGroupRefsAfterCloning(ilContainer $a_source_container, int $a_copy_id)
static isOnline($a_obj_id)
returns the objects's ONline status
User class.
static _lookupOnlineStatus(array $a_ids)
see legacyOnlineFilter in ilContainer
static getItemsByEvent(int $event_id)
Get session material / event items.
parses the objects.xml it handles the xml-description of all ilias objects
getClassName(string $obj_name)
static getInstance(int $obj_id)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static _getAdvancedSearchInstance(ilQueryParser $query_parser)
static _getAdvancedMDSearchInstance(ilQueryParser $query_parser)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static getInstance(int $obj_id)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static _lookupType(int $id, bool $reference=false)
ilLanguage $lng
__construct(int $id=0, bool $reference=true)
const DESC_LENGTH
static getLongDescriptions(array $obj_ids)
static _lookupObjId(int $ref_id)
static getInstance(string $a_parent_type, int $a_id=0, int $a_old_nr=0, string $a_lang="-")
Get page object instance.
static _exists(string $a_parent_type, int $a_id, string $a_lang="", bool $a_no_cache=false)
Checks whether page exists.
class ilRbacSystem system function like checkAccess, addActiveRole ... Supporting system functions ar...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static _duplicate(string $a_session_id)
Duplicate session.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static ilClone(string $sid, int $copy_identifier)
static shortenTextExtended(string $a_str, int $a_len, bool $a_dots=false, bool $a_next_blank=false, bool $a_keep_extension=false)
static stripSlashes(string $a_str, bool $a_strip_html=true, string $a_allow="")
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
xmlEndTag(string $tag)
Writes an endtag.
xmlData(string $data, bool $encode=true, bool $escape=true)
Writes data.
xmlStartTag(string $tag, ?array $attrs=null, bool $empty=false, bool $encode=true, bool $escape=true)
Writes a starttag.
if(!file_exists(getcwd() . '/ilias.ini.php'))
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Definition: confirmReg.php:20
global $DIC
Definition: feed.php:28
$target_id
Definition: goto.php:52
$ilUser
Definition: imgupload.php:34
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
$client_id
Definition: ltiauth.php:68
$ref_id
Definition: ltiauth.php:67
$res
Definition: ltiservices.php:69
$i
Definition: metadata.php:41
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
string $key
Consumer key/client ID value.
Definition: System.php:193
array $settings
Setting values (LTI parameters, custom parameters and local parameters).
Definition: System.php:200
global $ilSetting
Definition: privfeed.php:17
$query
$type
$log
Definition: result.php:33
$lng