/** * Copy chapter */ function copy($a_target_slm) { $chap = new ilSCORM2004Chapter($a_target_slm); $chap->setTitle($this->getTitle()); if ($this->getSLMId() != $a_target_slm->getId()) { $chap->setImportId("il__chap_" . $this->getId()); } $chap->setSLMId($a_target_slm->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->getSLMId(), $this->getId(), $this->getType()); $new_md =& $md->cloneMD($a_target_slm->getId(), $chap->getId(), $this->getType()); return $chap; }