5 require_once(
"Services/MetaData/classes/class.ilMDLanguageItem.php");
40 $this->
setLMId($a_content_obj->getId());
61 include_once
'Services/MetaData/classes/class.ilMD.php';
69 $md_gen = $md->getGeneral();
73 foreach($md_gen->getDescriptionIds() as
$id)
75 $md_des = $md_gen->getDescription($id);
82 include_once(
"./Services/Object/classes/class.ilObjectLP.php");
84 if(in_array($obj_lp->getCurrentMode(),
87 include_once(
"./Services/Tracking/classes/class.ilLPStatusWrapper.php");
103 include_once
'Services/MetaData/classes/class.ilMD.php';
105 $md =
new ilMD($a_lm_id, $a_lm_obj_id, $a_type);
106 $md_gen = $md->getGeneral();
107 if (is_object($md_gen))
109 foreach($md_gen->getIdentifierIds() as
$id)
111 $md_id = $md_gen->getIdentifier($id);
112 if ($md_id->getCatalog() ==
"ILIAS_NID")
114 return $md_id->getEntry();
128 include_once
'Services/MetaData/classes/class.ilMDCreator.php';
133 $md_creator->setTitle($this->
getTitle());
134 $md_creator->setTitleLanguage($ilUser->getPref(
'language'));
136 $md_creator->setDescriptionLanguage($ilUser->getPref(
'language'));
137 $md_creator->setKeywordLanguage($ilUser->getPref(
'language'));
138 $md_creator->setLanguage($ilUser->getPref(
'language'));
139 $md_creator->create();
149 include_once(
"Services/MetaData/classes/class.ilMD.php");
150 include_once(
"Services/MetaData/classes/class.ilMDGeneral.php");
151 include_once(
"Services/MetaData/classes/class.ilMDDescription.php");
154 $md_gen =& $md->getGeneral();
155 $md_gen->setTitle($this->
getTitle());
158 $md_des_ids =& $md_gen->getDescriptionIds();
159 if (count($md_des_ids) > 0)
161 $md_des =& $md_gen->getDescription($md_des_ids[0]);
176 include_once(
'Services/MetaData/classes/class.ilMD.php');
188 $this->data_record = $a_record;
195 $ilBench->start(
"ContentPresentation",
"ilLMObject_read");
197 if(!isset($this->data_record))
199 $query =
"SELECT * FROM lm_data WHERE obj_id = ".
200 $ilDB->quote($this->
id,
"integer");
201 $obj_set = $ilDB->query(
$query);
202 $this->data_record = $ilDB->fetchAssoc($obj_set);
205 $this->type = $this->data_record[
"type"];
206 $this->
setImportId($this->data_record[
"import_id"]);
207 $this->
setTitle($this->data_record[
"title"]);
208 $this->
setLayout($this->data_record[
"layout"]);
211 $ilBench->stop(
"ContentPresentation",
"ilLMObject_read");
225 $set = $ilDB->query(
"SELECT * FROM lm_data ".
226 " WHERE lm_id = ".$ilDB->quote($a_lm_id,
"integer")
228 while ($rec = $ilDB->fetchAssoc($set))
230 self::$data_records[$rec[
"obj_id"]] = $rec;
232 return count(self::$data_records);
243 $this->title = $a_title;
266 if (isset(self::$data_records[$a_obj_id]))
268 return self::$data_records[$a_obj_id][
"title"];
271 $query =
"SELECT title FROM lm_data WHERE obj_id = ".
272 $ilDB->quote($a_obj_id,
"integer");
273 $obj_set = $ilDB->query(
$query);
274 $obj_rec = $ilDB->fetchAssoc($obj_set);
276 return $obj_rec[
"title"];
289 if (isset(self::$data_records[$a_obj_id]))
291 if ($a_lm_id == 0 || self::$data_records[$a_obj_id][
"lm_id"] == $a_lm_id)
293 return self::$data_records[$a_obj_id][
"type"];
299 $and =
' AND lm_id = '.$ilDB->quote($a_lm_id,
'integer');
302 $query =
"SELECT type FROM lm_data WHERE obj_id = ".$ilDB->quote($a_obj_id,
"integer").$and;
303 $obj_set = $ilDB->query(
$query);
304 $obj_rec = $ilDB->fetchAssoc($obj_set);
306 return $obj_rec[
"type"];
314 $query =
"UPDATE lm_data SET ".
315 " title = ".$ilDB->quote($a_title,
"text").
316 " WHERE obj_id = ".$ilDB->quote($a_obj_id,
"integer");
317 $ilDB->manipulate(
$query);
323 $this->description = $a_description;
333 $this->type = $a_type;
343 $this->lm_id = $a_lm_id;
354 $this->content_object =& $a_content_obj;
374 return $this->import_id;
379 $this->import_id = $a_id;
389 $this->layout = $a_val;
399 return $this->layout;
413 $q =
"UPDATE lm_data ".
415 "import_id = ".$ilDB->quote($a_import_id,
"text").
",".
416 "last_update = ".$ilDB->now().
" ".
417 "WHERE obj_id = ".$ilDB->quote($a_id,
"integer");
419 $ilDB->manipulate($q);
427 $this->
setId($ilDB->nextId(
"lm_data"));
428 $query =
"INSERT INTO lm_data (obj_id, title, type, layout, lm_id, import_id, create_date) ".
430 $ilDB->quote($this->
getId(),
"integer").
",".
431 $ilDB->quote($this->
getTitle(),
"text").
",".
432 $ilDB->quote($this->
getType(),
"text").
", ".
433 $ilDB->quote($this->
getLayout(),
"text").
", ".
434 $ilDB->quote($this->
getLMId(),
"integer").
",".
436 ", ".$ilDB->now().
")";
437 $ilDB->manipulate($query);
440 include_once(
"./Services/History/classes/class.ilHistory.php");
442 $this->content_object->getType().
":".$this->
getType());
460 $query =
"UPDATE lm_data SET ".
461 " lm_id = ".$ilDB->quote($this->
getLMId(),
"integer").
462 " ,title = ".$ilDB->quote($this->
getTitle(),
"text").
463 " ,layout = ".$ilDB->quote($this->
getLayout(),
"text").
464 " WHERE obj_id = ".$ilDB->quote($this->
getId(),
"integer");
466 $ilDB->manipulate(
$query);
482 if (!is_array($a_pages))
483 {$a_pages = array(0);
490 if (empty($a_cont_obj_id))
492 $message = sprintf(
'ilLMObject::_writePublicAccessStatus(): Invalid parameter! $a_cont_obj_id is empty');
493 $ilLog->write($message,$ilLog->WARNING);
494 $ilErr->raiseError($message,$ilErr->MESSAGE);
499 $lm_tree =
new ilTree($a_cont_obj_id);
500 $lm_tree->setTableNames(
'lm_tree',
'lm_data');
501 $lm_tree->setTreeTablePK(
"lm_id");
502 $lm_tree->readRootId();
505 $q =
"SELECT obj_id FROM lm_data " .
506 "WHERE lm_id = ".$ilDB->quote($a_cont_obj_id,
"integer").
" " .
508 $r = $ilDB->query($q);
511 while (
$row = $ilDB->fetchAssoc(
$r))
513 $childs = $lm_tree->getChilds(
$row[
"obj_id"]);
515 foreach ($childs as $page)
517 if ($page[
"type"] ==
"pg" and in_array($page[
"obj_id"],$a_pages))
519 array_push($a_pages,
$row[
"obj_id"]);
526 $q =
"UPDATE lm_data SET " .
527 "public_access = CASE " .
528 "WHEN ".$ilDB->in(
"obj_id", $a_pages,
false,
"integer").
" ".
529 "THEN ".$ilDB->quote(
"y",
"text").
530 "ELSE ".$ilDB->quote(
"n",
"text").
532 "WHERE lm_id = ".$ilDB->quote($a_cont_obj_id,
"integer").
" " .
533 "AND ".$ilDB->in(
"type", array(
"pg",
"st"),
false,
"text");
534 $ilDB->manipulate($q);
543 if (empty($a_node_id))
545 $message = sprintf(
'ilLMObject::_isPagePublic(): Invalid parameter! $a_node_id is empty');
546 $ilLog->write($message,$ilLog->WARNING);
550 if ($a_check_public_mode ===
true)
552 $lm_id = ilLMObject::_lookupContObjId($a_node_id);
554 $q =
"SELECT public_access_mode FROM content_object WHERE id = ".
555 $ilDB->quote($lm_id,
"integer");
556 $r = $ilDB->query($q);
557 $row = $ilDB->fetchAssoc(
$r);
559 if (
$row[
"public_access_mode"] ==
"complete")
565 $q =
"SELECT public_access FROM lm_data WHERE obj_id=".
566 $ilDB->quote($a_node_id,
"integer");
567 $r = $ilDB->query($q);
568 $row = $ilDB->fetchAssoc(
$r);
576 function delete($a_delete_meta_data =
true)
580 $query =
"DELETE FROM lm_data WHERE obj_id = ".
581 $ilDB->quote($this->
getId(),
"integer");
582 $ilDB->manipulate(
$query);
602 $q =
"SELECT obj_id FROM lm_data WHERE import_id = ".
603 $ilDB->quote($a_import_id,
"text").
" ".
604 " ORDER BY create_date DESC";
605 $obj_set = $ilDB->query($q);
606 while ($obj_rec = $ilDB->fetchAssoc($obj_set))
611 include_once(
"./Services/Help/classes/class.ilObjHelpSettings.php");
616 return $obj_rec[
"obj_id"];
636 $where = ($a_in_lm > 0)
637 ?
" AND lm_id = ".$ilDB->quote($a_in_lm,
"integer").
" " 640 $q =
"SELECT * FROM lm_data WHERE import_id = ".
641 $ilDB->quote($a_import_id,
"text").
" ".
643 " ORDER BY create_date DESC";
644 $obj_set = $ilDB->query($q);
647 while ($obj_rec = $ilDB->fetchAssoc($obj_set))
670 include_once(
"./Services/Link/classes/class.ilInternalLink.php");
671 if (is_int(strpos($a_id,
"_")))
676 $q =
"SELECT * FROM lm_data WHERE obj_id = ".
677 $ilDB->quote($a_id,
"integer");
678 $obj_set = $ilDB->query($q);
679 if ($obj_rec = $ilDB->fetchAssoc($obj_set))
697 $type_str = ($type !=
"")
698 ?
"AND type = ".$ilDB->quote($type,
"text").
" " 701 $query =
"SELECT * FROM lm_data ".
702 "WHERE lm_id= ".$ilDB->quote($lm_id,
"integer").
" ".
705 $obj_set = $ilDB->query(
$query);
707 while($obj_rec = $ilDB->fetchAssoc($obj_set))
709 $obj_list[] = array(
"obj_id" => $obj_rec[
"obj_id"],
710 "title" => $obj_rec[
"title"],
711 "import_id" => $obj_rec[
"import_id"],
712 "type" => $obj_rec[
"type"]);
725 include_once
'./Services/Xml/classes/class.ilNestedSetXML.php';
727 $query =
"SELECT * FROM lm_data ".
728 "WHERE lm_id= ".$ilDB->quote($a_cobj->getId(),
"integer");
729 $obj_set = $ilDB->query(
$query);
731 require_once(
"./Modules/LearningModule/classes/class.ilLMObjectFactory.php");
732 while ($obj_rec = $ilDB->fetchAssoc($obj_set))
736 if (is_object($lm_obj))
738 $lm_obj->delete(
true);
752 if (isset(self::$data_records[$a_id]))
754 return self::$data_records[$a_id][
"lm_id"];
757 $query =
"SELECT lm_id FROM lm_data WHERE obj_id = ".
758 $ilDB->quote($a_id,
"integer");
759 $obj_set = $ilDB->query(
$query);
760 $obj_rec = $ilDB->fetchAssoc($obj_set);
762 return $obj_rec[
"lm_id"];
768 static function putInTree($a_obj, $a_parent_id =
"", $a_target_node_id =
"")
772 $tree =
new ilTree($a_obj->getContentObject()->getId());
774 $tree->setTreeTablePK(
"lm_id");
777 $parent_id = ($a_parent_id !=
"")
779 : $tree->getRootId();
782 if ($a_target_node_id !=
"")
784 $target = $a_target_node_id;
789 if ($a_obj->getType() ==
"st")
791 $s_types = array(
"st",
"pg");
792 $childs =& $tree->getChildsByTypeFilter($parent_id, $s_types);
797 $childs =& $tree->getChildsByType($parent_id, $s_types);
800 if (count($childs) == 0)
806 $target = $childs[count($childs) - 1][
"obj_id"];
810 if ($tree->isInTree($parent_id) && !$tree->isInTree($a_obj->getId()))
812 $ilLog->write(
"LMObject::putInTree: insertNode, ID: ".$a_obj->getId().
813 "Parent ID: ".$parent_id.
", Target: ".$target);
815 $tree->insertNode($a_obj->getId(), $parent_id, $target);
828 $tree =
new ilTree($a_cont_obj_id);
829 $tree->setTableNames(
'lm_tree',
'lm_data');
830 $tree->setTreeTablePK(
"lm_id");
843 if (!is_array($a_ids))
850 foreach($a_ids as $id)
852 $path = $tree->getPathId($id);
854 foreach(
$path as $path_id)
856 if ($path_id != $id && in_array($path_id, $a_ids))
873 foreach ($cut_ids as $id)
875 $curnode = $tree->getNodeData($id);
876 if ($tree->isInTree($id))
878 $tree->deleteTree($curnode);
893 $ilUser->clipboardDeleteObjectsOfType(
"pg");
894 $ilUser->clipboardDeleteObjectsOfType(
"st");
897 $time = date(
"Y-m-d H:i:s", time());
899 foreach ($a_ids as $id)
902 if ($tree->isInTree($id))
904 $curnode = $tree->getNodeData($id);
905 $subnodes = $tree->getSubTree($curnode);
906 foreach($subnodes as $subnode)
908 if ($subnode[
"child"] != $id)
910 $ilUser->addObjectToClipboard($subnode[
"child"],
911 $subnode[
"type"], $subnode[
"title"],
912 $subnode[
"parent"], $time, $subnode[
"lft"]);
916 $order = ($curnode[
"lft"] > 0)
918 : (
int) ($order + 1);
919 $ilUser->addObjectToClipboard($id,
928 static function pasteTree($a_target_lm, $a_item_id, $a_parent_id, $a_target, $a_insert_time,
929 &$a_copied_nodes, $a_as_copy =
false, $a_source_lm = null)
933 include_once(
"./Modules/LearningModule/classes/class.ilStructureObject.php");
934 include_once(
"./Modules/LearningModule/classes/class.ilLMPageObject.php");
938 $lm_obj = $ilias->obj_factory->getInstanceByObjId($item_lm_id);
939 if ($item_type ==
"st")
943 else if ($item_type ==
"pg")
948 $ilLog->write(
"Getting from clipboard type ".$item_type.
", ".
949 "Item ID: ".$a_item_id.
", of original LM: ".$item_lm_id);
951 if ($item_lm_id != $a_target_lm->getId() && !$a_as_copy)
956 include_once(
"Services/MetaData/classes/class.ilMD.php");
957 $md =
new ilMD($item_lm_id, $item->getId(), $item->getType());
958 $new_md = $md->
cloneMD($a_target_lm->getId(), $item->getId(), $item->getType());
961 $item->setLMId($a_target_lm->getId());
962 $item->setContentObject($a_target_lm);
968 if ($item_type ==
"pg")
970 $page = $item->getPageObject();
972 $page->setParentId($a_target_lm->getId());
979 $target_item = $item->copy($a_target_lm);
980 $a_copied_nodes[$item->getId()] = $target_item->getId();
984 $target_item = $item;
987 $ilLog->write(
"Putting into tree type ".$target_item->getType().
988 "Item ID: ".$target_item->getId().
", Parent: ".$a_parent_id.
", ".
989 "Target: ".$a_target.
", Item LM:".$target_item->getContentObject()->getId());
993 if ($a_source_lm == null)
995 $childs = $ilUser->getClipboardChilds($item->getId(), $a_insert_time);
999 $childs = $a_source_lm->lm_tree->getChilds($item->getId());
1000 foreach ($childs as $k => $child)
1002 $childs[$k][
"id"] = $childs[$k][
"child"];
1006 foreach($childs as $child)
1009 IL_LAST_NODE, $a_insert_time, $a_copied_nodes, $a_as_copy, $a_source_lm);
1012 return $target_item->getId();
1023 include_once(
"./Modules/LearningModule/classes/class.ilLMObjTranslation.php");
1029 if (is_array($a_titles))
1031 include_once(
"./Services/MetaData/classes/class.ilMD.php");
1032 foreach($a_titles as $id => $title)
1037 if (is_object($lmobj))
1040 $md =
new ilMD($a_lm->getId(),
$id, $lmobj->getType());
1042 if (is_object($md_gen))
1044 $md_gen->setTitle($title);
1054 $lmobjtrans->setTitle($title);
1055 $lmobjtrans->save();
1066 $all_fixes = array();
1067 foreach($a_copied_nodes as $original_id => $copied_id)
1072 if ($copied_type ==
"pg")
1080 include_once(
"./Modules/LearningModule/classes/class.ilLMPage.php");
1081 $tpg =
new ilLMPage($copied_id, 0, $l);
1083 $il = $tpg->getInternalLinks();
1092 foreach ($targets as $target)
1094 if (($target[
"inst"] == 0 || $target[
"inst"] = IL_INST_ID) &&
1095 ($target[
"type"] ==
"pg" || $target[
"type"] ==
"st"))
1098 if ($a_copied_nodes[$target[
"id"]] > 0)
1100 $fix[$target[
"id"]] = $a_copied_nodes[$target[
"id"]];
1107 if ($trg_lm != $copy_lm)
1112 foreach ($lm_data as $item)
1114 if (!$found && ($item[
"lm_id"] == $copy_lm))
1116 $fix[$target[
"id"]] = $item[
"obj_id"];
1126 if (count($fix) > 0)
1131 if (is_array($all_fixes[
$t .
":" . $copied_id]))
1133 $all_fixes[
$t .
":" . $copied_id] += $fix;
1136 $all_fixes[
$t .
":" . $copied_id] = $fix;
1142 if ($copied_type ==
"pg" ||
1143 $copied_type ==
"st")
1156 if ($original_lm != $copy_lm)
1171 include_once(
"./Services/MediaObjects/classes/class.ilObjMediaObject.php");
1172 foreach(
$mobs as $mob)
1182 foreach($usages as $usage)
1184 if ($usage[
"type"] ==
"lm:pg" | $usage[
"type"] ==
"lm:st")
1186 $sources[] = $usage;
1191 foreach($sources as $source)
1193 $stype = explode(
":", $source[
"type"]);
1194 $source_type = $stype[1];
1196 if ($source_type ==
"pg" || $source_type ==
"st")
1201 if ($src_lm == $original_lm)
1208 foreach ($lm_data as $item)
1212 $fix[$item[
"obj_id"]][$original_id] = $copied_id;
1220 if (count($fix) > 0)
1222 foreach ($fix as $page_id => $fix_array)
1225 if (is_array($all_fixes[
$t.
":".$page_id]))
1227 $all_fixes[
$t.
":".$page_id] += $fix_array;
1231 $all_fixes[
$t.
":".$page_id] = $fix_array;
1240 foreach ($all_fixes as $pg => $fixes)
1242 $pg = explode(
":", $pg);
1243 include_once(
"./Services/COPage/classes/class.ilPageObjectFactory.php");
1247 if ($page->moveIntLinks($fixes))
1249 $page->update(
true,
true);
1261 if (is_array($a_items))
1263 foreach($a_items as $item)
1270 if (count($types) > 1)
1291 $query =
"UPDATE lm_data SET ".
1292 " layout = ".$ilDB->quote($a_layout,
"text").
1293 " WHERE obj_id = ".$ilDB->quote($a_obj_id,
"integer");
1294 $ilDB->manipulate(
$query);
1296 else if (
$t ==
"st" && is_object($a_lm))
1298 $node = $a_lm->getLMTree()->getNodeData($a_obj_id);
1299 $child_nodes = $a_lm->getLMTree()->getSubTree($node);
1300 if (is_array($child_nodes) && count($child_nodes) > 0)
1302 foreach ($child_nodes as $c)
1304 if ($c[
"type"] ==
"pg")
1306 $query =
"UPDATE lm_data SET ".
1307 " layout = ".$ilDB->quote($a_layout,
"text").
1308 " WHERE obj_id = ".$ilDB->quote($c[
"child"],
"integer");
1309 $ilDB->manipulate(
$query);
1325 $query =
"SELECT layout FROM lm_data WHERE obj_id = ".
1326 $ilDB->quote($a_obj_id,
"integer");
1327 $obj_set = $ilDB->query(
$query);
1328 $obj_rec = $ilDB->fetchAssoc($obj_set);
1330 return $obj_rec[
"layout"];
1342 $lm_tree =
new ilTree($a_lm_id);
1343 $lm_tree->setTableNames(
'lm_tree',
'lm_data');
1344 $lm_tree->setTreeTablePK(
"lm_id");
1345 $lm_tree->readRootId();
1347 $childs = $lm_tree->getChildsByType($a_chap_id,
"pg");
1362 $and = ($a_type !=
"")
1363 ?
" AND type = ".$ilDB->quote($a_type,
"text")
1366 $set = $ilDB->query(
"SELECT obj_id FROM lm_data ".
1367 " WHERE lm_id = ".$ilDB->quote($a_lm_id,
"integer").$and);
1369 while ($rec = $ilDB->fetchAssoc($set))
1371 $obj_ids[] = $rec[
"obj_id"];
1388 public static function saveExportId($a_lm_id, $a_lmobj_id, $a_exp_id, $a_type =
"pg")
1392 include_once(
"Services/MetaData/classes/class.ilMDIdentifier.php");
1394 if (trim($a_exp_id) ==
"")
1398 $a_lm_id, $a_lmobj_id, $a_type);
1400 foreach ($entries as $id => $e)
1402 if ($e[
"catalog"] ==
"ILIAS_NID")
1405 $identifier->setMetaId($id);
1406 $identifier->delete();
1414 $a_lm_id, $a_lmobj_id, $a_type);
1417 foreach ($entries as $id => $e)
1419 if ($e[
"catalog"] ==
"ILIAS_NID")
1422 $identifier->setMetaId($id);
1423 $identifier->read();
1424 $identifier->setEntry($a_exp_id);
1425 $identifier->update();
1433 include_once(
"./Services/MetaData/classes/class.ilMD.php");
1434 $md =
new ilMD($a_lm_id, $a_lmobj_id, $a_type);
1435 $md_gen = $md->getGeneral();
1436 $identifier = $md_gen->addIdentifier();
1437 $identifier->setEntry($a_exp_id);
1438 $identifier->setCatalog(
"ILIAS_NID");
1439 $identifier->save();
1451 public static function getExportId($a_lm_id, $a_lmobj_id, $a_type =
"pg")
1454 include_once(
"./Services/MetaData/classes/class.ilMDIdentifier.php");
1456 $a_lm_id, $a_lmobj_id, $a_type);
1458 foreach ($entries as $e)
1460 if ($e[
"catalog"] ==
"ILIAS_NID")
1475 include_once(
"./Services/MetaData/classes/class.ilMDIdentifier.php");
1484 include_once(
"./Services/MetaData/classes/class.ilMDIdentifier.php");
1487 foreach ($entries as $e)
1489 if ($e[
"catalog"] ==
"ILIAS_NID")
1493 $res[trim($e[
"entry"])]++;
1508 include_once(
"./Services/MetaData/classes/class.ilMDIdentifier.php");
1520 $a_include_numbers =
false, $a_time_scheduled_activation =
false,
1521 $a_force_content =
false, $a_lm_id = 0, $a_lang =
"-")
1528 if ($a_node[
"type"] ==
"st")
1530 include_once
'./Modules/LearningModule/classes/class.ilStructureObject.php';
1532 $a_include_numbers, $a_time_scheduled_activation, $a_lm_id, $a_lang);
1536 include_once
'./Modules/LearningModule/classes/class.ilLMPageObject.php';
1538 $a_mode, $a_include_numbers, $a_time_scheduled_activation,
1539 $a_force_content, $a_lm_id, $a_lang);
& cloneMD($a_rbac_id, $a_obj_id, $a_obj_type)
setLayout($a_val)
Set layout.
MDUpdateListener($a_element)
Meta data update listener.
static updateInternalLinks($a_copied_nodes, $a_parent_type="lm")
Update internal links, after multiple pages have been copied.
static saveExportId($a_lm_id, $a_lmobj_id, $a_exp_id, $a_type="pg")
Save export id.
static _lookupType($a_obj_id, $a_lm_id=0)
Lookup type.
static _getPresentationTitle($a_st_id, $a_include_numbers=false, $a_time_scheduled_activation=false, $a_lm_id=0, $a_lang="-")
get presentation title
existsExportID($a_lm_id, $a_exp_id, $a_type="pg")
Does export ID exist in lm?
_exists($a_id)
checks wether a lm content object with specified id exists or not
ilLMObject($a_content_obj, $a_id=0)
static uniqueTypesCheck($a_items)
Check for unique types (all pages or all chapters)
getInstance(&$a_content_obj, $a_id=0, $a_halt=true)
static saveTitles($a_lm, $a_titles, $a_lang="-")
Save titles for lm objects.
setTitle($a_title)
set title of lm object
static _getAllLMObjectsOfLM($a_lm_id, $a_type="")
Get all objects of learning module.
static pasteTree($a_target_lm, $a_item_id, $a_parent_id, $a_target, $a_insert_time, &$a_copied_nodes, $a_as_copy=false, $a_source_lm=null)
Paste item (tree) from clipboard to current lm.
getExportIDInfo($a_lm_id, $a_exp_id, $a_type="pg")
Does export ID exist in lm?
static writeLayout($a_obj_id, $a_layout, $a_lm=null)
Write layout setting.
const LP_MODE_COLLECTION_TLT
update()
update complete object
static _lookupTitle($a_obj_id)
Lookup title.
_extractTypeOfTarget($a_target)
Extract type out of target.
static existsIdInRbacObject($a_rbac_id, $a_obj_type, $a_catalog, $a_entry)
Does id entry exist in rbac object?
static isHelpLM($a_lm_id)
Check if LM is a help LM.
_getSourcesOfTarget($a_target_type, $a_target_id, $a_target_inst)
get all sources of a link target
_extractObjIdOfTarget($a_target)
Extract object id out of target.
_writeTitle($a_obj_id, $a_title)
static _getAllReferences($a_id)
get all reference ids of object
static getTree($a_cont_obj_id)
Get learningmodule tree.
clipboardCut($a_cont_obj_id, $a_ids)
Copy a set of chapters/pages into the clipboard.
_createEntry($a_obj_id, $a_action, $a_info_params="", $a_obj_type="", $a_user_comment="", $a_update_last=false)
Creates a new history entry for an object.
static getDuplicateExportIDs($a_lm_id, $a_type="pg")
Get duplicate export IDs (count export ID usages)
static clipboardCopy($a_cont_obj_id, $a_ids)
Copy a set of chapters/pages into the clipboard.
_extractInstOfTarget($a_target)
Extract installation id out of target.
static putInTree($a_obj, $a_parent_id="", $a_target_node_id="")
put this object into content object tree
_lookupContObjID($a_id)
get learning module / digibook id for lm object
static preloadDataByLM($a_lm_id)
Preload data records by lm.
static _getEntriesForObj($a_rbac_id, $a_obj_id, $a_obj_type)
Get IDs for an object.
setDescription($a_description)
setTableNames($a_table_tree, $a_table_obj_data, $a_table_obj_reference="")
set table names The primary key of the table containing your object_data must be 'obj_id' You may use...
updateMetaData()
update meta data entry
static getExportId($a_lm_id, $a_lmobj_id, $a_type="pg")
Get export ID.
static _getMobsForTarget($a_type, $a_target)
Get areas for a certain target.
_getAllObjectsForImportId($a_import_id, $a_in_lm=0)
Get all items for an import ID.
_lookupNID($a_lm_id, $a_lm_obj_id, $a_type)
lookup named identifier (ILIAS_NID)
static lookupLayout($a_obj_id)
Lookup type.
Tree class data representation in hierachical trees using the Nested Set Model with Gaps by Joe Celco...
static _lookupType($a_id, $a_reference=false)
lookup object type
setDataRecord($a_record)
this method should only be called by class ilLMObjectFactory
static getPagesOfChapter($a_lm_id, $a_chap_id)
Get pages of chapter.
_getIdForImportId($a_import_id)
get current object id for import id (static)
setContentObject(&$a_content_obj)
static getInstance($a_parent_type, $a_id=0, $a_old_nr=0, $a_lang="-")
Get page object instance.
getTitle()
get title of lm object
_refreshStatus($a_obj_id, $a_users=null)
Set dirty.
_hasUntrashedReference($a_obj_id)
checks wether an object has at least one reference that is not in trash
createMetaData()
create meta data entry
_writePublicAccessStatus($a_pages, $a_cont_obj_id)
update public access flags in lm_data for all pages of a content object
static lookupTranslations($a_parent_type, $a_id)
Lookup translations.
getObjectList($lm_id, $type="")
static
static readIdData($a_rbac_id, $a_obj_type, $a_catalog, $a_entry)
Does id entry exist in rbac object?
deleteMetaData()
delete meta data entry
static _getPresentationTitle($a_pg_id, $a_mode=IL_CHAPTER_TITLE, $a_include_numbers=false, $a_time_scheduled_activation=false, $a_force_content=false, $a_lm_id=0, $a_lang="-")
presentation title doesn't have to be page title, it may be chapter title + page title or chapter tit...
_writeImportId($a_id, $a_import_id)
write import id to db (static)
static _getEntriesForRbacObj($a_rbac_id, $a_obj_type="")
Get IDs for an rbac object.
static _isPagePublic($a_node_id, $a_check_public_mode=false)
static yn2tf($a_yn)
convert "y"/"n" to true/false
Translation information on lm object.
static getInstance($a_obj_id)
_deleteAllObjectData(&$a_cobj)
delete all objects of content object (digi book / learning module)
Extension of ilPageObject for learning modules.
static _getPresentationTitle($a_node, $a_mode=IL_PAGE_TITLE, $a_include_numbers=false, $a_time_scheduled_activation=false, $a_force_content=false, $a_lm_id=0, $a_lang="-")
Get affective title.