/** * Clone container settings * * @access public * @param int target ref_id * @param int copy id * @return object new object */ public function cloneObject($a_target_id, $a_copy_id = 0) { $new_obj = parent::cloneObject($a_target_id, $a_copy_id); include_once './Services/Container/classes/class.ilContainerSortingSettings.php'; $sorting = new ilContainerSortingSettings($new_obj->getId()); $sorting->setSortMode($this->getOrderType()); $sorting->update(); // copy content page include_once "./Services/COPage/classes/class.ilPageObject.php"; if (ilPageObject::_exists($this->getType(), $this->getId())) { $orig_page = new ilPageObject($this->getType(), $this->getId()); $new_page_object = new ilPageObject($this->getType()); $new_page_object->setParentId($new_obj->getId()); $new_page_object->setId($new_obj->getId()); $new_page_object->createFromXML(); $new_page_object->setXMLContent($orig_page->getXMLContent()); $new_page_object->buildDom(); $new_page_object->update(); } return $new_obj; }
function getPageOfQuestion() { include_once "./Services/COPage/classes/class.ilPageObject.php"; $page = new ilPageObject("qpl", $this->id); return $page->getXMLContent(); }