38 public function delete(
bool $a_delete_meta_data =
true):
void 43 $node_data = $this->tree->getNodeData($this->
getId());
44 $this->
delete_rec($this->tree, $a_delete_meta_data);
45 $this->tree->deleteTree($node_data);
53 bool $a_delete_meta_data =
true 56 foreach ($childs as $child) {
58 if (is_object($obj)) {
59 if ($obj->getType() ==
"st") {
60 $obj->delete_rec($a_tree, $a_delete_meta_data);
62 if ($obj->getType() ==
"pg") {
63 $obj->delete($a_delete_meta_data);
68 parent::delete($a_delete_meta_data);
80 $chap->setImportId(
"il__st_" . $this->
getId());
82 $chap->setLMId($a_target_lm->
getId());
83 $chap->setType($this->
getType());
86 $a_copied_nodes[$this->
getId()] = $chap->getId();
90 $new_md = $md->cloneMD($a_target_lm->
getId(), $chap->getId(), $this->
getType());
104 $expLog->
write(date(
"[y-m-d H:i:s] ") .
"Structure Object " . $this->
getId());
106 $a_xml_writer->
xmlStartTag(
"StructureObject", $attrs);
117 $a_xml_writer->
xmlEndTag(
"StructureObject");
124 $md2xml->setExportMode(
true);
125 $md2xml->startExport();
126 $a_xml_writer->
appendXML($md2xml->getXML());
134 if ($a_tag ==
"Identifier" && $a_param ==
"Entry") {
143 string $a_mode = self::CHAPTER_TITLE,
144 bool $a_include_numbers =
false,
145 bool $a_time_scheduled_activation =
false,
146 bool $a_force_content =
false,
148 string $a_lang =
"-",
149 bool $a_include_short =
false 153 $ilDB = $DIC->database();
165 if ($a_include_short) {
174 $languages = $ot->getLanguages();
176 if ($a_lang !=
"-" && $ot->getContentActivated()) {
179 if ($a_include_short) {
180 $trans_title = trim($lmobjtrans->getShortTitle());
182 if ($trans_title ==
"") {
183 $trans_title = $lmobjtrans->getTitle();
185 if ($trans_title ==
"") {
187 $trans_title = $lmobjtrans->
getTitle();
189 if ($trans_title !=
"") {
197 if ($a_include_numbers) {
203 $query =
"SELECT * FROM lm_tree WHERE child = " .
204 $ilDB->quote($a_st_id,
"integer") .
" AND lm_id = " .
205 $ilDB->quote($a_lm_id,
"integer");
208 $depth = $tree_node[
"depth"];
211 for (
$i = $depth - 1;
$i > 1;
$i--) {
213 $query =
"SELECT * FROM lm_tree WHERE child = " .
214 $ilDB->quote($tree_node[
"parent"],
"integer") .
" AND lm_id = " .
215 $ilDB->quote($a_lm_id,
"integer");
220 $nr = $seq .
"." . $nr;
232 $childs = $this->tree->getChilds($this->
getId());
233 foreach ($childs as $child) {
234 if ($child[
"type"] !=
"pg") {
248 $childs = $this->tree->getChilds($this->
getId());
249 foreach ($childs as $child) {
250 if ($child[
"type"] !=
"st") {
259 $structure_obj->exportXML($a_xml_writer, $a_inst, $expLog);
260 unset($structure_obj);
270 $attrs[
"font-family"] =
"Times";
271 $attrs[
"font-size"] =
"14pt";
281 $childs = $this->tree->getChilds($this->
getId());
282 foreach ($childs as $child) {
283 if ($child[
"type"] !=
"pg") {
289 $page_obj->exportFO($a_xml_writer);
301 foreach ($childs as $child) {
302 if ($child[
"type"] ==
"st") {
303 $chapters[] = $child;
modifyExportIdentifier(string $a_tag, string $a_param, string $a_value)
static _getPresentationTitle(int $a_st_id, string $a_mode=self::CHAPTER_TITLE, bool $a_include_numbers=false, bool $a_time_scheduled_activation=false, bool $a_force_content=false, int $a_lm_id=0, string $a_lang="-", bool $a_include_short=false)
static _exportXMLAlias(ilXmlWriter $a_xml_writer, int $a_id, int $a_inst=0)
export page alias to xml
getNodeData(int $a_node_id, ?int $a_tree_pk=null)
get all information of a node.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
exportXMLPageObjects(ilXmlWriter $a_xml_writer, int $a_inst=0)
exportXML(ilXmlWriter $a_xml_writer, int $a_inst, ilLog $expLog)
getChilds(int $a_node_id, string $a_order="", string $a_direction="ASC")
get child nodes of given node
copy(ilObjLearningModule $a_target_lm)
copy chapter
static getInstance(ilObjLearningModule $a_content_obj, int $a_id=0, bool $a_halt=true)
exportXMLStructureObjects(ilXmlWriter $a_xml_writer, int $a_inst, ilLog $expLog)
isInTree(?int $a_node_id)
get all information of a node.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
exportFO(ilXmlWriter $a_xml_writer)
static _lookupShortTitle(int $a_obj_id)
appendXML(string $a_str)
append xml string to document
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static getInstance(int $a_tree_id)
xmlEndTag(string $tag)
Writes an endtag.
static _lookupTitle(int $a_obj_id)
static getChapterList(int $a_lm_id)
delete_rec(ilLMTree $a_tree, bool $a_delete_meta_data=true)
Delete sub tree.
static copy(string $a_source_id, string $a_target_id)
Copy all translations of an object.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static getInstance(int $obj_id)
exportFOPageObjects(ilXmlWriter $a_xml_writer)
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...
__construct(Container $dic, ilPlugin $plugin)
exportXMLMetaData(ilXmlWriter $a_xml_writer)
static removeScreenIdsOfChapter(int $a_chap, int $a_module_id=0)
static _lookupContObjID(int $a_id)
get learning module id for lm object
xmlStartTag(string $tag, ?array $attrs=null, bool $empty=false, bool $encode=true, bool $escape=true)
Writes a starttag.
xmlElement(string $tag, $attrs=null, $data=null, $encode=true, $escape=true)
Writes a basic element (no children, just textual content)
write(string $a_msg, $a_log_level=null)
logging
getChildSequenceNumber(array $a_node, string $type="")
get sequence number of node in sibling sequence
getSubTree(array $a_node, bool $a_with_data=true, array $a_type=[])
get all nodes in the subtree under specified node
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...
__construct(ilObjLearningModule $a_content_obj, int $a_id=0)