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';
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;
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;
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 $query =
"SELECT * FROM lm_data ".
726 "WHERE lm_id= ".$ilDB->quote($a_cobj->getId(),
"integer");
727 $obj_set = $ilDB->query(
$query);
729 require_once(
"./Modules/LearningModule/classes/class.ilLMObjectFactory.php");
730 while ($obj_rec = $ilDB->fetchAssoc($obj_set))
734 if (is_object($lm_obj))
736 $lm_obj->delete(
true);
750 if (isset(self::$data_records[$a_id]))
752 return self::$data_records[$a_id][
"lm_id"];
755 $query =
"SELECT lm_id FROM lm_data WHERE obj_id = ".
756 $ilDB->quote($a_id,
"integer");
757 $obj_set = $ilDB->query(
$query);
758 $obj_rec = $ilDB->fetchAssoc($obj_set);
760 return $obj_rec[
"lm_id"];
766 static function putInTree($a_obj, $a_parent_id =
"", $a_target_node_id =
"")
770 $tree =
new ilTree($a_obj->getContentObject()->getId());
772 $tree->setTreeTablePK(
"lm_id");
775 $parent_id = ($a_parent_id !=
"")
777 : $tree->getRootId();
780 if ($a_target_node_id !=
"")
787 if ($a_obj->getType() ==
"st")
789 $s_types =
array(
"st",
"pg");
790 $childs = $tree->getChildsByTypeFilter($parent_id, $s_types);
795 $childs = $tree->getChildsByType($parent_id, $s_types);
798 if (count($childs) == 0)
804 $target = $childs[count($childs) - 1][
"obj_id"];
808 if ($tree->isInTree($parent_id) && !$tree->isInTree($a_obj->getId()))
810 $ilLog->write(
"LMObject::putInTree: insertNode, ID: ".$a_obj->getId().
811 "Parent ID: ".$parent_id.
", Target: ".
$target);
813 $tree->insertNode($a_obj->getId(), $parent_id,
$target);
826 $tree =
new ilTree($a_cont_obj_id);
827 $tree->setTableNames(
'lm_tree',
'lm_data');
828 $tree->setTreeTablePK(
"lm_id");
841 if (!is_array($a_ids))
848 foreach($a_ids as $id)
850 $path = $tree->getPathId($id);
852 foreach(
$path as $path_id)
854 if ($path_id != $id && in_array($path_id, $a_ids))
871 foreach ($cut_ids as $id)
873 $curnode = $tree->getNodeData($id);
874 if ($tree->isInTree($id))
876 $tree->deleteTree($curnode);
891 $ilUser->clipboardDeleteObjectsOfType(
"pg");
892 $ilUser->clipboardDeleteObjectsOfType(
"st");
895 $time =
date(
"Y-m-d H:i:s",
time());
897 foreach ($a_ids as $id)
900 if ($tree->isInTree($id))
902 $curnode = $tree->getNodeData($id);
903 $subnodes = $tree->getSubTree($curnode);
904 foreach($subnodes as $subnode)
906 if ($subnode[
"child"] != $id)
908 $ilUser->addObjectToClipboard($subnode[
"child"],
909 $subnode[
"type"], $subnode[
"title"],
910 $subnode[
"parent"], $time, $subnode[
"lft"]);
914 $order = ($curnode[
"lft"] > 0)
916 : (
int) ($order + 1);
917 $ilUser->addObjectToClipboard($id,
926 static function pasteTree($a_target_lm, $a_item_id, $a_parent_id, $a_target, $a_insert_time,
927 &$a_copied_nodes, $a_as_copy =
false, $a_source_lm = null)
931 include_once(
"./Modules/LearningModule/classes/class.ilStructureObject.php");
932 include_once(
"./Modules/LearningModule/classes/class.ilLMPageObject.php");
936 $lm_obj = $ilias->obj_factory->getInstanceByObjId($item_lm_id);
937 if ($item_type ==
"st")
941 else if ($item_type ==
"pg")
946 $ilLog->write(
"Getting from clipboard type ".$item_type.
", ".
947 "Item ID: ".$a_item_id.
", of original LM: ".$item_lm_id);
949 if ($item_lm_id != $a_target_lm->getId() && !$a_as_copy)
954 include_once(
"Services/MetaData/classes/class.ilMD.php");
955 $md =
new ilMD($item_lm_id, $item->getId(), $item->getType());
956 $new_md = $md->
cloneMD($a_target_lm->getId(), $item->getId(), $item->getType());
959 $item->setLMId($a_target_lm->getId());
960 $item->setContentObject($a_target_lm);
966 if ($item_type ==
"pg")
968 $page = $item->getPageObject();
970 $page->setParentId($a_target_lm->getId());
977 $target_item = $item->copy($a_target_lm);
978 $a_copied_nodes[$item->getId()] = $target_item->getId();
982 $target_item = $item;
985 $ilLog->write(
"Putting into tree type ".$target_item->getType().
986 "Item ID: ".$target_item->getId().
", Parent: ".$a_parent_id.
", ".
987 "Target: ".$a_target.
", Item LM:".$target_item->getContentObject()->getId());
991 if ($a_source_lm == null)
993 $childs = $ilUser->getClipboardChilds($item->getId(), $a_insert_time);
997 $childs = $a_source_lm->lm_tree->getChilds($item->getId());
998 foreach ($childs as $k => $child)
1000 $childs[$k][
"id"] = $childs[$k][
"child"];
1004 foreach($childs as $child)
1007 IL_LAST_NODE, $a_insert_time, $a_copied_nodes, $a_as_copy, $a_source_lm);
1010 return $target_item->getId();
1021 include_once(
"./Modules/LearningModule/classes/class.ilLMObjTranslation.php");
1027 if (is_array($a_titles))
1029 include_once(
"./Services/Form/classes/class.ilFormPropertyGUI.php");
1030 include_once(
"./Services/MetaData/classes/class.ilMD.php");
1031 foreach($a_titles as $id => $title)
1038 if (is_object($lmobj))
1041 $md =
new ilMD($a_lm->getId(),
$id, $lmobj->getType());
1043 if (is_object($md_gen))
1045 $md_gen->setTitle($title);
1055 $lmobjtrans->setTitle($title);
1056 $lmobjtrans->save();
1067 $all_fixes =
array();
1068 foreach($a_copied_nodes as $original_id => $copied_id)
1073 if ($copied_type ==
"pg")
1081 include_once(
"./Modules/LearningModule/classes/class.ilLMPage.php");
1082 $tpg =
new ilLMPage($copied_id, 0, $l);
1084 $il = $tpg->getInternalLinks();
1095 if (($target[
"inst"] == 0 || $target[
"inst"] = IL_INST_ID) &&
1096 ($target[
"type"] ==
"pg" || $target[
"type"] ==
"st"))
1099 if ($a_copied_nodes[$target[
"id"]] > 0)
1101 $fix[$target[
"id"]] = $a_copied_nodes[$target[
"id"]];
1108 if ($trg_lm != $copy_lm)
1113 foreach ($lm_data as $item)
1115 if (!$found && ($item[
"lm_id"] == $copy_lm))
1117 $fix[$target[
"id"]] = $item[
"obj_id"];
1127 if (count($fix) > 0)
1132 if (is_array($all_fixes[
$t .
":" . $copied_id]))
1134 $all_fixes[
$t .
":" . $copied_id] += $fix;
1137 $all_fixes[
$t .
":" . $copied_id] = $fix;
1143 if ($copied_type ==
"pg" ||
1144 $copied_type ==
"st")
1157 if ($original_lm != $copy_lm)
1172 include_once(
"./Services/MediaObjects/classes/class.ilObjMediaObject.php");
1173 foreach(
$mobs as $mob)
1183 foreach($usages as $usage)
1185 if ($usage[
"type"] ==
"lm:pg" | $usage[
"type"] ==
"lm:st")
1187 $sources[] = $usage;
1192 foreach($sources as $source)
1194 $stype = explode(
":", $source[
"type"]);
1195 $source_type = $stype[1];
1197 if ($source_type ==
"pg" || $source_type ==
"st")
1202 if ($src_lm == $original_lm)
1209 foreach ($lm_data as $item)
1213 $fix[$item[
"obj_id"]][$original_id] = $copied_id;
1221 if (count($fix) > 0)
1223 foreach ($fix as $page_id => $fix_array)
1226 if (is_array($all_fixes[
$t.
":".$page_id]))
1228 $all_fixes[
$t.
":".$page_id] += $fix_array;
1232 $all_fixes[
$t.
":".$page_id] = $fix_array;
1241 foreach ($all_fixes as $pg => $fixes)
1243 $pg = explode(
":", $pg);
1244 include_once(
"./Services/COPage/classes/class.ilPageObjectFactory.php");
1248 if ($page->moveIntLinks($fixes))
1250 $page->update(
true,
true);
1262 if (is_array($a_items))
1264 foreach($a_items as $item)
1271 if (count($types) > 1)
1292 $query =
"UPDATE lm_data SET ".
1293 " layout = ".$ilDB->quote($a_layout,
"text").
1294 " WHERE obj_id = ".$ilDB->quote($a_obj_id,
"integer");
1295 $ilDB->manipulate(
$query);
1297 else if (
$t ==
"st" && is_object($a_lm))
1299 $node = $a_lm->getLMTree()->getNodeData($a_obj_id);
1300 $child_nodes = $a_lm->getLMTree()->getSubTree($node);
1301 if (is_array($child_nodes) && count($child_nodes) > 0)
1303 foreach ($child_nodes as $c)
1305 if ($c[
"type"] ==
"pg")
1307 $query =
"UPDATE lm_data SET ".
1308 " layout = ".$ilDB->quote($a_layout,
"text").
1309 " WHERE obj_id = ".$ilDB->quote($c[
"child"],
"integer");
1310 $ilDB->manipulate(
$query);
1326 $query =
"SELECT layout FROM lm_data WHERE obj_id = ".
1327 $ilDB->quote($a_obj_id,
"integer");
1328 $obj_set = $ilDB->query(
$query);
1329 $obj_rec = $ilDB->fetchAssoc($obj_set);
1331 return $obj_rec[
"layout"];
1343 $lm_tree =
new ilTree($a_lm_id);
1344 $lm_tree->setTableNames(
'lm_tree',
'lm_data');
1345 $lm_tree->setTreeTablePK(
"lm_id");
1346 $lm_tree->readRootId();
1348 $childs = $lm_tree->getChildsByType($a_chap_id,
"pg");
1364 ?
" AND type = ".$ilDB->quote(
$a_type,
"text")
1367 $set = $ilDB->query(
"SELECT obj_id FROM lm_data ".
1368 " WHERE lm_id = ".$ilDB->quote($a_lm_id,
"integer").$and);
1370 while ($rec = $ilDB->fetchAssoc($set))
1372 $obj_ids[] = $rec[
"obj_id"];
1393 include_once(
"Services/MetaData/classes/class.ilMDIdentifier.php");
1395 if (trim($a_exp_id) ==
"")
1399 $a_lm_id, $a_lmobj_id,
$a_type);
1401 foreach ($entries as $id => $e)
1403 if ($e[
"catalog"] ==
"ILIAS_NID")
1406 $identifier->setMetaId($id);
1407 $identifier->delete();
1415 $a_lm_id, $a_lmobj_id,
$a_type);
1418 foreach ($entries as $id => $e)
1420 if ($e[
"catalog"] ==
"ILIAS_NID")
1423 $identifier->setMetaId($id);
1424 $identifier->read();
1425 $identifier->setEntry($a_exp_id);
1426 $identifier->update();
1434 include_once(
"./Services/MetaData/classes/class.ilMD.php");
1436 $md_gen = $md->getGeneral();
1437 $identifier = $md_gen->addIdentifier();
1438 $identifier->setEntry($a_exp_id);
1439 $identifier->setCatalog(
"ILIAS_NID");
1440 $identifier->save();
1455 include_once(
"./Services/MetaData/classes/class.ilMDIdentifier.php");
1457 $a_lm_id, $a_lmobj_id,
$a_type);
1459 foreach ($entries as $e)
1461 if ($e[
"catalog"] ==
"ILIAS_NID")
1476 include_once(
"./Services/MetaData/classes/class.ilMDIdentifier.php");
1485 include_once(
"./Services/MetaData/classes/class.ilMDIdentifier.php");
1488 foreach ($entries as $e)
1490 if ($e[
"catalog"] ==
"ILIAS_NID")
1494 $res[trim($e[
"entry"])]++;
1509 include_once(
"./Services/MetaData/classes/class.ilMDIdentifier.php");
1521 $a_include_numbers =
false, $a_time_scheduled_activation =
false,
1522 $a_force_content =
false, $a_lm_id = 0, $a_lang =
"-")
1529 if ($a_node[
"type"] ==
"st")
1531 include_once
'./Modules/LearningModule/classes/class.ilStructureObject.php';
1533 $a_include_numbers, $a_time_scheduled_activation, $a_force_content, $a_lm_id, $a_lang);
1537 include_once
'./Modules/LearningModule/classes/class.ilLMPageObject.php';
1539 $a_mode, $a_include_numbers, $a_time_scheduled_activation,
1540 $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 _hasUntrashedReference($a_obj_id)
checks wether an object has at least one reference that is not in trash
existsExportID($a_lm_id, $a_exp_id, $a_type="pg")
Does export ID exist in lm?
static _getPresentationTitle($a_st_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="-")
get presentation title
static uniqueTypesCheck($a_items)
Check for unique types (all pages or all chapters)
static _exists($a_id)
checks wether a lm content object with specified id exists or not
static _extractInstOfTarget($a_target)
Extract installation id out of target.
static _getIdForImportId($a_import_id)
get current object id for import id (static)
static saveTitles($a_lm, $a_titles, $a_lang="-")
Save titles for lm objects.
static _extractTypeOfTarget($a_target)
Extract type out of target.
setTitle($a_title)
set title of lm object
static _writeTitle($a_obj_id, $a_title)
static _extractObjIdOfTarget($a_target)
Extract object id out of target.
static _writePublicAccessStatus($a_pages, $a_cont_obj_id)
update public access flags in lm_data for all pages of a content 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
static _lookupContObjID($a_id)
get learning module / digibook id for lm object
update()
update complete object
static _refreshStatus($a_obj_id, $a_users=null)
Set dirty.
static _lookupTitle($a_obj_id)
Lookup title.
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.
__construct($a_content_obj, $a_id=0)
static _getAllObjectsForImportId($a_import_id, $a_in_lm=0)
Get all items for an import ID.
static _getAllReferences($a_id)
get all reference ids of object
static getTree($a_cont_obj_id)
Get learningmodule tree.
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.
static _deleteAllObjectData(&$a_cobj)
delete all objects of content object (digi book / learning module)
date( 'd-M-Y', $objPHPExcel->getProperties() ->getCreated())
static putInTree($a_obj, $a_parent_id="", $a_target_node_id="")
put this object into content object tree
static preloadDataByLM($a_lm_id)
Preload data records by lm.
static clipboardCut($a_cont_obj_id, $a_ids)
Copy a set of chapters/pages into the clipboard.
static getInstance(&$a_content_obj, $a_id=0, $a_halt=true)
static _getEntriesForObj($a_rbac_id, $a_obj_id, $a_obj_type)
Get IDs for an object.
setDescription($a_description)
static _getSourcesOfTarget($a_target_type, $a_target_id, $a_target_inst)
get all sources of a link target
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 _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 _getMobsForTarget($a_type, $a_target)
Get areas for a certain target.
static lookupLayout($a_obj_id)
Lookup type.
static _writeImportId($a_id, $a_import_id)
write import id to db (static)
Tree class data representation in hierachical trees using the Nested Set Model with Gaps by Joe Celco...
Create styles array
The data for the language used.
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.
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
createMetaData()
create meta data entry
static lookupTranslations($a_parent_type, $a_id)
Lookup translations.
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...
Add data(end) time
Method that wraps PHPs time in order to allow simulations with the workflow.
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 getObjectList($lm_id, $type="")
static
static yn2tf($a_yn)
convert "y"/"n" to true/false
Translation information on lm object.
static getInstance($a_obj_id)
static _lookupNID($a_lm_id, $a_lm_obj_id, $a_type)
lookup named identifier (ILIAS_NID)
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.