4 require_once(
"./Modules/Scorm2004/classes/class.ilSCORM2004Node.php");
5 require_once(
"./Modules/Scorm2004/classes/class.ilSCORM2004Page.php");
38 parent::__construct($a_slm_object, $a_id);
42 $this->mobs_contained =
array();
43 $this->files_contained =
array();
55 if (is_object($this->page_object)) {
56 unset($this->page_object);
75 public function create($a_upload =
false, $a_layout_id = 0)
77 parent::create($a_upload);
80 include_once(
"./Modules/Scorm2004/classes/class.ilSCORM2004Page.php");
81 if (!is_object($this->page_object)) {
85 $this->page_object->setParentId($this->
getSLMId());
86 if ($a_layout_id == 0) {
87 $this->page_object->create($a_upload);
89 $this->page_object->createWithLayoutId($a_layout_id);
98 public function delete($a_delete_meta_data =
true)
100 parent::delete($a_delete_meta_data);
101 $this->page_object->delete();
108 public function copy($a_target_slm)
112 $slm_page->setTitle($this->
getTitle());
113 $slm_page->setSLMId($a_target_slm->getId());
114 $slm_page->setType($this->
getType());
116 $slm_page->setImportId(
"il__page_" . $this->
getId());
117 $slm_page->create(
true);
120 include_once(
"Services/MetaData/classes/class.ilMD.php");
122 $new_md = $md->cloneMD($a_target_slm->getId(), $slm_page->getId(), $this->
getType());
125 $page = $slm_page->getPageObject();
127 $clone_mobs = ($this->
getSLMId() == $a_target_slm->getId())
131 $this->page_object->copy($page->getId(), $page->getParentType(), $page->getParentId(), $clone_mobs);
147 $slm_page->setTitle($a_lm_page->getTitle());
148 $slm_page->setSLMId($a_target_slm->getId());
149 $slm_page->setType(
"page");
150 $slm_page->create(
true);
153 include_once(
"Services/MetaData/classes/class.ilMD.php");
154 $md =
new ilMD($a_lm_page->getLMId(), $a_lm_page->getId(), $a_lm_page->getType());
155 $md->
cloneMD($a_target_slm->getId(), $slm_page->getId(),
"page");
158 $page = $slm_page->getPageObject();
160 $a_lm_page->getPageObject()->copy($page->getId(), $page->getParentType(), $page->getParentId(), $clone_mobs);
207 $this->page_object = $a_page_obj;
247 $this->is_alias = $a_is_alias;
252 return $this->is_alias;
258 return $this->origin_id = $a_id;
264 return $this->origin_id;
274 return $this->mobs_contained;
284 return $this->files_contained;
& cloneMD($a_rbac_id, $a_obj_id, $a_obj_type)
Class ilSCORM2004PageNode.
getMediaObjectIds()
get ids of all media objects within the page
setAlias($a_is_alias)
Set wether page object is an alias.
& getPageObject()
Get assigned page object.
static copyPageFromLM($a_target_slm, $a_lm_page)
Copy page from learning module.
copy($a_target_slm)
copy page node
read()
Read data from database.
getSLMId()
Get ID of parent Scorm Learning Module Object.
create($a_upload=false, $a_layout_id=0)
Create Scorm Page.
getDescription()
Get description.
Create styles array
The data for the language used.
__construct($a_slm_object, $a_id=0)
Constructor public.
setType($a_type)
Set type.
getFileItemIds()
get ids of all file items within the page
& copyToOtherContObject(&$a_cont_obj)
copy a page to another content object (learning module / dlib book)
assignPageObject(&$a_page_obj)
Assign page object.