/** * copy chapter */ function copy($a_target_lm) { $chap = new ilStructureObject($a_target_lm); $chap->setTitle($this->getTitle()); if ($this->getLMId() != $a_target_lm->getId()) { $chap->setImportId("il__st_" . $this->getId()); } $chap->setLMId($a_target_lm->getId()); $chap->setType($this->getType()); $chap->setDescription($this->getDescription()); $chap->create(true); $a_copied_nodes[$this->getId()] = $chap->getId(); // copy meta data include_once "Services/MetaData/classes/class.ilMD.php"; $md = new ilMD($this->getLMId(), $this->getId(), $this->getType()); $new_md =& $md->cloneMD($a_target_lm->getId(), $chap->getId(), $this->getType()); return $chap; }