27 protected \ILIAS\Notes\Service
$notes;
68 bool $a_call_by_reference =
true
71 $this->main_tpl =
$DIC->ui()->mainTemplate();
73 $this->
user = $DIC->user();
74 $this->db =
$DIC->database();
75 $this->tree =
$DIC->repositoryTree();
76 $this->
lng = $DIC->language();
77 $this->
error = $DIC[
"ilErr"];
78 if (isset(
$DIC[
"ilLocator"])) {
79 $this->
locator = $DIC[
"ilLocator"];
81 $this->lom_services =
$DIC->learningObjectMetadata();
82 $this->notes =
$DIC->notes();
93 $this->mob_ids = array();
94 $this->file_ids = array();
95 $this->q_ids = array();
96 $cs =
$DIC->contentStyle();
97 $this->content_style_domain = $cs->domain();
104 bool $a_no_meta_data =
false
110 if (!$a_no_meta_data) {
127 $this->readProperties();
131 "SELECT * FROM lm_glossaries " .
132 " WHERE lm_id = " .
$ilDB->quote($this->getId(),
"integer")
135 while ($rec =
$ilDB->fetchAssoc($set)) {
136 $glos[] = $rec[
"glo_id"];
138 $this->setAutoGlossaries($glos);
143 $this->layout_per_page = $a_val;
148 return $this->layout_per_page;
156 $this->disable_def_feedback = $a_val;
161 return $this->disable_def_feedback;
166 $this->progr_icons = $a_val;
171 return $this->progr_icons;
176 $this->store_tries = $a_val;
181 return $this->store_tries;
186 $this->restrict_forw_nav = $a_val;
191 return $this->restrict_forw_nav;
196 return $this->lm_tree;
201 $this->updateMetaData();
203 $this->updateProperties();
204 $this->updateAutoGlossaries();
214 "DELETE FROM lm_glossaries WHERE " .
215 " lm_id = " .
$ilDB->quote($this->getId(),
"integer")
217 foreach ($this->getAutoGlossaries() as $glo_id) {
218 $ilDB->manipulate(
"INSERT INTO lm_glossaries " .
219 "(lm_id, glo_id) VALUES (" .
220 $ilDB->quote($this->getId(),
"integer") .
"," .
221 $ilDB->quote($glo_id,
"integer") .
230 public function import():
void
238 $this->lm_tree->addTree($this->
getId(), 1);
243 $this->auto_glossaries = array();
244 if (is_array($a_val)) {
245 foreach ($a_val as $v) {
248 !in_array($v, $this->auto_glossaries)) {
249 $this->auto_glossaries[] = $v;
257 return $this->auto_glossaries;
263 foreach ($this->getAutoGlossaries() as $g) {
264 if ($g != $a_glo_id) {
268 $this->setAutoGlossaries($glo_ids);
271 public function addFirstChapterAndPage(): void
276 $root_id = $this->lm_tree->getRootId();
280 $chap->setType(
"st");
281 $chap->setTitle(
$lng->txt(
"cont_new_chap"));
282 $chap->setLMId($this->
getId());
290 $page->setType(
"pg");
291 $page->setTitle(
$lng->txt(
"cont_new_page"));
292 $page->setLMId($this->
getId());
302 $this->for_translation = $a_val;
307 return $this->for_translation;
312 return $this->lm_tree;
326 if (!is_writable($lm_data_dir)) {
327 $ilErr->raiseError(
"Content object Data Directory (" . $lm_data_dir
328 .
") not writeable.",
$ilErr->FATAL);
332 $lm_dir = $lm_data_dir .
"/lm_" . $this->
getId();
334 if (!is_dir($lm_dir)) {
335 $ilErr->raiseError(
"Creation of Learning Module Directory failed.",
$ilErr->FATAL);
339 $import_dir = $lm_dir .
"/import";
341 if (!is_dir($import_dir)) {
342 $ilErr->raiseError(
"Creation of Import Directory failed.",
$ilErr->FATAL);
349 "/lm_" . $this->
getId();
354 if (strlen($this->import_dir)) {
355 return $this->import_dir;
359 "/lm_" . $this->
getId() .
"/import";
360 if (is_dir($import_dir)) {
368 $this->import_dir = $a_import_dir;
378 string $a_type =
"xml"
384 $lm_dir = $lm_data_dir .
"/lm_" . $this->
getId();
386 if (!is_dir($lm_dir)) {
387 $ilErr->raiseError(
"Creation of Learning Module Directory failed.",
$ilErr->FATAL);
392 if (substr($a_type, 0, 4) ==
"html") {
393 $export_dir = $lm_dir .
"/export_" . $a_type;
395 $export_dir = $lm_dir .
"/export";
401 if (!is_dir($export_dir)) {
402 $ilErr->raiseError(
"Creation of Export Directory failed.",
$ilErr->FATAL);
407 string $a_type =
"xml"
411 if (substr($a_type, 0, 4) ==
"html") {
430 public function delete():
bool
435 if (!parent::delete()) {
445 $this->deleteMetaData();
449 $this->lm_tree->removeTree($this->lm_tree->getTreeId());
455 $q =
"DELETE FROM content_object WHERE id = " .
460 $q =
"DELETE FROM lm_menu WHERE lm_id = " .
466 "DELETE FROM lm_glossaries WHERE " .
467 " lm_id = " .
$ilDB->quote($this->getId(),
"integer")
476 return $this->layout;
481 $this->layout = $a_layout;
493 "UPDATE content_object SET " .
494 " header_page = " .
$ilDB->quote($a_page_id,
"integer") .
495 " WHERE id = " .
$ilDB->quote($a_lm_id,
"integer")
508 "UPDATE content_object SET " .
509 " footer_page = " .
$ilDB->quote($a_page_id,
"integer") .
510 " WHERE id = " .
$ilDB->quote($a_lm_id,
"integer")
526 if ($a_from_style < 0) {
527 $q =
"SELECT stylesheet FROM content_object, style_data " .
528 " WHERE content_object.stylesheet = style_data.id " .
529 " AND style_data.standard = " .
$ilDB->quote(0,
"integer") .
530 " AND content_object.stylesheet > " .
$ilDB->quote(0,
"integer");
532 while ($style_rec =
$ilDB->fetchAssoc($style_set)) {
534 $q =
"UPDATE content_object SET " .
535 " stylesheet = " .
$ilDB->quote($a_to_style,
"integer") .
536 " WHERE stylesheet = " .
$ilDB->quote($style_rec[
"stylesheet"],
"integer");
541 $style_obj->delete();
544 $q =
"UPDATE content_object SET " .
545 " stylesheet = " .
$ilDB->quote($a_to_style,
"integer") .
546 " WHERE stylesheet = " .
$ilDB->quote($a_from_style,
"integer");
559 $q =
"SELECT " . $a_field .
" FROM content_object " .
560 " WHERE id = " .
$ilDB->quote($a_obj_id,
"integer");
565 return $rec[$a_field];
571 return self::_lookup($a_obj_id,
"restrict_forw_nav");
580 $q =
"SELECT stylesheet FROM content_object " .
581 " WHERE id = " .
$ilDB->quote($a_cont_obj_id,
"integer");
585 return (
int) $sheet[
"stylesheet"];
594 $q =
"SELECT id FROM content_object " .
595 " WHERE stylesheet = " .
$ilDB->quote($a_style_id,
"integer");
598 while ($cont =
$ilDB->fetchAssoc(
$res)) {
599 $obj_ids[] = (
int) $cont[
"id"];
610 $q =
"SELECT disable_def_feedback FROM content_object " .
611 " WHERE id = " .
$ilDB->quote($a_id,
"integer");
615 return (
bool) ($rec[
"disable_def_feedback"] ??
false);
624 $q =
"SELECT store_tries FROM content_object " .
625 " WHERE id = " .
$ilDB->quote($a_id,
"integer");
629 return (
bool) ($rec[
"store_tries"] ??
false);
642 $q =
"SELECT count(*) as cnt FROM content_object " .
643 " WHERE stylesheet = " .
$ilDB->quote($a_style_id,
"integer");
645 $crow =
$ilDB->fetchAssoc($cset);
647 return (
int) ($crow[
"cnt"] ?? 0);
661 $q =
"SELECT count(*) as cnt FROM content_object, style_data " .
662 " WHERE stylesheet = style_data.id " .
663 " AND standard = " .
$ilDB->quote(0,
"integer");
665 $crow =
$ilDB->fetchAssoc($cset);
667 return (
int) $crow[
"cnt"];
679 $q =
"SELECT count(*) as cnt FROM content_object " .
680 " WHERE stylesheet = " .
$ilDB->quote(0,
"integer");
682 $crow =
$ilDB->fetchAssoc($cset);
684 return (
int) $crow[
"cnt"];
697 $q =
"UPDATE content_object SET " .
698 " stylesheet = " .
$ilDB->quote(0,
"integer") .
699 " WHERE stylesheet = " .
$ilDB->quote($a_style_id,
"integer");
709 return $this->pg_header;
719 $this->pg_header = $a_pg_header;
727 return $this->toc_mode;
734 public function setTOCMode(
string $a_toc_mode =
"chapters"): void
736 $this->toc_mode = $a_toc_mode;
741 $this->lm_menu_active = $a_act_lm_menu;
746 return $this->lm_menu_active;
751 $this->toc_active = $a_toc;
756 return $this->toc_active;
761 $this->numbering = $a_num;
766 return $this->numbering;
771 $this->print_view_active = $a_print;
776 return $this->print_view_active;
781 $this->prevent_glossary_appendix_active = $a_print;
786 return $this->prevent_glossary_appendix_active;
794 $this->hide_header_footer_print = $a_val;
799 return $this->hide_header_footer_print;
804 $this->pub_notes = $a_pub_notes;
809 return $this->pub_notes;
814 $this->clean_frames = $a_clean;
819 return $this->clean_frames;
824 $this->header_page = $a_pg;
829 return $this->header_page;
834 $this->footer_page = $a_pg;
839 return $this->footer_page;
846 $q =
"SELECT * FROM content_object WHERE id = " .
850 $this->setLayout((
string) $lm_rec[
"default_layout"]);
851 $this->setPageHeader((
string) $lm_rec[
"page_header"]);
852 $this->setTOCMode((
string) $lm_rec[
"toc_mode"]);
854 $this->setActiveNumbering(
ilUtil::yn2tf($lm_rec[
"numbering"]));
855 $this->setActivePrintView(
ilUtil::yn2tf($lm_rec[
"print_view_active"]));
856 $this->setActivePreventGlossaryAppendix(
ilUtil::yn2tf($lm_rec[
"no_glo_appendix"]));
857 $this->setHideHeaderFooterPrint((
bool) $lm_rec[
"hide_head_foot_print"]);
858 $this->setActiveLMMenu(
ilUtil::yn2tf($lm_rec[
"lm_menu_active"]));
859 $this->setCleanFrames(
ilUtil::yn2tf($lm_rec[
"clean_frames"]));
860 $this->setHeaderPage((
int) $lm_rec[
"header_page"]);
861 $this->setFooterPage((
int) $lm_rec[
"footer_page"]);
862 $this->setLayoutPerPage((
bool) $lm_rec[
"layout_per_page"]);
863 $this->setRating((
bool) $lm_rec[
"rating"]);
864 $this->setRatingPages((
bool) $lm_rec[
"rating_pages"]);
865 $this->setDisableDefaultFeedback((
bool) $lm_rec[
"disable_def_feedback"]);
866 $this->setProgressIcons((
bool) $lm_rec[
"progr_icons"]);
867 $this->setStoreTries((
bool) $lm_rec[
"store_tries"]);
868 $this->setRestrictForwardNavigation((
bool) $lm_rec[
"restrict_forw_nav"]);
871 $this->setPublicNotes($this->notes->domain()->commentsActive($this->getId()));
873 $this->setForTranslation((
bool) $lm_rec[
"for_translation"]);
881 if ($this->getLayoutPerPage()) {
882 $this->setCleanFrames(
true);
885 $q =
"UPDATE content_object SET " .
886 " default_layout = " .
$ilDB->quote($this->getLayout(),
"text") .
", " .
887 " page_header = " .
$ilDB->quote($this->getPageHeader(),
"text") .
"," .
888 " toc_mode = " .
$ilDB->quote($this->getTOCMode(),
"text") .
"," .
890 " numbering = " .
$ilDB->quote(
ilUtil::tf2yn($this->isActiveNumbering()),
"text") .
"," .
891 " print_view_active = " .
$ilDB->quote(
ilUtil::tf2yn($this->isActivePrintView()),
"text") .
"," .
892 " no_glo_appendix = " .
$ilDB->quote(
ilUtil::tf2yn($this->isActivePreventGlossaryAppendix()),
"text") .
"," .
893 " hide_head_foot_print = " .
$ilDB->quote($this->getHideHeaderFooterPrint(),
"integer") .
"," .
894 " clean_frames = " .
$ilDB->quote(
ilUtil::tf2yn($this->cleanFrames()),
"text") .
"," .
895 " header_page = " .
$ilDB->quote($this->getHeaderPage(),
"integer") .
"," .
896 " footer_page = " .
$ilDB->quote($this->getFooterPage(),
"integer") .
"," .
897 " lm_menu_active = " .
$ilDB->quote(
ilUtil::tf2yn($this->isActiveLMMenu()),
"text") .
", " .
898 " layout_per_page = " .
$ilDB->quote($this->getLayoutPerPage(),
"integer") .
", " .
899 " rating = " .
$ilDB->quote($this->hasRating(),
"integer") .
", " .
900 " rating_pages = " .
$ilDB->quote($this->hasRatingPages(),
"integer") .
", " .
901 " disable_def_feedback = " .
$ilDB->quote($this->getDisableDefaultFeedback(),
"integer") .
", " .
902 " progr_icons = " .
$ilDB->quote($this->getProgressIcons(),
"integer") .
", " .
903 " store_tries = " .
$ilDB->quote($this->getStoreTries(),
"integer") .
", " .
904 " restrict_forw_nav = " .
$ilDB->quote($this->getRestrictForwardNavigation(),
"integer") .
", " .
905 " for_translation = " .
$ilDB->quote((
int) $this->getForTranslation(),
"integer") .
" " .
906 " WHERE id = " .
$ilDB->quote($this->
getId(),
"integer");
909 $this->notes->domain()->activateComments($this->
getId(), $this->publicNotes());
919 $this->db->insert(
"content_object", [
920 "id" => [
"integer", $this->
getId()],
925 $this->notes->domain()->activateComments($this->
getId());
927 $this->readProperties();
936 $dir = opendir(
"./components/ILIAS/LearningModule/layouts/lm");
940 while ($file = readdir($dir)) {
941 if ($file !=
"." && $file !=
".." && $file !=
"CVS" && $file !=
".svn") {
943 if (is_dir(
"./components/ILIAS/LearningModule/layouts/lm/" . $file)) {
944 $layouts[$file] = $file;
952 'toc2win' =>
'toc2win',
953 'toc2windyn' =>
'toc2windyn',
954 '1window' =>
'1window',
955 '2window' =>
'2window',
956 '3window' =>
'3window',
957 'presentation' =>
'presentation',
958 'fullscreen' =>
'fullscreen'
961 foreach ($layouts as $l) {
962 if (!in_array($l, $ret)) {
978 $lm_tree = new
ilTree($cont_obj_id);
984 foreach (
$path as $node) {
985 if ($node[
"type"] ==
"st") {
1004 $lm_tree = new
ilTree($cont_obj_id);
1009 if ($lm_tree->
isInTree($page_id)) {
1012 foreach (
$path as $node) {
1013 if ($node[
"type"] ==
"st") {
1016 foreach ($tconds as $tcond) {
1033 int $cont_obj_ref_id,
1037 $lm_tree = new
ilTree($cont_obj_id);
1041 if ($lm_tree->
isInTree($page_id)) {
1044 foreach (
$path as $node) {
1045 if ($node[
"type"] ==
"st") {
1048 foreach ($tconds as $tcond) {
1051 return (
int) $node[
"child"];
1068 $tree = new
ilTree($a_cont_obj_id);
1070 $tree->setTreeTablePK(
"lm_id");
1071 if ($tree->isInTree($a_page_id)) {
1072 $succ = $tree->fetchSuccessorNode($a_page_id,
"pg");
1087 $tree->checkTreeChilds();
1094 $tree = $this->getLMTree();
1099 $set =
$ilDB->query(
1100 "SELECT DISTINCT l1.lm_id" .
1101 " FROM lm_tree l1" .
1102 " JOIN lm_tree l2 ON ( l1.child = l2.parent" .
1103 " AND l1.lm_id = l2.lm_id )" .
1104 " JOIN lm_data ON ( l1.child = lm_data.obj_id )" .
1105 " WHERE (l2.lft < l1.lft" .
1106 " OR l2.rgt > l1.rgt OR l2.lft > l1.rgt OR l2.rgt < l1.lft)" .
1107 " AND l1.lm_id = " .
$ilDB->quote($this->getId(),
"integer") .
1108 " ORDER BY lm_data.create_date DESC"
1110 if ($rec =
$ilDB->fetchAssoc($set)) {
1115 $set =
$ilDB->query(
"SELECT * FROM lm_tree WHERE lm_tree.lm_id = " .
$ilDB->quote($this->getId(),
"integer"));
1116 while ($node =
$ilDB->fetchAssoc($set)) {
1117 $q =
"SELECT * FROM lm_data WHERE obj_id = " .
1118 $ilDB->quote($node[
"child"],
"integer");
1120 $obj_rec =
$ilDB->fetchAssoc($obj_set);
1122 $node_data = $tree->getNodeData($node[
"child"]);
1123 $node_data[
"child"] = $node[
"child"];
1124 $tree->deleteTree($node_data);
1129 $nodes = $tree->getSubTree($tree->getNodeData($tree->getRootId()));
1130 foreach ($nodes as $node) {
1131 $q =
"SELECT * FROM lm_data WHERE obj_id = " .
1132 $ilDB->quote($node[
"parent"],
"integer");
1134 $obj_rec =
$ilDB->fetchAssoc($obj_set);
1135 if (($obj_rec[
"type"] ??
"") ==
"pg") {
1136 $node_data = $tree->getNodeData($node[
"child"]);
1137 if ($tree->isInTree($node[
"child"])) {
1138 $tree->deleteTree($node_data);
1145 $set =
$ilDB->query(
"SELECT DISTINCT l1.lm_id" .
1146 " FROM lm_tree l1" .
1147 " JOIN lm_tree l2 ON ( l1.child = l2.child AND l1.lm_id <> l2.lm_id )" .
1148 " JOIN lm_data ON (l1.child = lm_data.obj_id)" .
1149 " WHERE l1.child <> 1" .
1150 " AND l1.lm_id <> lm_data.lm_id" .
1151 " AND l1.lm_id = " .
$ilDB->quote($this->getId(),
"integer"));
1152 if ($rec =
$ilDB->fetchAssoc($set)) {
1153 $set =
$ilDB->query(
"SELECT DISTINCT l1.child " .
1154 " FROM lm_tree l1" .
1155 " JOIN lm_tree l2 ON ( l1.child = l2.child AND l1.lm_id <> l2.lm_id )" .
1156 " JOIN lm_data ON (l1.child = lm_data.obj_id)" .
1157 " WHERE l1.child <> 1" .
1158 " AND l1.lm_id <> lm_data.lm_id" .
1159 " AND l1.lm_id = " .
$ilDB->quote($this->getId(),
"integer"));
1160 while ($rec =
$ilDB->fetchAssoc($set)) {
1163 if (is_object($cobj)) {
1164 if ($cobj->getType() ==
"pg") {
1166 $pg_copy = $cobj->copy($this->lm);
1170 "UPDATE lm_tree SET " .
1171 " child = " .
$ilDB->quote($pg_copy->getId(),
"integer") .
1172 " WHERE child = " .
$ilDB->quote($cobj->getId(),
"integer") .
1173 " AND lm_id = " .
$ilDB->quote($this->getId(),
"integer")
1175 } elseif ($cobj->getType() ==
"st") {
1177 $st_copy = $cobj->copy($this->lm);
1181 "UPDATE lm_tree SET " .
1182 " child = " .
$ilDB->quote($st_copy->getId(),
"integer") .
1183 " WHERE child = " .
$ilDB->quote($cobj->getId(),
"integer") .
1184 " AND lm_id = " .
$ilDB->quote($this->getId(),
"integer")
1189 "UPDATE lm_tree SET " .
1190 " parent = " .
$ilDB->quote($st_copy->getId(),
"integer") .
1191 " WHERE parent = " .
$ilDB->quote($cobj->getId(),
"integer") .
1192 " AND lm_id = " .
$ilDB->quote($this->getId(),
"integer")
1200 $set =
$ilDB->queryF(
1201 "SELECT * FROM lm_data " .
1202 " WHERE lm_id = %s AND type = %s",
1203 array(
"integer",
"text"),
1204 array($this->
getId(),
"pg")
1206 while ($rec =
$ilDB->fetchAssoc($set)) {
1209 $lm_page->setId($rec[
"obj_id"]);
1210 $lm_page->setParentId($this->
getId());
1211 $lm_page->create(
false);
1224 $tree = $this->getLMTree();
1229 $set =
$ilDB->query(
1230 "SELECT l1.child, l1.lft l1lft, l1.rgt l1rgt, l2.parent, l2.lft l2lft, l2.rgt l2rgt" .
1231 " FROM lm_tree l1" .
1232 " JOIN lm_tree l2 ON ( l1.child = l2.parent" .
1233 " AND l1.lm_id = l2.lm_id )" .
1234 " JOIN lm_data ON ( l1.child = lm_data.obj_id )" .
1235 " WHERE (l2.lft < l1.lft" .
1236 " OR l2.rgt > l1.rgt OR l2.lft > l1.rgt OR l2.rgt < l1.lft)" .
1237 " AND l1.lm_id = " .
$ilDB->quote($this->getId(),
"integer") .
1238 " ORDER BY lm_data.create_date DESC"
1240 while ($rec =
$ilDB->fetchAssoc($set)) {
1241 $issues[] =
"Tree numbering: " . print_r($rec,
true);
1245 $set =
$ilDB->query(
"SELECT * FROM lm_tree WHERE lm_tree.lm_id = " .
$ilDB->quote($this->getId(),
"integer"));
1246 while ($node =
$ilDB->fetchAssoc($set)) {
1247 $q =
"SELECT * FROM lm_data WHERE obj_id = " .
1248 $ilDB->quote($node[
"child"],
"integer");
1250 $obj_rec =
$ilDB->fetchAssoc($obj_set);
1252 $issues[] =
"Tree entry without data entry: " . print_r($node,
true);
1257 $nodes = $tree->getSubTree($tree->getNodeData($tree->getRootId()));
1258 foreach ($nodes as $node) {
1259 $q =
"SELECT * FROM lm_data WHERE obj_id = " .
1260 $ilDB->quote($node[
"parent"],
"integer");
1262 $obj_rec =
$ilDB->fetchAssoc($obj_set);
1263 if (($obj_rec[
"type"] ??
"") ==
"pg") {
1264 $node_data = $tree->getNodeData($node[
"child"]);
1265 if ($tree->isInTree($node[
"child"])) {
1266 $issues[] =
"Subtree with page parent: " . print_r($node_data,
true);
1273 $set =
$ilDB->query(
"SELECT DISTINCT l1.lm_id" .
1274 " FROM lm_tree l1" .
1275 " JOIN lm_tree l2 ON ( l1.child = l2.child AND l1.lm_id <> l2.lm_id )" .
1276 " JOIN lm_data ON (l1.child = lm_data.obj_id)" .
1277 " WHERE l1.child <> 1" .
1278 " AND l1.lm_id <> lm_data.lm_id" .
1279 " AND l1.lm_id = " .
$ilDB->quote($this->getId(),
"integer"));
1280 if ($rec =
$ilDB->fetchAssoc($set)) {
1281 $set =
$ilDB->query(
"SELECT DISTINCT l1.child " .
1282 " FROM lm_tree l1" .
1283 " JOIN lm_tree l2 ON ( l1.child = l2.child AND l1.lm_id <> l2.lm_id )" .
1284 " JOIN lm_data ON (l1.child = lm_data.obj_id)" .
1285 " WHERE l1.child <> 1" .
1286 " AND l1.lm_id <> lm_data.lm_id" .
1287 " AND l1.lm_id = " .
$ilDB->quote($this->getId(),
"integer"));
1288 while ($rec =
$ilDB->fetchAssoc($set)) {
1289 $set3 =
$ilDB->queryF(
1290 "SELECT * FROM lm_tree " .
1291 " WHERE child = %s ",
1293 array($rec[
"child"])
1295 while ($rec3 =
$ilDB->fetchAssoc($set3)) {
1296 $issues[] =
"Multi-reference item: " . print_r($rec3,
true);
1302 $set =
$ilDB->queryF(
1303 "SELECT * FROM lm_data " .
1304 " WHERE lm_id = %s AND type = %s",
1305 array(
"integer",
"text"),
1306 array($this->
getId(),
"pg")
1308 while ($rec =
$ilDB->fetchAssoc($set)) {
1310 $issues[] =
"Missing COPage: " . print_r($rec,
true);
1321 string $a_target_dir,
1325 switch ($this->getType()) {
1327 $attrs[
"Type"] =
"LearningModule";
1330 $a_xml_writer->
xmlStartTag(
"ContentObject", $attrs);
1333 $this->exportXMLMetaData($a_xml_writer);
1337 $expLog->
write(date(
"[y-m-d H:i:s] ") .
"Start Export Structure Objects");
1338 $this->exportXMLStructureObjects($a_xml_writer, $a_inst, $expLog);
1339 $expLog->
write(date(
"[y-m-d H:i:s] ") .
"Finished Export Structure Objects");
1342 $expLog->
write(date(
"[y-m-d H:i:s] ") .
"Start Export Page Objects");
1343 $this->exportXMLPageObjects($a_xml_writer, $a_inst, $expLog);
1344 $expLog->
write(date(
"[y-m-d H:i:s] ") .
"Finished Export Page Objects");
1347 $expLog->
write(date(
"[y-m-d H:i:s] ") .
"Start Export Media Objects");
1348 $this->exportXMLMediaObjects($a_xml_writer, $a_inst, $a_target_dir, $expLog);
1349 $expLog->
write(date(
"[y-m-d H:i:s] ") .
"Finished Export Media Objects");
1352 $expLog->
write(date(
"[y-m-d H:i:s] ") .
"Start Export File Items");
1353 $this->exportFileItems($a_target_dir, $expLog);
1354 $expLog->
write(date(
"[y-m-d H:i:s] ") .
"Finished Export File Items");
1357 if (count($this->q_ids) > 0) {
1358 $qti_file = fopen($a_target_dir .
"/qti.xml",
"w");
1360 fwrite($qti_file, $pool->questionsToXML($this->q_ids));
1366 $expLog->
write(date(
"[y-m-d H:i:s] ") .
"Start Export Properties");
1367 $this->exportXMLProperties($a_xml_writer, $expLog);
1368 $expLog->
write(date(
"[y-m-d H:i:s] ") .
"Finished Export Properties");
1370 $a_xml_writer->
xmlEndTag(
"ContentObject");
1389 public function exportXMLStructureObjects(
1394 $childs = $this->lm_tree->getChilds($this->lm_tree->getRootId());
1395 foreach ($childs as $child) {
1396 if ($child[
"type"] !=
"st") {
1401 $structure_obj->exportXML($a_xml_writer, $a_inst, $expLog);
1402 unset($structure_obj);
1412 foreach ($pages as $page) {
1414 $expLog->
write(date(
"[y-m-d H:i:s] ") .
"Page Object " . $page[
"obj_id"]);
1418 $page_obj->exportXML($a_xml_writer,
"normal", $a_inst);
1421 $mob_ids = $page_obj->getMediaObjectIds();
1422 foreach ($mob_ids as $mob_id) {
1423 $this->mob_ids[$mob_id] = $mob_id;
1427 $file_ids = $page_obj->getFileItemIds();
1428 foreach ($file_ids as $file_id) {
1429 $this->file_ids[$file_id] = $file_id;
1433 $q_ids = $page_obj->getQuestionIds();
1434 foreach ($q_ids as $q_id) {
1435 $this->q_ids[$q_id] = $q_id;
1446 string $a_target_dir,
1449 $linked_mobs = array();
1452 foreach ($this->mob_ids as $mob_id) {
1454 $expLog->
write(date(
"[y-m-d H:i:s] ") .
"Media Object " . $mob_id);
1456 $media_obj->exportXML($a_xml_writer, $a_inst);
1457 $media_obj->exportFiles($a_target_dir);
1459 $lmobs = $media_obj->getLinkedMediaObjects($this->mob_ids);
1460 $linked_mobs = array_merge($linked_mobs, $lmobs);
1467 foreach ($linked_mobs as $mob_id) {
1469 $expLog->
write(date(
"[y-m-d H:i:s] ") .
"Media Object " . $mob_id);
1471 $media_obj->exportXML($a_xml_writer, $a_inst);
1472 $media_obj->exportFiles($a_target_dir);
1479 string $a_target_dir,
1482 foreach ($this->file_ids as $file_id) {
1483 $expLog->
write(date(
"[y-m-d H:i:s] ") .
"File Item " . $file_id);
1484 $file_obj =
new ilObjFile($file_id,
false);
1485 $file_obj->export($a_target_dir);
1498 $attrs = array(
"Name" =>
"Layout",
"Value" => $this->getLayout());
1499 $a_xml_writer->
xmlElement(
"Property", $attrs);
1502 $attrs = array(
"Name" =>
"PageHeader",
"Value" => $this->getPageHeader());
1503 $a_xml_writer->
xmlElement(
"Property", $attrs);
1506 $attrs = array(
"Name" =>
"TOCMode",
"Value" => $this->getTOCMode());
1507 $a_xml_writer->
xmlElement(
"Property", $attrs);
1510 $attrs = array(
"Name" =>
"ActiveLMMenu",
"Value" =>
1512 $a_xml_writer->
xmlElement(
"Property", $attrs);
1515 $attrs = array(
"Name" =>
"ActiveNumbering",
"Value" =>
1517 $a_xml_writer->
xmlElement(
"Property", $attrs);
1520 $attrs = array(
"Name" =>
"ActiveTOC",
"Value" =>
1522 $a_xml_writer->
xmlElement(
"Property", $attrs);
1525 $attrs = array(
"Name" =>
"ActivePrintView",
"Value" =>
1527 $a_xml_writer->
xmlElement(
"Property", $attrs);
1533 $attrs = array(
"Name" =>
"CleanFrames",
"Value" =>
1535 $a_xml_writer->
xmlElement(
"Property", $attrs);
1538 $attrs = array(
"Name" =>
"PublicNotes",
"Value" =>
1540 $a_xml_writer->
xmlElement(
"Property", $attrs);
1543 $attrs = array(
"Name" =>
"Rating",
"Value" =>
1545 $a_xml_writer->
xmlElement(
"Property", $attrs);
1546 $attrs = array(
"Name" =>
"RatingPages",
"Value" =>
1548 $a_xml_writer->
xmlElement(
"Property", $attrs);
1551 if ($this->getHeaderPage() > 0) {
1552 $attrs = array(
"Name" =>
"HeaderPage",
"Value" =>
1553 "il_" .
IL_INST_ID .
"_pg_" . $this->getHeaderPage());
1554 $a_xml_writer->
xmlElement(
"Property", $attrs);
1558 if ($this->getFooterPage() > 0) {
1559 $attrs = array(
"Name" =>
"FooterPage",
"Value" =>
1560 "il_" .
IL_INST_ID .
"_pg_" . $this->getFooterPage());
1561 $a_xml_writer->
xmlElement(
"Property", $attrs);
1565 $attrs = array(
"Name" =>
"LayoutPerPage",
"Value" =>
1566 $this->getLayoutPerPage());
1567 $a_xml_writer->
xmlElement(
"Property", $attrs);
1570 $attrs = array(
"Name" =>
"ProgressIcons",
"Value" =>
1571 $this->getProgressIcons());
1572 $a_xml_writer->
xmlElement(
"Property", $attrs);
1575 $attrs = array(
"Name" =>
"StoreTries",
"Value" =>
1576 $this->getStoreTries());
1577 $a_xml_writer->
xmlElement(
"Property", $attrs);
1580 $attrs = array(
"Name" =>
"RestrictForwardNavigation",
"Value" =>
1581 $this->getRestrictForwardNavigation());
1582 $a_xml_writer->
xmlElement(
"Property", $attrs);
1585 $attrs = array(
"Name" =>
"DisableDefaultFeedback",
"Value" =>
1586 $this->getDisableDefaultFeedback());
1587 $a_xml_writer->
xmlElement(
"Property", $attrs);
1596 $types = array(
"xml",
"html");
1598 foreach ($types as $type) {
1599 $dir = $this->getExportDirectory($type);
1601 if (!is_dir($dir) or
1602 !is_writeable($dir)) {
1612 while ($entry = $cdir->read()) {
1613 if ($entry !=
"." and
1615 substr($entry, -4) ==
".zip" and
1616 preg_match(
"~^[0-9]{10}_{2}[0-9]+_{2}(lm_)*[0-9]+\.zip\$~", $entry)) {
1617 $file[$entry . $type] = array(
"type" => $type,
"file" => $entry,
1618 "size" => filesize($dir .
"/" . $entry));
1635 bool $as_subitem =
false,
1636 string $movecopy =
"move"
1638 if ($source_id === $target_id) {
1642 $lmtree->setTableNames(
'lm_tree',
'lm_data');
1643 $lmtree->setTreeTablePK(
"lm_id");
1646 $source_obj->setLMId($this->
getId());
1648 if (!$first_child) {
1650 $target_obj->setLMId($this->
getId());
1651 $target_parent = $lmtree->getParentId($target_id);
1655 if ($source_obj->getType() ==
"pg") {
1657 if ($lmtree->isInTree($source_obj->getId())) {
1658 $node_data = $lmtree->getNodeData($source_obj->getId());
1661 if ($movecopy ==
"move") {
1662 $parent_id = $lmtree->getParentId($source_obj->getId());
1663 $lmtree->deleteTree($node_data);
1667 $new_page = $source_obj->copy($this->lm);
1668 $source_id = $new_page->getId();
1669 $source_obj = $new_page;
1673 if (!$lmtree->isInTree($source_obj->getId())) {
1676 $parent = $target_id;
1677 } elseif ($as_subitem) {
1678 $parent = $target_id;
1680 $pg_childs = $lmtree->getChildsByType($parent,
"pg");
1681 if (count($pg_childs) != 0) {
1682 $target_pos = $pg_childs[count($pg_childs) - 1][
"obj_id"];
1685 $target_pos = $target_id;
1686 $parent = $target_parent;
1690 $lmtree->insertNode(
1691 $source_obj->getId(),
1701 if ($source_obj->getType() ==
"st") {
1703 $source_node = $lmtree->getNodeData($source_id);
1704 $subnodes = $lmtree->getSubTree($source_node);
1707 foreach ($subnodes as $subnode) {
1708 if ($subnode[
"obj_id"] == $target_id) {
1713 $target_pos = $target_id;
1717 $target_parent = $target_id;
1719 $pg_childs = $lmtree->getChildsByType($target_parent,
"pg");
1720 if (count($pg_childs) != 0) {
1721 $target_pos = $pg_childs[count($pg_childs) - 1][
"obj_id"];
1723 } elseif ($as_subitem) {
1724 $target_parent = $target_id;
1726 $childs = $lmtree->getChilds($target_parent);
1727 if (count($childs) != 0) {
1728 $target_pos = $childs[count($childs) - 1][
"obj_id"];
1733 if ($movecopy ==
"move") {
1734 $lmtree->deleteTree($source_node);
1737 throw new ilException(
"ilObjContentObject: Not implemented");
1741 if (!$lmtree->isInTree($source_id)) {
1742 $lmtree->insertNode($source_id, $target_parent, $target_pos);
1745 foreach ($subnodes as $node) {
1746 if ($node[
"obj_id"] != $source_id) {
1747 $lmtree->insertNode($node[
"obj_id"], $node[
"parent"]);
1767 foreach ($pages as $page) {
1769 $cpage =
new ilLMPage($page[
"obj_id"]);
1771 $error = $cpage->validateDom();
1774 $this->
lng->loadLanguageModule(
"content");
1775 $this->main_tpl->setOnScreenMessage(
'info', $this->
lng->txt(
"cont_import_validation_errors"));
1778 $mess .= $this->
lng->txt(
"obj_pg") .
": " . $title;
1779 $mess .=
'<div class="small">';
1780 foreach ($error as
$e) {
1781 $err_mess = implode(
" - ",
$e);
1782 if (!is_int(strpos($err_mess,
":0:"))) {
1783 $mess .= htmlentities($err_mess) .
"<br />";
1795 public function cloneObject(
int $target_id,
int $copy_id = 0,
bool $omit_tree =
false): ?
ilObject
1798 $new_obj = parent::cloneObject($target_id, $copy_id, $omit_tree);
1799 $this->cloneMetaData($new_obj);
1805 if (!$cp_options->isRootNode($this->getRefId())) {
1806 $new_obj->setOfflineStatus($this->getOfflineStatus());
1810 $new_obj->setDescription($this->getDescription());
1811 $new_obj->setLayoutPerPage($this->getLayoutPerPage());
1812 $new_obj->setLayout($this->getLayout());
1813 $new_obj->setTOCMode($this->getTOCMode());
1814 $new_obj->setActiveLMMenu($this->isActiveLMMenu());
1815 $new_obj->setActiveTOC($this->isActiveTOC());
1816 $new_obj->setActiveNumbering($this->isActiveNumbering());
1817 $new_obj->setActivePrintView($this->isActivePrintView());
1818 $new_obj->setActivePreventGlossaryAppendix($this->isActivePreventGlossaryAppendix());
1819 $new_obj->setPublicNotes($this->publicNotes());
1820 $new_obj->setCleanFrames($this->cleanFrames());
1821 $new_obj->setPageHeader($this->getPageHeader());
1822 $new_obj->setRating($this->hasRating());
1823 $new_obj->setRatingPages($this->hasRatingPages());
1824 $new_obj->setDisableDefaultFeedback($this->getDisableDefaultFeedback());
1825 $new_obj->setProgressIcons($this->getProgressIcons());
1826 $new_obj->setStoreTries($this->getStoreTries());
1827 $new_obj->setRestrictForwardNavigation($this->getRestrictForwardNavigation());
1828 $new_obj->setAutoGlossaries($this->getAutoGlossaries());
1832 $new_obj->createLMTree();
1835 $style = $this->content_style_domain->styleForObjId($this->
getId());
1836 $style->cloneTo($new_obj->getId());
1841 $copied_nodes = $this->copyAllPagesAndChapters($new_obj, $copy_id);
1844 if ($this->getHeaderPage() > 0 && ($new_page_header = ($copied_nodes[$this->getHeaderPage()] ??
null)) > 0) {
1845 $new_obj->setHeaderPage($new_page_header);
1847 if ($this->getFooterPage() > 0 && ($new_page_footer = ($copied_nodes[$this->getFooterPage()] ??
null)) > 0) {
1848 $new_obj->setFooterPage($new_page_footer);
1854 $obj_settings->cloneSettings($new_obj->getId());
1855 unset($obj_settings);
1858 $this->getObjectProperties()->clonePropertyTranslations($new_obj->getId());
1862 $menu->setObjId($this->
getId());
1864 $new_menu->setObjId($new_obj->getId());
1865 foreach ($menu->getMenuEntries() as $entry) {
1873 $new_menu->setTarget($entry[
"link"] ??
"");
1874 $new_menu->setTitle($entry[
"title"] ??
"");
1875 $new_menu->setLinkType($entry[
"type"] ??
"");
1876 $new_menu->setLinkRefId($entry[
"ref_id"] ?? 0);
1877 $new_menu->create();
1889 $parent_id = $a_target_obj->lm_tree->readRootId();
1893 $chapters = $this->lm_tree->getChildsByType($this->lm_tree->readRootId(),
"st");
1894 $copied_nodes = array();
1896 foreach ($chapters as $chap) {
1897 $cid = ilLMObject::pasteTree(
1912 foreach ($pages as $p) {
1913 if (!$this->lm_tree->isInTree($p[
"obj_id"])) {
1915 $target_item = $item->copy($a_target_obj);
1916 $copied_nodes[$item->getId()] = $target_item->getId();
1922 foreach ($copied_nodes as $old_id => $new_id) {
1923 $options->appendMapping(
1924 $this->getRefId() .
'_' . $old_id,
1925 $a_target_obj->
getRefId() .
'_' . $new_id
1933 return $copied_nodes;
1944 $set =
$ilDB->query(
1945 "SELECT * FROM lm_glossaries " .
1946 " WHERE lm_id = " .
$ilDB->quote($a_lm_id,
"integer")
1949 while ($rec =
$ilDB->fetchAssoc($set)) {
1950 $glos[] = $rec[
"glo_id"];
1965 $found_pages = array();
1966 foreach ($pages as $p) {
1968 $c = $pg->getXMLContent();
1969 foreach ($terms as $t) {
1970 if (is_int(stripos(
$c, $t[
"term"]))) {
1971 $found_pages[$p[
"id"]][
"terms"][] = $t;
1972 if (!is_object($found_pages[$p[
"id"]][
"page"] ??
null)) {
1973 $found_pages[$p[
"id"]][
"page"] = $pg;
1981 foreach ($found_pages as
$id => $fp) {
1997 bool $a_as_obj_id =
false
1999 if (!$a_as_obj_id && $a_id > 0 && $a_id === (
int) OH_REF_ID) {
2010 $this->rating = $a_value;
2015 return $this->rating;
2020 $this->rating_pages = $a_value;
2025 return $this->rating_pages;
2032 switch ($a_element) {
2036 $obj_lp->getCurrentMode(),
2045 $ot = $this->getObjectProperties()->getPropertyTranslations();
2046 if (!$ot->getContentTranslationActivated()) {
2050 $paths = $this->lom_services->paths();
2051 $reader = $this->lom_services->read(
2055 $paths->custom()->withNextStep(
'general')->get()
2058 $this->getObjectProperties()->storePropertyTranslations(
2059 $ot->withDefaultTitle($reader->firstData($paths->title())->value())
2060 ->withDefaultDescription($reader->firstData($paths->firstDescription())->value())
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
static _getPersistedConditionsOfTarget(int $a_target_ref_id, int $a_target_obj_id, string $a_target_type="")
get all persisted conditions of target object
static _checkCondition(array $condition, int $a_usr_id=0)
checks wether a single condition is fulfilled every trigger object type must implement a static metho...
static _checkAllConditionsOfTarget(int $a_target_ref_id, int $a_target_id, string $a_target_type="", int $a_usr_id=0)
checks wether all conditions of a target object are fulfilled
static _getInstance(int $a_copy_id)
Base class for ILIAS Exception handling.
static makeDirParents(string $a_dir)
Create a new directory and all parent directories.
static makeDir(string $a_dir)
creates a new directory and inherits all filesystem permissions of the parent directory You may pass ...
static delDir(string $a_dir, bool $a_clean_only=false)
removes a dir and all its content (subdirs and files) recursively
static getDataDir()
get data directory (outside webspace)
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 _lookupTitle(int $a_obj_id)
static updateInternalLinks(array $a_copied_nodes, string $a_parent_type="lm")
Update internal links, after multiple pages have been copied.
static putInTree(ilLMObject $a_obj, int $a_parent_id=0, int $a_target_node_id=0)
put this object into content object tree
static _deleteAllObjectData(ilObjLearningModule $a_cobj)
delete all objects of content object (digi book / learning module)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static getPageList(int $lm_id)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
const LP_MODE_COLLECTION_TLT
static _refreshStatus(int $a_obj_id, ?array $a_users=null)
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...
write(string $a_msg, $a_log_level=null)
logging
static getLogger(string $a_component_id)
Get component logger.
static isInfoEnabled(int $obj_id)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static _getMissingPreconditionsTopChapter(int $cont_obj_ref_id, int $cont_obj_id, int $page_id)
get top chapter of page for that any precondition is missing
array $public_export_file
static writeFooterPage(int $a_lm_id, int $a_page_id)
ILIAS Notes Service $notes
exportFileItems(string $a_target_dir, ilLog $expLog)
setRestrictForwardNavigation(bool $a_val)
LOMServices $lom_services
doMDUpdateListener(string $a_element)
createProperties()
create new properties record
static _lookupStoreTries(int $a_id)
static _getNrOfAssignedLMs(int $a_style_id)
gets the number of learning modules assigned to a content style
static _getNrLMsIndividualStyles()
get number of learning modules with individual styles
static getAvailableLayouts()
get all available lm layouts
setCleanFrames(bool $a_clean)
getRestrictForwardNavigation()
static writeHeaderPage(int $a_lm_id, int $a_page_id)
copyAllPagesAndChapters(ilObjLearningModule $a_target_obj, int $a_copy_id=0)
getHideHeaderFooterPrint()
setForTranslation(bool $a_val)
Set for translation (lm has been imported for translation purposes)
setHideHeaderFooterPrint(bool $a_val)
Set hide header footer in print mode.
getTOCMode()
get toc mode ("chapters" | "pages")
setDisableDefaultFeedback(bool $a_val)
Set disable default feedback for questions.
setActiveLMMenu(bool $a_act_lm_menu)
createImportDirectory()
creates data directory for import files (data_dir/lm_data/lm_<id>/import, depending on data directory...
isActivePreventGlossaryAppendix()
static _getNrLMsNoStyle()
get number of learning modules assigned no style
setProgressIcons(bool $a_val)
bool $disable_def_feedback
static _checkPreconditionsOfPage(int $cont_ref_id, int $cont_obj_id, int $page_id)
checks whether the preconditions of a page are fulfilled or not
executeDragDrop(int $source_id, int $target_id, bool $first_child, bool $as_subitem=false, string $movecopy="move")
static _moveLMStyles(int $a_from_style, int $a_to_style)
move learning modules from one style to another
removeAutoGlossary(int $a_glo_id)
getExportDirectory(string $a_type="xml")
setPublicNotes(bool $a_pub_notes)
bool $prevent_glossary_appendix_active
exportXML(ilXmlWriter $a_xml_writer, int $a_inst, string $a_target_dir, ilLog $expLog)
static _deleteStyleAssignments(int $a_style_id)
delete all style references to style
setLayoutPerPage(bool $a_val)
getPageHeader()
get page header mode (ilLMOBject::CHAPTER_TITLE | ilLMOBject::PAGE_TITLE | ilLMOBject::NO_HEADER)
setAutoGlossaries(array $a_val)
create(bool $a_no_meta_data=false)
create content object
static _lookup(int $a_obj_id, string $a_field)
checkStructure()
Check tree (this has been copied from fixTree due to a bug fixing, should be reorganised)
setActiveTOC(bool $a_toc)
setActivePrintView(bool $a_print)
exportXMLProperties(ilXmlWriter $a_xml_writer, ilLog $expLog)
validatePages()
Validate all pages.
static _lookupStyleSheetId(int $a_cont_obj_id)
exportXMLPageObjects(ilXmlWriter $a_xml_writer, int $a_inst, ilLog $expLog)
setActiveNumbering(bool $a_num)
static lookupAutoGlossaries(int $a_lm_id)
setTOCMode(string $a_toc_mode="chapters")
set toc mode
setActivePreventGlossaryAppendix(bool $a_print)
static hasSuccessorPage(int $a_cont_obj_id, int $a_page_id)
checks if page has a successor page
exportXMLMediaObjects(ilXmlWriter $a_xml_writer, int $a_inst, string $a_target_dir, ilLog $expLog)
ILIAS Style Content DomainService $content_style_domain
setPageHeader(string $a_pg_header=ilLMObject::CHAPTER_TITLE)
set page header mode
bool $hide_header_footer_print
createExportDirectory(string $a_type="xml")
creates data directory for export files (data_dir/lm_data/lm_<id>/export, depending on data directory...
static _lookupContObjIdByStyleId(int $a_style_id)
ilGlobalTemplateInterface $main_tpl
autoLinkGlossaryTerms(int $a_glo_ref_id)
setRatingPages(bool $a_value)
static _lookupDisableDefaultFeedback(int $a_id)
setImportDirectory(string $a_import_dir)
setStoreTries(bool $a_val)
static isOnlineHelpModule(int $a_id, bool $a_as_obj_id=false)
Is module an online module.
static _lookupRestrictForwardNavigation(int $a_obj_id)
exportXMLMetaData(ilXmlWriter $a_xml_writer)
setLayout(string $a_layout)
static _getMissingPreconditionsOfPage(int $cont_ref_id, int $cont_obj_id, int $page_id)
gets all missing preconditions of page
getDisableDefaultFeedback()
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)
Class ilObject Basic functions for all objects.
static _lookupType(int $id, bool $reference=false)
create()
note: title, description and type should be set when this function is called
static _lookupObjId(int $ref_id)
static autoLinkGlossariesPage(ilPageObject $a_page, array $a_terms)
Auto link glossary of whole page.
static getAllPages(string $a_parent_type, int $a_parent_id, string $a_lang="-")
Get all pages for parent object.
static _exists(string $a_parent_type, int $a_id, string $a_lang="", bool $a_no_cache=false)
Checks whether page exists.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Tree class data representation in hierachical trees using the Nested Set Model with Gaps by Joe Celco...
isInTree(?int $a_node_id)
get all information of a node.
getPathFull(int $a_endnode_id, int $a_startnode_id=0)
get path from a given startnode to a given endnode if startnode is not given the rootnode is startnod...
setTreeTablePK(string $a_column_name)
set column containing primary key in tree table
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...
static yn2tf(string $a_yn)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
xmlElement(string $tag, $attrs=null, $data=null, $encode=true, $escape=true)
Writes a basic element (no children, just textual content)
xmlEndTag(string $tag)
Writes an endtag.
xmlStartTag(string $tag, ?array $attrs=null, bool $empty=false, bool $encode=true, bool $escape=true)
Writes a starttag.
return['delivery_method'=> 'php',]
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
if(!file_exists('../ilias.ini.php'))