59 $this->
user = $DIC->user();
61 $this->db = $DIC->database();
62 $this->lom_services = $DIC->learningObjectMetadata();
87 $paths = $this->lom_services->paths();
88 $reader = $this->lom_services->read(
92 $paths->custom()->withNextStep(
'general')->get()
94 $title = $reader->firstData($paths->title())->value();
102 $obj_lp->getCurrentMode(),
121 $this->lom_services->derive()
122 ->fromBasicProperties(
125 $ilUser->getPref(
'language')
135 ->prepareCreateOrUpdate(
136 $this->lom_services->paths()->title(),
157 $this->data_record = $a_record;
164 if (!isset($this->data_record)) {
165 $query =
"SELECT * FROM lm_data WHERE obj_id = " .
166 $ilDB->quote($this->
id,
"integer");
167 $obj_set =
$ilDB->query($query);
168 $this->data_record =
$ilDB->fetchAssoc($obj_set);
171 $this->type = $this->data_record[
"type"];
172 $this->
setImportId((
string) $this->data_record[
"import_id"]);
173 $this->
setTitle((
string) $this->data_record[
"title"]);
174 $this->
setShortTitle((
string) $this->data_record[
"short_title"]);
175 $this->
setLayout((
string) $this->data_record[
"layout"]);
187 $ilDB = $DIC->database();
190 "SELECT * FROM lm_data " .
191 " WHERE lm_id = " .
$ilDB->quote($a_lm_id,
"integer")
193 while ($rec =
$ilDB->fetchAssoc($set)) {
194 self::$data_records[$rec[
"obj_id"]] = $rec;
196 return count(self::$data_records);
201 $this->title = $a_title;
211 $this->short_title = $a_title;
219 protected static function _lookup(
int $a_obj_id,
string $a_field): string
223 $ilDB = $DIC->database();
225 if (isset(self::$data_records[$a_obj_id])) {
226 return self::$data_records[$a_obj_id][$a_field] ??
"";
229 $query =
"SELECT " . $a_field .
" FROM lm_data WHERE obj_id = " .
230 $ilDB->quote($a_obj_id,
"integer");
231 $obj_set =
$ilDB->query($query);
232 $obj_rec =
$ilDB->fetchAssoc($obj_set);
234 return $obj_rec[$a_field] ??
"";
239 return self::_lookup($a_obj_id,
"title");
244 return self::_lookup($a_obj_id,
"short_title");
247 public static function _lookupType(
int $a_obj_id,
int $a_lm_id = 0): string
251 $ilDB = $DIC->database();
253 if (isset(self::$data_records[$a_obj_id])) {
254 if ($a_lm_id == 0 || self::$data_records[$a_obj_id][
"lm_id"] == $a_lm_id) {
255 return self::$data_records[$a_obj_id][
"type"];
261 $and =
' AND lm_id = ' .
$ilDB->quote($a_lm_id,
'integer');
264 $query =
"SELECT type FROM lm_data WHERE obj_id = " .
$ilDB->quote($a_obj_id,
"integer") . $and;
265 $obj_set =
$ilDB->query($query);
266 $obj_rec =
$ilDB->fetchAssoc($obj_set);
268 return $obj_rec[
"type"] ??
"";
272 public static function _writeTitle(
int $a_obj_id,
string $a_title): void
276 $ilDB = $DIC->database();
278 $query =
"UPDATE lm_data SET " .
279 " title = " .
$ilDB->quote($a_title,
"text") .
280 " WHERE obj_id = " .
$ilDB->quote($a_obj_id,
"integer");
281 $ilDB->manipulate($query);
287 $this->description = $a_description;
297 $this->type = $a_type;
307 $this->lm_id = $a_lm_id;
317 $this->content_object = $a_content_obj;
325 public function setId(
int $a_id): void
342 $this->import_id = $a_id;
347 $this->layout = $a_val;
359 $ilDB = $DIC->database();
361 $q =
"UPDATE lm_data " .
363 "import_id = " .
$ilDB->quote($a_import_id,
"text") .
"," .
364 "last_update = " .
$ilDB->now() .
" " .
365 "WHERE obj_id = " .
$ilDB->quote($a_id,
"integer");
370 public function create(
bool $a_upload =
false): void
376 $query =
"INSERT INTO lm_data (obj_id, title, type, layout, lm_id, import_id, short_title, create_date) " .
378 $ilDB->quote($this->
getId(),
"integer") .
"," .
385 ", " .
$ilDB->now() .
")";
386 $ilDB->manipulate($query);
399 $query =
"UPDATE lm_data SET " .
400 " lm_id = " .
$ilDB->quote($this->
getLMId(),
"integer") .
404 " WHERE obj_id = " .
$ilDB->quote($this->
getId(),
"integer");
406 $ilDB->manipulate($query);
409 public function delete(
bool $a_delete_meta_data =
true):
void 413 $query =
"DELETE FROM lm_data WHERE obj_id = " .
415 $ilDB->manipulate($query);
431 $ilDB = $DIC->database();
432 $help_module = $DIC->help()->internal()->domain()->module();
434 $q =
"SELECT obj_id FROM lm_data WHERE import_id = " .
435 $ilDB->quote($a_import_id,
"text") .
" " .
436 " ORDER BY create_date DESC";
438 while ($obj_rec =
$ilDB->fetchAssoc($obj_set)) {
444 $help_module->isHelpLM($lm_id)) {
445 return $obj_rec[
"obj_id"];
463 $ilDB = $DIC->database();
465 $where = ($a_in_lm > 0)
466 ?
" AND lm_id = " .
$ilDB->quote($a_in_lm,
"integer") .
" " 469 $q =
"SELECT * FROM lm_data WHERE import_id = " .
470 $ilDB->quote($a_import_id,
"text") .
" " .
472 " ORDER BY create_date DESC";
476 while ($obj_rec =
$ilDB->fetchAssoc($obj_set)) {
489 public static function _exists(
int $a_id): bool
493 $ilDB = $DIC->database();
495 if (is_int(strpos($a_id,
"_"))) {
499 $q =
"SELECT * FROM lm_data WHERE obj_id = " .
500 $ilDB->quote($a_id,
"integer");
502 if ($obj_rec =
$ilDB->fetchAssoc($obj_set)) {
515 $ilDB = $DIC->database();
517 $type_str = ($type !=
"")
518 ?
"AND type = " .
$ilDB->quote($type,
"text") .
" " 521 $query =
"SELECT * FROM lm_data " .
522 "WHERE lm_id= " .
$ilDB->quote($lm_id,
"integer") .
" " .
525 $obj_set =
$ilDB->query($query);
527 while ($obj_rec =
$ilDB->fetchAssoc($obj_set)) {
528 $obj_list[] = array(
"obj_id" => $obj_rec[
"obj_id"],
529 "title" => $obj_rec[
"title"],
530 "import_id" => $obj_rec[
"import_id"],
531 "type" => $obj_rec[
"type"]);
545 $ilDB = $DIC->database();
547 $query =
"SELECT * FROM lm_data " .
548 "WHERE lm_id= " .
$ilDB->quote($a_cobj->
getId(),
"integer");
549 $obj_set =
$ilDB->query($query);
551 while ($obj_rec =
$ilDB->fetchAssoc($obj_set)) {
554 if (is_object($lm_obj)) {
555 $lm_obj->delete(
true);
567 $ilDB = $DIC->database();
569 if (isset(self::$data_records[$a_id])) {
570 return self::$data_records[$a_id][
"lm_id"];
573 $query =
"SELECT lm_id FROM lm_data WHERE obj_id = " .
574 $ilDB->quote($a_id,
"integer");
575 $obj_set =
$ilDB->query($query);
576 $obj_rec =
$ilDB->fetchAssoc($obj_set);
578 return (
int) ($obj_rec[
"lm_id"] ?? 0);
586 int $a_parent_id = 0,
587 int $a_target_node_id = 0
591 $ilLog = $DIC[
"ilLog"];
596 $parent_id = ($a_parent_id != 0)
598 : $tree->getRootId();
601 if ($a_target_node_id != 0) {
602 $target = $a_target_node_id;
605 if ($a_obj->
getType() ==
"st") {
606 $s_types = array(
"st",
"pg");
607 $childs = $tree->getChildsByTypeFilter($parent_id, $s_types);
610 $childs = $tree->getChildsByType($parent_id, $s_types);
613 if (count($childs) == 0) {
616 $target = $childs[count($childs) - 1][
"obj_id"];
620 if ($tree->isInTree($parent_id) && !$tree->isInTree($a_obj->
getId())) {
621 $ilLog->write(
"LMObject::putInTree: insertNode, ID: " . $a_obj->
getId() .
622 "Parent ID: " . $parent_id .
", Target: " . $target);
624 $tree->insertNode($a_obj->
getId(), $parent_id, $target);
634 $tree =
new ilLMTree($a_cont_obj_id);
650 if (!is_array($a_ids)) {
654 foreach ($a_ids as $id) {
655 $path = $tree->getPathId($id);
657 foreach (
$path as $path_id) {
658 if ($path_id != $id && in_array($path_id, $a_ids)) {
673 foreach ($cut_ids as $id) {
674 $curnode = $tree->getNodeData($id);
675 if ($tree->isInTree($id)) {
676 $tree->deleteTree($curnode);
690 $ilUser = $DIC->user();
694 $ilUser->clipboardDeleteObjectsOfType(
"pg");
695 $ilUser->clipboardDeleteObjectsOfType(
"st");
698 $time = date(
"Y-m-d H:i:s", time());
700 foreach ($a_ids as $id) {
702 if ($tree->isInTree($id)) {
703 $curnode = $tree->getNodeData($id);
704 $subnodes = $tree->getSubTree($curnode);
705 foreach ($subnodes as $subnode) {
706 if ($subnode[
"child"] != $id) {
707 $ilUser->addObjectToClipboard(
718 $order = (($curnode[
"lft"] ?? 0) > 0)
720 : (
int) ($order + 1);
721 $ilUser->addObjectToClipboard(
723 self::_lookupType($id),
735 public static function pasteTree(
740 string $a_insert_time,
741 array &$a_copied_nodes,
742 bool $a_as_copy =
false,
748 $ilUser = $DIC->user();
749 $ilLog = $DIC[
"ilLog"];
750 $lom_services = $DIC->learningObjectMetadata();
756 if ($item_type ==
"st") {
758 } elseif ($item_type ==
"pg") {
762 $ilLog->write(
"Getting from clipboard type " . $item_type .
", " .
763 "Item ID: " . $a_item_id .
", of original LM: " . $item_lm_id);
765 if ($item_lm_id != $a_target_lm->
getId() && !$a_as_copy) {
769 $lom_services->derive()
770 ->fromObject($item_lm_id, $item->getId(), $item->getType())
771 ->forObject($a_target_lm->
getId(), $item->getId(), $item->getType());
774 $lom_services->deleteAll($item_lm_id, $item->getId(), $item->getType());
776 if ($item_type ==
"pg") {
777 $page = $item->getPageObject();
779 $page->setParentId($a_target_lm->
getId());
785 $target_item = $item->copy($a_target_lm);
786 $a_copied_nodes[$item->getId()] = $target_item->getId();
788 $target_item = $item;
791 $ilLog->write(
"Putting into tree type " . $target_item->getType() .
792 "Item ID: " . $target_item->getId() .
", Parent: " . $a_parent_id .
", " .
793 "Target: " . $a_target .
", Item LM:" . $target_item->getContentObject()->getId());
797 if ($a_source_lm ==
null) {
798 $childs = $ilUser->getClipboardChilds($item->getId(), $a_insert_time);
800 $childs = $a_source_lm->lm_tree->getChilds($item->getId());
801 foreach ($childs as $k => $child) {
802 $childs[$k][
"id"] = $child[
"child"];
806 foreach ($childs as $child) {
807 ilLMObject::pasteTree(
810 $target_item->
getId(),
819 return $target_item->getId();
833 $lom_services = $DIC->learningObjectMetadata();
838 if (is_array($a_titles)) {
839 foreach ($a_titles as $id => $title) {
840 self::saveTitle($id, $title, $a_lang);
845 public static function saveTitle(
int $id,
string $title,
string $lang =
"-"): void
849 $lom_services = $DIC->learningObjectMetadata();
851 if (in_array(
$lang, [
"-",
""])) {
852 $lm_id = self::_lookupContObjID($id);
853 $type = self::_lookupType($id);
854 if ($type !==
"" && $lm_id > 0) {
855 $lom_services->manipulate($lm_id, $id, $type)
856 ->prepareCreateOrUpdate(
857 $lom_services->paths()->title(),
860 self::_writeTitle($id, $title);
864 $lmobjtrans->setTitle($title);
873 array $a_copied_nodes,
874 string $a_parent_type =
"lm" 876 $all_fixes = array();
877 foreach ($a_copied_nodes as $original_id => $copied_id) {
881 if ($copied_type ==
"pg") {
887 $tpg =
new ilLMPage($copied_id, 0, $l);
889 $il = $tpg->getInternalLinks();
891 foreach ($il as $l2) {
897 foreach ($targets as $target) {
898 if (($target[
"inst"] == 0 || $target[
"inst"] =
IL_INST_ID) &&
899 ($target[
"type"] ==
"pg" || $target[
"type"] ==
"st")) {
901 if (($a_copied_nodes[$target[
"id"]] ?? 0) > 0) {
902 $fix[$target[
"id"]] = $a_copied_nodes[$target[
"id"]];
908 if ($trg_lm != $copy_lm) {
912 foreach ($lm_data as $item) {
913 if (!$found && ($item[
"lm_id"] == $copy_lm)) {
914 $fix[$target[
"id"]] = $item[
"obj_id"];
924 if (count($fix) > 0) {
928 if (isset($all_fixes[$t .
":" . $copied_id])) {
929 $all_fixes[$t .
":" . $copied_id] += $fix;
931 $all_fixes[$t .
":" . $copied_id] = $fix;
937 if ($copied_type ==
"pg" ||
938 $copied_type ==
"st") {
949 if ($original_lm != $copy_lm) {
965 foreach ($mobs as $mob) {
974 foreach ($usages as $usage) {
975 if ($usage[
"type"] ==
"lm:pg" | $usage[
"type"] ==
"lm:st") {
981 foreach ($sources as $source) {
982 $stype = explode(
":", $source[
"type"]);
983 $source_type = $stype[1] ??
"";
985 if ($source_type ==
"pg" || $source_type ==
"st") {
989 if ($src_lm == $original_lm) {
993 "il__" . $source_type .
"_" . $source[
"id"],
997 foreach ($lm_data as $item) {
999 $fix[$item[
"obj_id"]][$original_id] = $copied_id;
1007 if (count($fix) > 0) {
1008 foreach ($fix as $page_id => $fix_array) {
1010 if (isset($all_fixes[$t .
":" . $page_id])) {
1011 $all_fixes[$t .
":" . $page_id] += $fix_array;
1013 $all_fixes[$t .
":" . $page_id] = $fix_array;
1021 foreach ($all_fixes as $pg => $fixes) {
1022 $pg = explode(
":", $pg);
1025 if ($page->moveIntLinks($fixes)) {
1026 $page->update(
true,
true);
1038 if (is_array($a_items)) {
1039 foreach ($a_items as $item) {
1045 if (count($types) > 1) {
1061 $ilDB = $DIC->database();
1066 $query =
"UPDATE lm_data SET " .
1067 " layout = " .
$ilDB->quote($a_layout,
"text") .
1068 " WHERE obj_id = " .
$ilDB->quote($a_obj_id,
"integer");
1069 $ilDB->manipulate($query);
1070 } elseif ($t ==
"st" && is_object($a_lm)) {
1071 $node = $a_lm->getLMTree()->getNodeData($a_obj_id);
1072 $child_nodes = $a_lm->getLMTree()->getSubTree($node);
1073 if (is_array($child_nodes) && count($child_nodes) > 0) {
1074 foreach ($child_nodes as
$c) {
1075 if ($c[
"type"] ==
"pg") {
1076 $query =
"UPDATE lm_data SET " .
1077 " layout = " .
$ilDB->quote($a_layout,
"text") .
1078 " WHERE obj_id = " .
$ilDB->quote($c[
"child"],
"integer");
1079 $ilDB->manipulate($query);
1093 $ilDB = $DIC->database();
1095 $query =
"SELECT layout FROM lm_data WHERE obj_id = " .
1096 $ilDB->quote($a_obj_id,
"integer");
1097 $obj_set =
$ilDB->query($query);
1098 $obj_rec =
$ilDB->fetchAssoc($obj_set);
1100 return $obj_rec[
"layout"];
1111 $lm_tree =
new ilTree($a_lm_id);
1112 $lm_tree->setTableNames(
'lm_tree',
'lm_data');
1113 $lm_tree->setTreeTablePK(
"lm_id");
1114 $lm_tree->readRootId();
1116 $childs = $lm_tree->getChildsByType($a_chap_id,
"pg");
1130 $ilDB = $DIC->database();
1132 $and = ($a_type !=
"")
1133 ?
" AND type = " .
$ilDB->quote($a_type,
"text")
1136 $set =
$ilDB->query(
"SELECT obj_id FROM lm_data " .
1137 " WHERE lm_id = " .
$ilDB->quote($a_lm_id,
"integer") . $and);
1139 while ($rec =
$ilDB->fetchAssoc($set)) {
1140 $obj_ids[] = $rec[
"obj_id"];
1155 string $a_type =
"pg" 1159 $manipulator = $DIC->learningObjectMetadata()->manipulate($a_lm_id, $a_lmobj_id, $a_type);
1160 if (trim($a_exp_id) ==
"") {
1161 $manipulator = $manipulator->prepareDelete(self::getPathToExportIDInLOM());
1163 $manipulator = $manipulator->prepareCreateOrUpdate(self::getPathToExportIDInLOM(), $a_exp_id);
1165 $manipulator->execute();
1172 return $DIC->learningObjectMetadata()
1175 ->withNextStep(
'general')
1176 ->withNextStep(
'identifier')
1177 ->withNextStep(
'catalog')
1179 ->withNextStepToSuperElement()
1180 ->withNextStep(
'entry')
1187 string $a_type =
"pg" 1192 $export_id_path = self::getPathToExportIDInLOM();
1193 return $DIC->learningObjectMetadata()->read(
1198 )->firstData($export_id_path)->value();
1207 string $a_type =
"pg" 1209 $searcher = $this->lom_services->search();
1211 $search_clause = $searcher->getClauseFactory()->getBasicClause(
1212 self::getPathToExportIDInLOM(),
1222 return count(iterator_to_array(
$results)) > 0;
1230 string $a_type =
"pg" 1234 $lom_services = $DIC->learningObjectMetadata();
1235 $export_id_path = self::getPathToExportIDInLOM();
1237 $searcher = $lom_services->search();
1238 $search_clause = $searcher->getClauseFactory()->getBasicClause(
1244 $search_results = $searcher->execute(
1252 foreach ($search_results as $search_result) {
1256 $reader = $lom_services->read(
1257 $search_result->objID(),
1258 $search_result->subID(),
1259 $search_result->type(),
1262 foreach ($reader->allData($export_id_path) as $export_id_datum) {
1263 $export_id = trim($export_id_datum->value());
1264 $res[$export_id] = ($res[$export_id] ?? 0) + 1;
1273 string $a_mode = self::PAGE_TITLE,
1274 bool $a_include_numbers =
false,
1275 bool $a_time_scheduled_activation =
false,
1276 bool $a_force_content =
false,
1278 string $a_lang =
"-" 1280 if ($a_lang ==
"") {
1284 if ($a_node[
"type"] ==
"st") {
1287 self::CHAPTER_TITLE,
1289 $a_time_scheduled_activation,
1299 $a_time_scheduled_activation,
1309 string $a_lang =
"-" 1313 $db = $DIC->database();
1315 $title_data = array();
1316 if ($a_lang ==
"-") {
1317 $set = $db->
query(
"SELECT t.child, d.obj_id, d.title, d.short_title FROM lm_data d LEFT JOIN lm_tree t ON (d.obj_id = t.child) WHERE d.lm_id = " .
1318 $db->
quote($a_lm_id,
"integer") .
" ORDER BY t.lft, d.title");
1320 $set = $db->
query(
"SELECT t.child, d.obj_id, tr.title, tr.short_title, d.title default_title, d.short_title default_short_title FROM lm_data d " .
1321 " LEFT JOIN lm_tree t ON (d.obj_id = t.child) " .
1322 " LEFT JOIN lm_data_transl tr ON (tr.id = d.obj_id AND tr.lang=" . $db->
quote($a_lang,
"text") .
") WHERE d.lm_id = " .
1323 $db->
quote($a_lm_id,
"integer") .
" ORDER BY t.lft, d.title");
1326 $title_data[] = $rec;
1333 string $a_short_title,
1334 string $a_lang =
"-" 1338 $db = $DIC->database();
1340 if ($a_lang !=
"-" && $a_lang !=
"") {
1342 $trans->setShortTitle($a_short_title);
1346 "UPDATE lm_data SET " .
1347 " short_title = " . $db->
quote($a_short_title,
"text") .
1348 " WHERE obj_id = " . $db->
quote($a_id,
"integer")
static updateInternalLinks(array $a_copied_nodes, string $a_parent_type="lm")
Update internal links, after multiple pages have been copied.
static _getPresentationTitle(int $a_st_id, string $a_mode=self::CHAPTER_TITLE, bool $a_include_numbers=false, bool $a_time_scheduled_activation=false, bool $a_force_content=false, int $a_lm_id=0, string $a_lang="-", bool $a_include_short=false)
static _getMobsForTarget(string $a_type, string $a_target)
Get areas for a certain target.
setDescription(string $a_description)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static _getSourcesOfTarget(string $a_target_type, int $a_target_id, int $a_target_inst)
get all sources of a link target
static getExportId(int $a_lm_id, int $a_lmobj_id, string $a_type="pg")
static _extractObjIdOfTarget(string $a_target)
Extract object id out of target.
static _getAllObjectsForImportId(string $a_import_id, int $a_in_lm=0)
Get all items for an import ID.
static saveTitles(ilObjLearningModule $a_lm, array $a_titles, string $a_lang="-")
Save titles for lm objects.
fetchAssoc(ilDBStatement $statement)
static _getAllReferences(int $id)
get all reference ids for object ID
static _deleteAllObjectData(ilObjLearningModule $a_cobj)
delete all objects of content object (digi book / learning module)
static uniqueTypesCheck(array $a_items)
Check for unique types (all pages or all chapters)
static getInstance(ilObjLearningModule $a_content_obj, int $a_id=0, bool $a_halt=true)
MDUpdateListener(string $a_element)
Meta data update listener Important note: Do never call create() or update() method of ilObject here...
create(bool $a_upload=false)
static _hasUntrashedReference(int $obj_id)
checks whether an object has at least one reference that is not in trash
static _lookupShortTitle(int $a_obj_id)
static getObjectList(int $lm_id, string $type="")
const LP_MODE_COLLECTION_TLT
quote($value, string $type)
static preloadDataByLM(int $a_lm_id)
Preload data records by lm.
static clipboardCut(int $a_cont_obj_id, array $a_ids)
Copy a set of chapters/pages into the clipboard.
static subStr(string $a_str, int $a_start, ?int $a_length=null)
static getTree(int $a_cont_obj_id)
Get learning module tree.
static lookupTranslations(string $a_parent_type, int $a_id)
Lookup translations.
static putInTree(ilLMObject $a_obj, int $a_parent_id=0, int $a_target_node_id=0)
put this object into content object tree
static _extractInstOfTarget(string $a_target)
Extract installation id out of target.
static writeShortTitle(int $a_id, string $a_short_title, string $a_lang="-")
static _lookupTitle(int $a_obj_id)
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
__construct(ilObjLearningModule $a_content_obj, int $a_id=0)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static writeLayout(int $a_obj_id, string $a_layout, ?ilObjLearningModule $a_lm=null)
Write layout setting.
LOMServices $lom_services
static getPathToExportIDInLOM()
static _getIdForImportId(string $a_import_id)
get current object id for import id (static)
static getPagesOfChapter(int $a_lm_id, int $a_chap_id)
Get pages of chapter.
static _refreshStatus(int $a_obj_id, ?array $a_users=null)
query(string $query)
Run a (read-only) Query on the database.
static saveTitle(int $id, string $title, string $lang="-")
setTitle(string $a_title)
updateMetaData()
update meta data entry
setImportId(string $a_id)
static _getAllLMObjectsOfLM(int $a_lm_id, string $a_type="")
Get all objects of learning module.
existsExportID(int $a_lm_id, int $a_exp_id, string $a_type="pg")
Does export ID exist in lm?
static _writeImportId(int $a_id, string $a_import_id)
static _writeTitle(int $a_obj_id, string $a_title)
setShortTitle(string $a_title)
static getInstanceByObjId(?int $obj_id, bool $stop_on_error=true)
get an instance of an Ilias object by object id
static _exists(int $a_id)
checks wether a lm content object with specified id exists or not
static saveExportId(int $a_lm_id, int $a_lmobj_id, string $a_exp_id, string $a_type="pg")
static getShortTitles(int $a_lm_id, string $a_lang="-")
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
createMetaData()
create meta data entry
static _getPresentationTitle(int $a_pg_id, string $a_mode=self::CHAPTER_TITLE, bool $a_include_numbers=false, bool $a_time_scheduled_activation=false, bool $a_force_content=false, int $a_lm_id=0, string $a_lang="-", bool $a_include_short=false)
presentation title doesn't have to be page title, it may be chapter title + page title or chapter tit...
static getDuplicateExportIDs(int $a_lm_id, string $a_type="pg")
Get duplicate export IDs (count export ID usages)
static _lookupType(int $a_obj_id, int $a_lm_id=0)
static _lookupContObjID(int $a_id)
get learning module id for lm object
deleteMetaData()
delete meta data entry
ilObjLearningModule $content_object
static lookupLayout(int $a_obj_id)
Lookup type.
manipulate(string $query)
Run a (write) Query on the database.
static _lookupType(int $id, bool $reference=false)
setContentObject(ilObjLearningModule $a_content_obj)
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 getInstance(string $a_parent_type, int $a_id=0, int $a_old_nr=0, string $a_lang="-")
Get page object instance.
static _extractTypeOfTarget(string $a_target)
Extract type out of target.
static _lookup(int $a_obj_id, string $a_field)
static clipboardCopy(int $a_cont_obj_id, array $a_ids)
Copy a set of chapters/pages into the clipboard.
setDataRecord(array $a_record)
this method should only be called by class ilLMObjectFactory
static _getNodePresentationTitle(array $a_node, string $a_mode=self::PAGE_TITLE, bool $a_include_numbers=false, bool $a_time_scheduled_activation=false, bool $a_force_content=false, int $a_lm_id=0, string $a_lang="-")