5 require_once(
"./Modules/Scorm2004/classes/class.ilSCORM2004Node.php");
27 parent::__construct($a_slm_object, $a_id);
34 public function delete($a_delete_meta_data =
true)
36 $node_data = $this->tree->getNodeData($this->
getId());
38 $this->tree->deleteTree($node_data);
39 parent::deleteSeqInfo();
47 $childs = $this->tree->getChilds($this->
getId());
48 foreach ($childs as $child) {
50 if (is_object($obj)) {
51 if ($obj->getType() ==
"chap") {
52 $obj->delete_rec($a_delete_meta_data);
54 if ($obj->getType() ==
"sco") {
55 $obj->delete($a_delete_meta_data);
60 parent::delete($a_delete_meta_data);
66 public function create($a_upload =
false, $a_template =
false)
68 include_once(
"./Modules/Scorm2004/classes/seq_editor/class.ilSCORM2004Item.php");
69 include_once(
"./Modules/Scorm2004/classes/seq_editor/class.ilSCORM2004Objective.php");
70 parent::create($a_upload);
85 $seq_item->setDefaultXml(
true);
92 public function copy($a_target_slm)
96 if ($this->
getSLMId() != $a_target_slm->getId()) {
97 $chap->setImportId(
"il__chap_" . $this->
getId());
99 $chap->setSLMId($a_target_slm->getId());
100 $chap->setType($this->
getType());
103 $a_copied_nodes[$this->
getId()] = $chap->getId();
106 include_once(
"Services/MetaData/classes/class.ilMD.php");
108 $new_md = $md->cloneMD($a_target_slm->getId(), $chap->getId(), $this->
getType());
119 public function exportXML(&$a_xml_writer, $a_inst, &$expLog)
133 include_once(
"Services/MetaData/classes/class.ilMD2XML.php");
135 $md2xml->setExportMode(
true);
136 $md2xml->startExport();
137 $a_xml_writer->appendXML($md2xml->getXML());
Class ilSCORM2004Condition.
delete_rec($a_delete_meta_data=true)
Delete data records of chapter (and nested objects)
insertDefaultSequencingItem()
Insert default sequencing item.
Class ilSCORM2004Chapter.
exportXML(&$a_xml_writer, $a_inst, &$expLog)
Export object to xml (see ilias_co.dtd)
create($a_upload=false, $a_template=false)
Create asset.
getSLMId()
Get ID of parent Scorm Learning Module Object.
static getInstance($a_slm_object, $a_id=0, $a_halt=true)
__construct($a_slm_object, $a_id=0)
Constructor public.
getDescription()
Get description.
exportXMLMetaData(&$a_xml_writer)
export structure objects meta data to xml (see ilias_co.dtd)
copy($a_target_slm)
Copy chapter.
setType($a_type)
Set type.