43 $this->help_map = $DIC->help()->internal()->domain()->map();
44 $this->lom_services = $DIC->learningObjectMetadata();
47 public function delete(
bool $a_delete_meta_data =
true):
void 50 $this->help_map->removeScreenIdsOfChapter($this->
getId());
52 $node_data = $this->tree->getNodeData($this->
getId());
53 $this->
delete_rec($this->tree, $a_delete_meta_data);
54 $this->tree->deleteTree($node_data);
62 bool $a_delete_meta_data =
true 65 foreach ($childs as $child) {
67 if (is_object($obj)) {
68 if ($obj->getType() ==
"st") {
69 $obj->delete_rec($a_tree, $a_delete_meta_data);
71 if ($obj->getType() ==
"pg") {
72 $obj->delete($a_delete_meta_data);
77 parent::delete($a_delete_meta_data);
89 $chap->setImportId(
"il__st_" . $this->
getId());
91 $chap->setLMId($a_target_lm->
getId());
92 $chap->setType($this->
getType());
95 $a_copied_nodes[$this->
getId()] = $chap->getId();
98 $this->lom_services->derive()
100 ->forObject($a_target_lm->
getId(), $chap->getId(), $this->
getType());
114 $expLog->
write(date(
"[y-m-d H:i:s] ") .
"Structure Object " . $this->
getId());
116 $a_xml_writer->
xmlStartTag(
"StructureObject", $attrs);
127 $a_xml_writer->
xmlEndTag(
"StructureObject");
151 if ($a_tag ==
"Identifier" && $a_param ==
"Entry") {
160 string $a_mode = self::CHAPTER_TITLE,
161 bool $a_include_numbers =
false,
162 bool $a_time_scheduled_activation =
false,
163 bool $a_force_content =
false,
165 string $a_lang =
"-",
166 bool $a_include_short =
false 170 $ilDB = $DIC->database();
182 if ($a_include_short) {
189 $ot = (
new TranslationsRepository(
$ilDB))->getFor($a_lm_id);
191 if ($a_lang !=
"-" && $ot->getContentTranslationActivated()) {
194 if ($a_include_short) {
195 $trans_title = trim($lmobjtrans->getShortTitle());
197 if ($trans_title ==
"") {
198 $trans_title = $lmobjtrans->getTitle();
200 if ($trans_title ==
"") {
202 $trans_title = $lmobjtrans->
getTitle();
204 if ($trans_title !=
"") {
212 if ($a_include_numbers) {
218 $query =
"SELECT * FROM lm_tree WHERE child = " .
219 $ilDB->quote($a_st_id,
"integer") .
" AND lm_id = " .
220 $ilDB->quote($a_lm_id,
"integer");
221 $tree_set =
$ilDB->query($query);
223 $depth = $tree_node[
"depth"];
226 for ($i = $depth - 1; $i > 1; $i--) {
228 $query =
"SELECT * FROM lm_tree WHERE child = " .
229 $ilDB->quote($tree_node[
"parent"],
"integer") .
" AND lm_id = " .
230 $ilDB->quote($a_lm_id,
"integer");
231 $tree_set =
$ilDB->query($query);
235 $nr = $seq .
"." . $nr;
247 $childs = $this->tree->getChilds($this->
getId());
248 foreach ($childs as $child) {
249 if ($child[
"type"] !=
"pg") {
263 $childs = $this->tree->getChilds($this->
getId());
264 foreach ($childs as $child) {
265 if ($child[
"type"] !=
"st") {
274 $structure_obj->exportXML($a_xml_writer, $a_inst, $expLog);
275 unset($structure_obj);
288 foreach ($childs as $child) {
289 if ($child[
"type"] ==
"st") {
290 $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.
static _lookupShortTitle(int $a_obj_id)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
LOMServices $lom_services
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...
ILIAS Help Map MapManager $help_map
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 _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.
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...
__construct(ilObjLearningModule $a_content_obj, int $a_id=0)