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"]);
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
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] ??
"";
247 public static function _lookupType(
int $a_obj_id,
int $a_lm_id = 0): string
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
278 $a_title = ilStr::substr($a_title, 0, 200);
280 $query =
"UPDATE lm_data SET " .
281 " title = " .
$ilDB->quote($a_title,
"text") .
282 " WHERE obj_id = " .
$ilDB->quote($a_obj_id,
"integer");
283 $ilDB->manipulate($query);
289 $this->description = $a_description;
299 $this->type = $a_type;
309 $this->lm_id = $a_lm_id;
319 $this->content_object = $a_content_obj;
327 public function setId(
int $a_id): void
344 $this->import_id = $a_id;
349 $this->layout = $a_val;
363 $q =
"UPDATE lm_data " .
365 "import_id = " .
$ilDB->quote($a_import_id,
"text") .
"," .
366 "last_update = " .
$ilDB->now() .
" " .
367 "WHERE obj_id = " .
$ilDB->quote($a_id,
"integer");
372 public function create(
bool $a_upload =
false): void
378 $query =
"INSERT INTO lm_data (obj_id, title, type, layout, lm_id, import_id, short_title, create_date) " .
380 $ilDB->quote($this->
getId(),
"integer") .
"," .
387 ", " .
$ilDB->now() .
")";
388 $ilDB->manipulate($query);
401 $query =
"UPDATE lm_data SET " .
402 " lm_id = " .
$ilDB->quote($this->
getLMId(),
"integer") .
406 " WHERE obj_id = " .
$ilDB->quote($this->
getId(),
"integer");
408 $ilDB->manipulate($query);
411 public function delete(
bool $a_delete_meta_data =
true):
void
415 $query =
"DELETE FROM lm_data WHERE obj_id = " .
417 $ilDB->manipulate($query);
434 $help_module =
$DIC->help()->internal()->domain()->module();
436 $q =
"SELECT obj_id FROM lm_data WHERE import_id = " .
437 $ilDB->quote($a_import_id,
"text") .
" " .
438 " ORDER BY create_date DESC";
440 while ($obj_rec =
$ilDB->fetchAssoc($obj_set)) {
446 $help_module->isHelpLM(
$lm_id)) {
447 return $obj_rec[
"obj_id"];
467 $where = ($a_in_lm > 0)
468 ?
" AND lm_id = " .
$ilDB->quote($a_in_lm,
"integer") .
" "
471 $q =
"SELECT * FROM lm_data WHERE import_id = " .
472 $ilDB->quote($a_import_id,
"text") .
" " .
474 " ORDER BY create_date DESC";
478 while ($obj_rec =
$ilDB->fetchAssoc($obj_set)) {
491 public static function _exists(
int $a_id): bool
497 if (is_int(strpos($a_id,
"_"))) {
501 $q =
"SELECT * FROM lm_data WHERE obj_id = " .
502 $ilDB->quote($a_id,
"integer");
504 if ($obj_rec =
$ilDB->fetchAssoc($obj_set)) {
519 $type_str = ($type !=
"")
520 ?
"AND type = " .
$ilDB->quote($type,
"text") .
" "
523 $query =
"SELECT * FROM lm_data " .
524 "WHERE lm_id= " .
$ilDB->quote($lm_id,
"integer") .
" " .
527 $obj_set =
$ilDB->query($query);
529 while ($obj_rec =
$ilDB->fetchAssoc($obj_set)) {
530 $obj_list[] = array(
"obj_id" => $obj_rec[
"obj_id"],
531 "title" => $obj_rec[
"title"],
532 "import_id" => $obj_rec[
"import_id"],
533 "type" => $obj_rec[
"type"]);
549 $query =
"SELECT * FROM lm_data " .
550 "WHERE lm_id= " .
$ilDB->quote($a_cobj->
getId(),
"integer");
551 $obj_set =
$ilDB->query($query);
553 while ($obj_rec =
$ilDB->fetchAssoc($obj_set)) {
556 if (is_object($lm_obj)) {
557 $lm_obj->delete(
true);
571 if (isset(self::$data_records[$a_id])) {
572 return self::$data_records[$a_id][
"lm_id"];
575 $query =
"SELECT lm_id FROM lm_data WHERE obj_id = " .
576 $ilDB->quote($a_id,
"integer");
577 $obj_set =
$ilDB->query($query);
578 $obj_rec =
$ilDB->fetchAssoc($obj_set);
580 return (
int) ($obj_rec[
"lm_id"] ?? 0);
588 int $a_parent_id = 0,
589 int $a_target_node_id = 0
593 $ilLog =
$DIC[
"ilLog"];
598 $parent_id = ($a_parent_id != 0)
600 : $tree->getRootId();
603 if ($a_target_node_id != 0) {
604 $target = $a_target_node_id;
607 if ($a_obj->
getType() ==
"st") {
608 $s_types = array(
"st",
"pg");
609 $childs = $tree->getChildsByTypeFilter($parent_id, $s_types);
612 $childs = $tree->getChildsByType($parent_id, $s_types);
615 if (count($childs) == 0) {
618 $target = $childs[count($childs) - 1][
"obj_id"];
622 if ($tree->isInTree($parent_id) && !$tree->isInTree($a_obj->
getId())) {
623 $ilLog->write(
"LMObject::putInTree: insertNode, ID: " . $a_obj->
getId() .
624 "Parent ID: " . $parent_id .
", Target: " . $target);
626 $tree->insertNode($a_obj->
getId(), $parent_id, $target);
636 $tree = new
ilLMTree($a_cont_obj_id);
652 if (!is_array($a_ids)) {
656 foreach ($a_ids as
$id) {
659 foreach (
$path as $path_id) {
660 if ($path_id !=
$id && in_array($path_id, $a_ids)) {
675 foreach ($cut_ids as
$id) {
676 $curnode = $tree->getNodeData(
$id);
677 if ($tree->isInTree(
$id)) {
678 $tree->deleteTree($curnode);
692 $ilUser =
$DIC->user();
696 $ilUser->clipboardDeleteObjectsOfType(
"pg");
697 $ilUser->clipboardDeleteObjectsOfType(
"st");
700 $time = date(
"Y-m-d H:i:s", time());
702 foreach ($a_ids as
$id) {
704 if ($tree->isInTree(
$id)) {
705 $curnode = $tree->getNodeData(
$id);
706 $subnodes = $tree->getSubTree($curnode);
707 foreach ($subnodes as $subnode) {
708 if ($subnode[
"child"] !=
$id) {
709 $ilUser->addObjectToClipboard(
720 $order = (($curnode[
"lft"] ?? 0) > 0)
722 : (
int) ($order + 1);
723 $ilUser->addObjectToClipboard(
725 self::_lookupType(
$id),
737 public static function pasteTree(
742 string $a_insert_time,
743 array &$a_copied_nodes,
744 bool $a_as_copy =
false,
750 $ilUser =
$DIC->user();
751 $ilLog =
$DIC[
"ilLog"];
752 $lom_services =
$DIC->learningObjectMetadata();
758 if ($item_type ==
"st") {
760 } elseif ($item_type ==
"pg") {
764 $ilLog->write(
"Getting from clipboard type " . $item_type .
", " .
765 "Item ID: " . $a_item_id .
", of original LM: " . $item_lm_id);
767 if ($item_lm_id != $a_target_lm->
getId() && !$a_as_copy) {
771 $lom_services->derive()
772 ->fromObject($item_lm_id, $item->getId(), $item->getType())
773 ->forObject($a_target_lm->
getId(), $item->getId(), $item->getType());
776 $lom_services->deleteAll($item_lm_id, $item->getId(), $item->getType());
778 if ($item_type ==
"pg") {
779 $page = $item->getPageObject();
781 $page->setParentId($a_target_lm->
getId());
787 $target_item = $item->copy($a_target_lm);
788 $a_copied_nodes[$item->getId()] = $target_item->getId();
790 $target_item = $item;
793 $ilLog->write(
"Putting into tree type " . $target_item->getType() .
794 "Item ID: " . $target_item->getId() .
", Parent: " . $a_parent_id .
", " .
795 "Target: " . $a_target .
", Item LM:" . $target_item->getContentObject()->getId());
799 if ($a_source_lm ==
null) {
800 $childs = $ilUser->getClipboardChilds($item->getId(), $a_insert_time);
802 $childs = $a_source_lm->lm_tree->getChilds($item->getId());
803 foreach ($childs as $k => $child) {
804 $childs[$k][
"id"] = $child[
"child"];
808 foreach ($childs as $child) {
809 ilLMObject::pasteTree(
812 $target_item->getId(),
821 return $target_item->getId();
835 $lom_services =
$DIC->learningObjectMetadata();
840 if (is_array($a_titles)) {
841 foreach ($a_titles as
$id => $title) {
842 self::saveTitle(
$id, $title, $a_lang);
847 public static function saveTitle(
int $id,
string $title,
string $lang =
"-"): void
851 $lom_services =
$DIC->learningObjectMetadata();
853 if (in_array($lang, [
"-",
""])) {
854 $lm_id = self::_lookupContObjID(
$id);
855 $type = self::_lookupType(
$id);
856 if ($type !==
"" && $lm_id > 0) {
858 $lom_services->manipulate($lm_id,
$id, $type)
859 ->prepareCreateOrUpdate(
860 $lom_services->paths()->title(),
863 }
catch (Exception
$e) {
865 self::_writeTitle(
$id, $title);
869 $lmobjtrans->setTitle($title);
878 array $a_copied_nodes,
879 string $a_parent_type =
"lm"
881 $all_fixes = array();
882 foreach ($a_copied_nodes as $original_id => $copied_id) {
886 if ($copied_type ==
"pg") {
892 $tpg =
new ilLMPage($copied_id, 0, $l);
894 $il = $tpg->getInternalLinks();
896 foreach ($il as $l2) {
902 foreach ($targets as $target) {
903 if (($target[
"inst"] == 0 || $target[
"inst"] =
IL_INST_ID) &&
904 ($target[
"type"] ==
"pg" || $target[
"type"] ==
"st")) {
906 if (($a_copied_nodes[$target[
"id"]] ?? 0) > 0) {
907 $fix[$target[
"id"]] = $a_copied_nodes[$target[
"id"]];
913 if ($trg_lm != $copy_lm) {
917 foreach ($lm_data as $item) {
918 if (!$found && ($item[
"lm_id"] == $copy_lm)) {
919 $fix[$target[
"id"]] = $item[
"obj_id"];
929 if (count($fix) > 0) {
933 if (isset($all_fixes[$t .
":" . $copied_id])) {
934 $all_fixes[$t .
":" . $copied_id] += $fix;
936 $all_fixes[$t .
":" . $copied_id] = $fix;
942 if ($copied_type ==
"pg" ||
943 $copied_type ==
"st") {
954 if ($original_lm != $copy_lm) {
970 foreach ($mobs as $mob) {
979 foreach ($usages as $usage) {
980 if ($usage[
"type"] ==
"lm:pg" | $usage[
"type"] ==
"lm:st") {
986 foreach ($sources as $source) {
987 $stype = explode(
":", $source[
"type"]);
988 $source_type = $stype[1] ??
"";
990 if ($source_type ==
"pg" || $source_type ==
"st") {
994 if ($src_lm == $original_lm) {
998 "il__" . $source_type .
"_" . $source[
"id"],
1002 foreach ($lm_data as $item) {
1004 $fix[$item[
"obj_id"]][$original_id] = $copied_id;
1012 if (count($fix) > 0) {
1013 foreach ($fix as $page_id => $fix_array) {
1015 if (isset($all_fixes[$t .
":" . $page_id])) {
1016 $all_fixes[$t .
":" . $page_id] += $fix_array;
1018 $all_fixes[$t .
":" . $page_id] = $fix_array;
1026 foreach ($all_fixes as $pg => $fixes) {
1027 $pg = explode(
":", $pg);
1030 if ($page->moveIntLinks($fixes)) {
1031 $page->update(
true,
true);
1043 if (is_array($a_items)) {
1044 foreach ($a_items as $item) {
1046 $types[$type] = $type;
1050 if (count($types) > 1) {
1071 $query =
"UPDATE lm_data SET " .
1072 " layout = " .
$ilDB->quote($a_layout,
"text") .
1073 " WHERE obj_id = " .
$ilDB->quote($a_obj_id,
"integer");
1074 $ilDB->manipulate($query);
1075 } elseif ($t ==
"st" && is_object($a_lm)) {
1076 $node = $a_lm->
getLMTree()->getNodeData($a_obj_id);
1077 $child_nodes = $a_lm->
getLMTree()->getSubTree($node);
1078 if (is_array($child_nodes) && count($child_nodes) > 0) {
1079 foreach ($child_nodes as
$c) {
1080 if (
$c[
"type"] ==
"pg") {
1081 $query =
"UPDATE lm_data SET " .
1082 " layout = " .
$ilDB->quote($a_layout,
"text") .
1083 " WHERE obj_id = " .
$ilDB->quote(
$c[
"child"],
"integer");
1084 $ilDB->manipulate($query);
1100 $query =
"SELECT layout FROM lm_data WHERE obj_id = " .
1101 $ilDB->quote($a_obj_id,
"integer");
1102 $obj_set =
$ilDB->query($query);
1103 $obj_rec =
$ilDB->fetchAssoc($obj_set);
1105 return $obj_rec[
"layout"];
1116 $lm_tree = new
ilTree($a_lm_id);
1118 $lm_tree->setTreeTablePK(
"lm_id");
1119 $lm_tree->readRootId();
1121 $childs = $lm_tree->getChildsByType($a_chap_id,
"pg");
1137 $and = ($a_type !=
"")
1138 ?
" AND type = " .
$ilDB->quote($a_type,
"text")
1141 $set =
$ilDB->query(
"SELECT obj_id FROM lm_data " .
1142 " WHERE lm_id = " .
$ilDB->quote($a_lm_id,
"integer") . $and);
1144 while ($rec =
$ilDB->fetchAssoc($set)) {
1145 $obj_ids[] = $rec[
"obj_id"];
1160 string $a_type =
"pg"
1164 $manipulator =
$DIC->learningObjectMetadata()->manipulate($a_lm_id, $a_lmobj_id, $a_type);
1165 if (trim($a_exp_id) ==
"") {
1166 $manipulator = $manipulator->prepareDelete(self::getPathToExportIDInLOM());
1168 $manipulator = $manipulator->prepareCreateOrUpdate(self::getPathToExportIDInLOM(), $a_exp_id);
1170 $manipulator->execute();
1177 return $DIC->learningObjectMetadata()
1180 ->withNextStep(
'general')
1181 ->withNextStep(
'identifier')
1182 ->withNextStep(
'catalog')
1184 ->withNextStepToSuperElement()
1185 ->withNextStep(
'entry')
1192 string $a_type =
"pg"
1197 $export_id_path = self::getPathToExportIDInLOM();
1198 return $DIC->learningObjectMetadata()->read(
1203 )->firstData($export_id_path)->value();
1212 string $a_type =
"pg"
1214 $searcher = $this->lom_services->
search();
1216 $search_clause = $searcher->getClauseFactory()->getBasicClause(
1217 self::getPathToExportIDInLOM(),
1227 return count(iterator_to_array(
$results)) > 0;
1235 string $a_type =
"pg"
1239 $lom_services =
$DIC->learningObjectMetadata();
1240 $export_id_path = self::getPathToExportIDInLOM();
1242 $searcher = $lom_services->search();
1243 $search_clause = $searcher->getClauseFactory()->getBasicClause(
1249 $search_results = $searcher->execute(
1257 foreach ($search_results as $search_result) {
1261 $reader = $lom_services->read(
1262 $search_result->objID(),
1263 $search_result->subID(),
1264 $search_result->type(),
1267 foreach ($reader->allData($export_id_path) as $export_id_datum) {
1268 $export_id = trim($export_id_datum->value());
1269 $res[$export_id] = (
$res[$export_id] ?? 0) + 1;
1278 string $a_mode = self::PAGE_TITLE,
1279 bool $a_include_numbers =
false,
1280 bool $a_time_scheduled_activation =
false,
1281 bool $a_force_content =
false,
1283 string $a_lang =
"-"
1285 if ($a_lang ==
"") {
1289 if ($a_node[
"type"] ==
"st") {
1292 self::CHAPTER_TITLE,
1294 $a_time_scheduled_activation,
1304 $a_time_scheduled_activation,
1314 string $a_lang =
"-"
1318 $db =
$DIC->database();
1320 $title_data = array();
1321 if ($a_lang ==
"-") {
1322 $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 = " .
1323 $db->
quote($a_lm_id,
"integer") .
" ORDER BY t.lft, d.title");
1325 $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 " .
1326 " LEFT JOIN lm_tree t ON (d.obj_id = t.child) " .
1327 " LEFT JOIN lm_data_transl tr ON (tr.id = d.obj_id AND tr.lang=" . $db->
quote($a_lang,
"text") .
") WHERE d.lm_id = " .
1328 $db->
quote($a_lm_id,
"integer") .
" ORDER BY t.lft, d.title");
1331 $title_data[] = $rec;
1338 string $a_short_title,
1339 string $a_lang =
"-"
1343 $db =
$DIC->database();
1345 if ($a_lang !=
"-" && $a_lang !=
"") {
1347 $trans->setShortTitle($a_short_title);
1351 "UPDATE lm_data SET " .
1352 " short_title = " . $db->
quote($a_short_title,
"text") .
1353 " WHERE obj_id = " . $db->
quote($a_id,
"integer")
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
static _getSourcesOfTarget(string $a_target_type, int $a_target_id, int $a_target_inst)
get all sources of a link target
static _extractInstOfTarget(string $a_target)
Extract installation id out of target.
static _extractObjIdOfTarget(string $a_target)
Extract object id out of target.
static _extractTypeOfTarget(string $a_target)
Extract type out of target.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static getInstance(ilObjLearningModule $a_content_obj, int $a_id=0, bool $a_halt=true)
static saveTitle(int $id, string $title, string $lang="-")
setContentObject(ilObjLearningModule $a_content_obj)
existsExportID(int $a_lm_id, int $a_exp_id, string $a_type="pg")
Does export ID exist in lm?
static writeLayout(int $a_obj_id, string $a_layout, ?ilObjLearningModule $a_lm=null)
Write layout setting.
setShortTitle(string $a_title)
static _getAllObjectsForImportId(string $a_import_id, int $a_in_lm=0)
Get all items for an import ID.
ilObjLearningModule $content_object
static writeShortTitle(int $a_id, string $a_short_title, string $a_lang="-")
static getPathToExportIDInLOM()
LOMServices $lom_services
static getPagesOfChapter(int $a_lm_id, int $a_chap_id)
Get pages of chapter.
static _exists(int $a_id)
checks wether a lm content object with specified id exists or not
setImportId(string $a_id)
static clipboardCut(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 saveExportId(int $a_lm_id, int $a_lmobj_id, string $a_exp_id, string $a_type="pg")
static _getAllLMObjectsOfLM(int $a_lm_id, string $a_type="")
Get all objects of learning module.
static _lookupShortTitle(int $a_obj_id)
MDUpdateListener(string $a_element)
Meta data update listener Important note: Do never call create() or update() method of ilObject here.
static saveTitles(ilObjLearningModule $a_lm, array $a_titles, string $a_lang="-")
Save titles for lm objects.
static preloadDataByLM(int $a_lm_id)
Preload data records by lm.
static getShortTitles(int $a_lm_id, string $a_lang="-")
static _writeImportId(int $a_id, string $a_import_id)
__construct(ilObjLearningModule $a_content_obj, int $a_id=0)
static _writeTitle(int $a_obj_id, string $a_title)
static _lookupContObjID(int $a_id)
get learning module id for lm object
static _lookupTitle(int $a_obj_id)
setDescription(string $a_description)
static getObjectList(int $lm_id, string $type="")
static getTree(int $a_cont_obj_id)
Get learning module tree.
static clipboardCopy(int $a_cont_obj_id, array $a_ids)
Copy a set of chapters/pages into the clipboard.
deleteMetaData()
delete meta data entry
static updateInternalLinks(array $a_copied_nodes, string $a_parent_type="lm")
Update internal links, after multiple pages have been copied.
static lookupLayout(int $a_obj_id)
Lookup type.
createMetaData()
create meta data entry
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="-")
static putInTree(ilLMObject $a_obj, int $a_parent_id=0, int $a_target_node_id=0)
put this object into content object tree
static _getIdForImportId(string $a_import_id)
get current object id for import id (static)
static _lookup(int $a_obj_id, string $a_field)
static array $data_records
static uniqueTypesCheck(array $a_items)
Check for unique types (all pages or all chapters)
static getExportId(int $a_lm_id, int $a_lmobj_id, string $a_type="pg")
setTitle(string $a_title)
static _lookupType(int $a_obj_id, int $a_lm_id=0)
updateMetaData()
update meta data entry
static _deleteAllObjectData(ilObjLearningModule $a_cobj)
delete all objects of content object (digi book / learning module)
static getDuplicateExportIDs(int $a_lm_id, string $a_type="pg")
Get duplicate export IDs (count export ID usages)
create(bool $a_upload=false)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
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...
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...
const LP_MODE_COLLECTION_TLT
static _refreshStatus(int $a_obj_id, ?array $a_users=null)
static _getMobsForTarget(string $a_type, string $a_target)
Get areas for a certain target.
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
static getInstance(int $obj_id)
static _lookupType(int $id, bool $reference=false)
static _hasUntrashedReference(int $obj_id)
checks whether an object has at least one reference that is not in trash
static _getAllReferences(int $id)
get all reference ids for object ID
static getInstance(string $a_parent_type, int $a_id=0, int $a_old_nr=0, string $a_lang="-")
static lookupTranslations(string $a_parent_type, int $a_id)
Lookup translations.
static subStr(string $a_str, int $a_start, ?int $a_length=null)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
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)
Tree class data representation in hierachical trees using the Nested Set Model with Gaps by Joe Celco...
setTableNames(string $a_table_tree, string $a_table_obj_data, string $a_table_obj_reference="")
set table names The primary key of the table containing your object_data must be 'obj_id' You may use...
quote($value, string $type)
manipulate(string $query)
Run a (write) Query on the database.
query(string $query)
Run a (read-only) Query on the database.
fetchAssoc(ilDBStatement $statement)
if(!file_exists('../ilias.ini.php'))