ILIAS  release_8 Revision v8.24
class.ilLearningModuleDataSet.php
Go to the documentation of this file.
1<?php
2
20
33{
35 protected \ILIAS\Notes\Service $notes;
37 protected bool $master_lang_only = false;
38 protected bool $transl_into = false;
40 protected string $transl_lang = "";
41 protected ilLogger$lm_log;
42
43 public function __construct()
44 {
45 global $DIC;
46
48 $this->lm_log = ilLoggerFactory::getLogger('lm');
49 $this->notes = $DIC->notes();
50 $this->reading_time_manager = new ReadingTimeManager();
51 }
52
53 public function setMasterLanguageOnly(bool $a_val): void
54 {
55 $this->master_lang_only = $a_val;
56 }
57
58 public function getMasterLanguageOnly(): bool
59 {
61 }
62
63 public function setTranslationImportMode(
65 string $a_lang = ""
66 ): void {
67 if ($a_lm != null) {
68 $this->transl_into = true;
69 $this->transl_into_lm = $a_lm;
70 $this->transl_lang = $a_lang;
71 } else {
72 $this->transl_into = false;
73 }
74 }
75
76 public function getTranslationImportMode(): bool
77 {
78 return $this->transl_into;
79 }
80
82 {
83 return $this->transl_into_lm;
84 }
85
86 public function getTranslationLang(): string
87 {
88 return $this->transl_lang;
89 }
90
91 public function getSupportedVersions(): array
92 {
93 return array("5.1.0", "5.4.0");
94 }
95
96 protected function getXmlNamespace(string $a_entity, string $a_schema_version): string
97 {
98 return "https://www.ilias.de/xml/Modules/LearningModule/" . $a_entity;
99 }
100
101 protected function getTypes(string $a_entity, string $a_version): array
102 {
103 if ($a_entity == "lm") {
104 switch ($a_version) {
105 case "5.1.0":
106 return array(
107 "Id" => "integer",
108 "Title" => "text",
109 "Description" => "text",
110 "DefaultLayout" => "text",
111 "PageHeader" => "text",
112 "TocActive" => "text",
113 "LMMenuActive" => "text",
114 "TOCMode" => "text",
115 "PrintViewActive" => "text",
116 "Numbering" => "text",
117 "HistUserComments" => "text",
118 "PublicAccessMode" => "text",
119 "PubNotes" => "text",
120 "HeaderPage" => "integer",
121 "FooterPage" => "integer",
122 "LayoutPerPage" => "integer",
123 "Rating" => "integer",
124 "HideHeadFootPrint" => "integer",
125 "DisableDefFeedback" => "integer",
126 "RatingPages" => "integer",
127 "ProgrIcons" => "integer",
128 "StoreTries" => "integer",
129 "RestrictForwNav" => "integer",
130 "Comments" => "integer",
131 "ForTranslation" => "integer",
132 "StyleId" => "integer"
133 );
134
135 case "5.4.0":
136 return array(
137 "Id" => "integer",
138 "Title" => "text",
139 "Description" => "text",
140 "DefaultLayout" => "text",
141 "PageHeader" => "text",
142 "TocActive" => "text",
143 "LMMenuActive" => "text",
144 "TOCMode" => "text",
145 "PrintViewActive" => "text",
146 "NoGloAppendix" => "text",
147 "Numbering" => "text",
148 "HistUserComments" => "text",
149 "PublicAccessMode" => "text",
150 "PubNotes" => "text",
151 "HeaderPage" => "integer",
152 "FooterPage" => "integer",
153 "LayoutPerPage" => "integer",
154 "Rating" => "integer",
155 "HideHeadFootPrint" => "integer",
156 "DisableDefFeedback" => "integer",
157 "RatingPages" => "integer",
158 "ProgrIcons" => "integer",
159 "StoreTries" => "integer",
160 "RestrictForwNav" => "integer",
161 "Comments" => "integer",
162 "ForTranslation" => "integer",
163 "StyleId" => "integer"
164 );
165
166 case "8.0":
167 return array(
168 "Id" => "integer",
169 "Title" => "text",
170 "Description" => "text",
171 "DefaultLayout" => "text",
172 "PageHeader" => "text",
173 "TocActive" => "text",
174 "LMMenuActive" => "text",
175 "TOCMode" => "text",
176 "PrintViewActive" => "text",
177 "NoGloAppendix" => "text",
178 "Numbering" => "text",
179 "HistUserComments" => "text",
180 "PublicAccessMode" => "text",
181 "PubNotes" => "text",
182 "HeaderPage" => "integer",
183 "FooterPage" => "integer",
184 "LayoutPerPage" => "integer",
185 "Rating" => "integer",
186 "HideHeadFootPrint" => "integer",
187 "DisableDefFeedback" => "integer",
188 "RatingPages" => "integer",
189 "ProgrIcons" => "integer",
190 "StoreTries" => "integer",
191 "RestrictForwNav" => "integer",
192 "Comments" => "integer",
193 "ForTranslation" => "integer",
194 "StyleId" => "integer",
195 "EstimatedReadingTime" => "integer"
196 );
197
198 }
199 }
200
201 if ($a_entity == "lm_tree") {
202 switch ($a_version) {
203 case "5.1.0":
204 case "5.4.0":
205 case "8.0":
206 return array(
207 "LmId" => "integer",
208 "Child" => "integer",
209 "Parent" => "integer",
210 "Depth" => "integer",
211 "Type" => "text",
212 "Title" => "text",
213 "ShortTitle" => "text",
214 "PublicAccess" => "text",
215 "Active" => "text",
216 "Layout" => "text",
217 "ImportId" => "text"
218 );
219 }
220 }
221
222 if ($a_entity == "lm_menu") {
223 switch ($a_version) {
224 case "5.1.0":
225 case "5.4.0":
226 case "8.0":
227 return array(
228 "LmId" => "integer",
229 "LinkType" => "text",
230 "Title" => "text",
231 "Target" => "text",
232 "LinkRefId" => "text",
233 "Active" => "text"
234 );
235 }
236 }
237
238 if ($a_entity == "lm_data_transl") {
239 switch ($a_version) {
240 case "5.1.0":
241 case "5.4.0":
242 case "8.0":
243 return array(
244 "Id" => "integer",
245 "Lang" => "text",
246 "Title" => "text",
247 "ShortTitle" => "text"
248 );
249 }
250 }
251 return [];
252 }
253
254 public function readData(string $a_entity, string $a_version, array $a_ids): void
255 {
256 $ilDB = $this->db;
257
258 if (!is_array($a_ids)) {
259 $a_ids = array($a_ids);
260 }
261
262 $q = "";
263 if ($a_entity == "lm") {
264 switch ($a_version) {
265 case "5.1.0":
266 case "5.4.0":
267 case "8.0":
268 switch ($a_version) {
269 case "5.1.0":
270 $q = "SELECT id, title, description," .
271 " default_layout, page_header, toc_active, lm_menu_active, toc_mode, print_view_active, numbering," .
272 " hist_user_comments, public_access_mode, header_page, footer_page, layout_per_page, rating, " .
273 " hide_head_foot_print, disable_def_feedback, rating_pages, store_tries, restrict_forw_nav, progr_icons, stylesheet style_id" .
274 " FROM content_object JOIN object_data ON (content_object.id = object_data.obj_id)" .
275 " WHERE " . $ilDB->in("id", $a_ids, false, "integer");
276 break;
277
278 case "5.4.0":
279 case "8.0":
280 $q = "SELECT id, title, description," .
281 " default_layout, page_header, toc_active, lm_menu_active, toc_mode, print_view_active, numbering," .
282 " hist_user_comments, public_access_mode, no_glo_appendix, header_page, footer_page, layout_per_page, rating, " .
283 " hide_head_foot_print, disable_def_feedback, rating_pages, store_tries, restrict_forw_nav, progr_icons, stylesheet style_id" .
284 " FROM content_object JOIN object_data ON (content_object.id = object_data.obj_id)" .
285 " WHERE " . $ilDB->in("id", $a_ids, false, "integer");
286
287 }
288
289 $set = $ilDB->query($q);
290 $this->data = array();
291 while ($rec = $ilDB->fetchAssoc($set)) {
292 // comments activated?
293 $rec["comments"] = (string) (int)
294 $this->notes->domain()->commentsActive((int) $rec["id"]);
295
296 if ($a_version === "8.0") {
297 $rec["estimated_reading_time"] = (string) (int)
298 $this->reading_time_manager->isActivated((int) $rec["id"]);
299 }
300
301 if ($this->getMasterLanguageOnly()) {
302 $rec["for_translation"] = 1;
303 }
304 $tmp = array();
305 foreach ($rec as $k => $v) {
306 $tmp[$this->convertToLeadingUpper($k)]
307 = $v;
308 }
309 $rec = $tmp;
310 $this->data[] = $rec;
311 }
312 break;
313 }
314 }
315
316 if ($a_entity == "lm_tree") {
317 switch ($a_version) {
318 case "5.1.0":
319 case "5.4.0":
320 case "8.0":
321 // the order by lft is very important, this ensures that parent nodes are written before
322 // their childs and that the import can add nodes simply with a "add at last child" target
323 $q = "SELECT lm_tree.lm_id, child, parent, depth, type, title, short_title, public_access, active, layout, import_id" .
324 " FROM lm_tree JOIN lm_data ON (lm_tree.child = lm_data.obj_id)" .
325 " WHERE " . $ilDB->in("lm_tree.lm_id", $a_ids, false, "integer") .
326 " ORDER BY lft";
327
328 $set = $ilDB->query($q);
329 $this->data = array();
330 $obj_ids = array();
331 while ($rec = $ilDB->fetchAssoc($set)) {
332 $set2 = $ilDB->query("SELECT for_translation FROM content_object WHERE id = " . $ilDB->quote($rec["lm_id"], "integer"));
333 $rec2 = $ilDB->fetchAssoc($set2);
334 if (!$rec2["for_translation"]) {
335 $rec["import_id"] = "il_" . IL_INST_ID . "_" . $rec["type"] . "_" . $rec["child"];
336 }
337 $tmp = array();
338 foreach ($rec as $k => $v) {
339 $tmp[$this->convertToLeadingUpper($k)]
340 = $v;
341 }
342 $rec = $tmp;
343 $obj_ids[] = $rec["Child"];
344 $this->data[] = $rec;
345 }
346
347 // add free pages #18976
348 $set3 = $ilDB->query($q = "SELECT lm_id, type, title, short_title, public_access, active, layout, import_id, obj_id child FROM lm_data " .
349 "WHERE " . $ilDB->in("lm_id", $a_ids, false, "integer") .
350 " AND " . $ilDB->in("obj_id", $obj_ids, true, "integer") .
351 " AND type = " . $ilDB->quote("pg", "text"));
352 while ($rec3 = $ilDB->fetchAssoc($set3)) {
353 $set2 = $ilDB->query("SELECT for_translation FROM content_object WHERE id = " . $ilDB->quote($rec3["lm_id"], "integer"));
354 $rec2 = $ilDB->fetchAssoc($set2);
355 if (!$rec2["for_translation"]) {
356 $rec3["import_id"] = "il_" . IL_INST_ID . "_pg_" . $rec3["child"];
357 }
358 $rec3["type"] = "free_pg";
359 $rec3["depth"] = 0;
360 $rec3["parent"] = 0;
361 $tmp = array();
362 foreach ($rec3 as $k => $v) {
363 $tmp[$this->convertToLeadingUpper($k)]
364 = $v;
365 }
366 $this->data[] = $tmp;
367 }
368 break;
369 }
370 }
371
372 if ($a_entity == "lm_menu") {
373 switch ($a_version) {
374 case "5.1.0":
375 case "5.4.0":
376 case "8.0":
377 $this->getDirectDataFromQuery("SELECT lm_id, link_type, title, target, link_ref_id, active" .
378 " FROM lm_menu " .
379 " WHERE " . $ilDB->in("lm_id", $a_ids, false, "integer"));
380 break;
381 }
382 }
383
384 if ($a_entity == "lm_data_transl") {
385 switch ($a_version) {
386 case "5.1.0":
387 case "5.4.0":
388 case "8.0":
389 $this->getDirectDataFromQuery("SELECT id, lang, title, short_title" .
390 " FROM lm_data_transl " .
391 " WHERE " . $ilDB->in("id", $a_ids, false, "integer"));
392 break;
393 }
394 }
395 }
396
397 protected function getDependencies(
398 string $a_entity,
399 string $a_version,
400 ?array $a_rec = null,
401 ?array $a_ids = null
402 ): array {
403 switch ($a_entity) {
404 case "lm":
405 return array(
406 "lm_tree" => array("ids" => $a_rec["Id"] ?? null),
407 "lm_menu" => array("ids" => $a_rec["Id"] ?? null)
408 );
409
410 case "lm_tree":
411 if ($this->getMasterLanguageOnly()) {
412 return [];
413 } else {
414 return array(
415 "lm_data_transl" => array("ids" => $a_rec["Child"] ?? null)
416 );
417 }
418 }
419
420 return [];
421 }
422
423 public function importRecord(
424 string $a_entity,
425 array $a_types,
426 array $a_rec,
427 ilImportMapping $a_mapping,
428 string $a_schema_version
429 ): void {
430 $a_rec = $this->stripTags($a_rec);
431
432 switch ($a_entity) {
433 case "lm":
434
435 if ($this->getTranslationImportMode()) {
436 return;
437 }
438
439 if ($new_id = $a_mapping->getMapping('Services/Container', 'objs', $a_rec['Id'])) {
440 $newObj = ilObjectFactory::getInstanceByObjId($new_id, false);
441 } else {
442 $newObj = new ilObjLearningModule();
443 $newObj->setType("lm");
444 $newObj->create(true);
445 $newObj->createLMTree();
446 }
447
448 $newObj->setTitle($a_rec["Title"]);
449 $newObj->setDescription($a_rec["Description"]);
450 $newObj->setLayout($a_rec["DefaultLayout"]);
451 $newObj->setPageHeader($a_rec["PageHeader"]);
452 $newObj->setActiveTOC(ilUtil::yn2tf($a_rec["TocActive"]));
453 $newObj->setActiveLMMenu(ilUtil::yn2tf($a_rec["LmMenuActive"]));
454 $newObj->setTOCMode($a_rec["TocMode"]);
455 $newObj->setActivePrintView(ilUtil::yn2tf($a_rec["PrintViewActive"]));
456 $newObj->setActivePreventGlossaryAppendix(ilUtil::yn2tf($a_rec["NoGloAppendix"]));
457 $newObj->setActiveNumbering(ilUtil::yn2tf($a_rec["Numbering"]));
458 $newObj->setHistoryUserComments(ilUtil::yn2tf($a_rec["HistUserComments"]));
459 $newObj->setPublicAccessMode($a_rec["PublicAccessMode"]);
460 $newObj->setPublicNotes(ilUtil::yn2tf($a_rec["PubNotes"] ?? "n"));
461 // Header Page/ Footer Page ???
462 $newObj->setLayoutPerPage($a_rec["LayoutPerPage"]);
463 $newObj->setRating($a_rec["Rating"]);
464 $newObj->setHideHeaderFooterPrint($a_rec["HideHeadFootPrint"]);
465 $newObj->setDisableDefaultFeedback($a_rec["DisableDefFeedback"]);
466 $newObj->setRatingPages($a_rec["RatingPages"]);
467 $newObj->setForTranslation($a_rec["ForTranslation"] ?? false);
468 $newObj->setProgressIcons($a_rec["ProgrIcons"]);
469 $newObj->setStoreTries($a_rec["StoreTries"]);
470 $newObj->setRestrictForwardNavigation($a_rec["RestrictForwNav"]);
471 if ($a_rec["HeaderPage"] > 0) {
472 $a_mapping->addMapping("Modules/LearningModule", "lm_header_page", $a_rec["HeaderPage"], "-");
473 }
474 if ($a_rec["FooterPage"] > 0) {
475 $a_mapping->addMapping("Modules/LearningModule", "lm_footer_page", $a_rec["FooterPage"], "-");
476 }
477
478 $newObj->update();
479 $this->current_obj = $newObj;
480
481 // activated comments
482 $this->notes->domain()->activateComments($newObj->getId());
483 if ($a_rec["EstimatedReadingTime"] ?? false) {
484 $this->reading_time_manager->activate($newObj->getId(), true);
485 }
486
487 $a_mapping->addMapping("Modules/LearningModule", "lm", $a_rec["Id"], $newObj->getId());
488 $a_mapping->addMapping("Modules/LearningModule", "lm_style", $newObj->getId(), $a_rec["StyleId"]);
489 $a_mapping->addMapping("Services/Object", "obj", $a_rec["Id"], $newObj->getId());
490 $a_mapping->addMapping(
491 "Services/MetaData",
492 "md",
493 $a_rec["Id"] . ":0:lm",
494 $newObj->getId() . ":0:lm"
495 );
496 break;
497
498 case "lm_tree":
499 if (!$this->getTranslationImportMode()) {
500 switch ($a_rec["Type"]) {
501 case "st":
502 $parent = (int) $a_mapping->getMapping("Modules/LearningModule", "lm_tree", $a_rec["Parent"]);
503 $st_obj = new ilStructureObject($this->current_obj);
504 $st_obj->setType("st");
505 $st_obj->setLMId($this->current_obj->getId());
506 $st_obj->setTitle($a_rec["Title"]);
507 $st_obj->setShortTitle($a_rec["ShortTitle"]);
508 $st_obj->setImportId($a_rec["ImportId"]);
509 $st_obj->create(true);
511 $a_mapping->addMapping(
512 "Modules/LearningModule",
513 "lm_tree",
514 $a_rec["Child"],
515 $st_obj->getId()
516 );
517 $a_mapping->addMapping(
518 "Services/MetaData",
519 "md",
520 $a_rec["LmId"] . ":" . $a_rec["Child"] . ":st",
521 $this->current_obj->getId() . ":" . $st_obj->getId() . ":st"
522 );
523 break;
524
525 case "pg":
526 $parent = (int) $a_mapping->getMapping("Modules/LearningModule", "lm_tree", $a_rec["Parent"]);
527 $pg_obj = new ilLMPageObject($this->current_obj);
528 $pg_obj->setType("pg");
529 $pg_obj->setLMId($this->current_obj->getId());
530 $pg_obj->setTitle($a_rec["Title"]);
531 $pg_obj->setShortTitle($a_rec["ShortTitle"]);
532 $pg_obj->setImportId($a_rec["ImportId"]);
533 $pg_obj->create(true, true);
535 $a_mapping->addMapping(
536 "Modules/LearningModule",
537 "lm_tree",
538 $a_rec["Child"],
539 $pg_obj->getId()
540 );
541 $a_mapping->addMapping("Modules/LearningModule", "pg", $a_rec["Child"], $pg_obj->getId());
542 $this->lm_log->debug("add pg map (1), old : " . $a_rec["Child"] . ", new: " . $pg_obj->getId());
543 $a_mapping->addMapping(
544 "Services/COPage",
545 "pg",
546 "lm:" . $a_rec["Child"],
547 "lm:" . $pg_obj->getId()
548 );
549 $a_mapping->addMapping(
550 "Services/MetaData",
551 "md",
552 $a_rec["LmId"] . ":" . $a_rec["Child"] . ":pg",
553 $this->current_obj->getId() . ":" . $pg_obj->getId() . ":pg"
554 );
555 break;
556
557 // add free pages #18976
558 case "free_pg":
559 $pg_obj = new ilLMPageObject($this->current_obj);
560 $pg_obj->setType("pg");
561 $pg_obj->setLMId($this->current_obj->getId());
562 $pg_obj->setTitle($a_rec["Title"]);
563 $pg_obj->setShortTitle($a_rec["ShortTitle"]);
564 $pg_obj->setImportId($a_rec["ImportId"]);
565 $pg_obj->create(true, true);
566 $a_mapping->addMapping(
567 "Modules/LearningModule",
568 "lm_tree",
569 $a_rec["Child"],
570 $pg_obj->getId()
571 );
572 $a_mapping->addMapping("Modules/LearningModule", "pg", $a_rec["Child"], $pg_obj->getId());
573 $this->lm_log->debug("add pg map (2), old : " . $a_rec["Child"] . ", new: " . $pg_obj->getId());
574 $a_mapping->addMapping(
575 "Services/COPage",
576 "pg",
577 "lm:" . $a_rec["Child"],
578 "lm:" . $pg_obj->getId()
579 );
580 $a_mapping->addMapping(
581 "Services/MetaData",
582 "md",
583 $a_rec["LmId"] . ":" . $a_rec["Child"] . ":pg",
584 $this->current_obj->getId() . ":" . $pg_obj->getId() . ":pg"
585 );
586 break;
587 }
588 } else {
589 switch ($a_rec["Type"]) {
590 case "st":
591 //"il_inst_st_66"
592 $imp_id = explode("_", $a_rec["ImportId"]);
593 if ($imp_id[0] == "il" &&
594 (int) $imp_id[1] == (int) IL_INST_ID &&
595 $imp_id[2] == "st"
596 ) {
597 $st_id = $imp_id[3];
598 if (ilLMObject::_lookupContObjID($st_id) == $this->getTranslationLM()->getId()) {
599 $trans = new ilLMObjTranslation($st_id, $this->getTranslationLang());
600 $trans->setTitle($a_rec["Title"]);
601 $trans->save();
602 $a_mapping->addMapping(
603 "Modules/LearningModule",
604 "link",
605 "il_" . $this->getCurrentInstallationId() . "_" . $a_rec["Type"] . "_" . $a_rec["Child"],
606 $a_rec["ImportId"]
607 );
608 }
609 }
610 // no meta-data mapping, since we do not want to import metadata
611 break;
612
613 case "pg":
614 //"il_inst_pg_66"
615 $imp_id = explode("_", $a_rec["ImportId"]);
616 if ($imp_id[0] == "il" &&
617 (int) $imp_id[1] == (int) IL_INST_ID &&
618 $imp_id[2] == "pg"
619 ) {
620 $pg_id = $imp_id[3];
621 if (ilLMObject::_lookupContObjID($pg_id) == $this->getTranslationLM()->getId()) {
622 $trans = new ilLMObjTranslation($pg_id, $this->getTranslationLang());
623 $trans->setTitle($a_rec["Title"]);
624 $trans->save();
625 $a_mapping->addMapping("Modules/LearningModule", "pg", $a_rec["Child"], $pg_id);
626 $this->lm_log->debug("add pg map (3), old : " . $a_rec["Child"] . ", new: " . $pg_id);
627 $a_mapping->addMapping(
628 "Modules/LearningModule",
629 "link",
630 "il_" . $this->getCurrentInstallationId() . "_" . $a_rec["Type"] . "_" . $a_rec["Child"],
631 $a_rec["ImportId"]
632 );
633 $a_mapping->addMapping(
634 "Services/COPage",
635 "pg",
636 "lm:" . $a_rec["Child"],
637 "lm:" . $pg_id
638 );
639 }
640 }
641 // no meta-data mapping, since we do not want to import metadata
642 break;
643 }
644 }
645 break;
646
647 case "lm_data_transl":
648 if (!$this->getTranslationImportMode()) {
649 // save page/chapter title translation
650 $lm_obj_id = $a_mapping->getMapping("Modules/LearningModule", "lm_tree", $a_rec["Id"]);
651 if ($lm_obj_id > 0) {
652 $t = new ilLMObjTranslation($lm_obj_id, $a_rec["Lang"]);
653 $t->setTitle($a_rec["Title"]);
654 $t->setShortTitle($a_rec["ShortTitle"]);
655 $t->save();
656 }
657 }
658 break;
659
660 case "lm_menu":
661 $lm_id = (int) $a_mapping->getMapping("Modules/LearningModule", "lm", $a_rec["LmId"]);
662 if ($lm_id > 0) {
663 $lm_menu_ed = new ilLMMenuEditor();
664 $lm_menu_ed->setObjId($lm_id);
665 $lm_menu_ed->setTitle($a_rec["Title"]);
666 $lm_menu_ed->setTarget($a_rec["Target"]);
667 $lm_menu_ed->setLinkType($a_rec["LinkType"]);
668 $lm_menu_ed->setLinkRefId($a_rec["LinkRefId"]);
669 $lm_menu_ed->setActive($a_rec["Active"]);
670 $lm_menu_ed->create();
671 }
672 break;
673 }
674 }
675}
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...
addMapping(string $a_comp, string $a_entity, string $a_old_id, string $a_new_id)
getMapping(string $a_comp, string $a_entity, string $a_old_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...
static _lookupContObjID(int $a_id)
get learning module id for lm object
static putInTree(ilLMObject $a_obj, int $a_parent_id=0, int $a_target_node_id=0)
put this object into content object tree
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
LearningModule Data set class.
getXmlNamespace(string $a_entity, string $a_schema_version)
setTranslationImportMode(ilObjLearningModule $a_lm, string $a_lang="")
importRecord(string $a_entity, array $a_types, array $a_rec, ilImportMapping $a_mapping, string $a_schema_version)
Needs to be overwritten for import use case.
getDependencies(string $a_entity, string $a_version, ?array $a_rec=null, ?array $a_ids=null)
getTypes(string $a_entity, string $a_version)
Get (abstract) types for (abstract) field names.
readData(string $a_entity, string $a_version, array $a_ids)
Read data from DB.
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...
static getInstanceByObjId(?int $obj_id, bool $stop_on_error=true)
get an instance of an Ilias object by object id
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
const POS_LAST_NODE
static yn2tf(string $a_yn)
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
const IL_INST_ID
Definition: constants.php:40
global $DIC
Definition: feed.php:28
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc