4include_once(
"./Services/COPage/classes/class.ilPageObject.php");
49 $this->scormlmid = $a_scormlmid;
59 return $this->scormlmid;
69 $this->glossary_id = $a_val;
101 include_once(
"./Services/COPage/Layout/classes/class.ilPageLayout.php");
106 parent::setXMLContent($layout_obj->getXMLContent());
117 public function update($a_validate =
true, $a_no_history =
false)
123 parent::update($a_validate, $a_no_history);
147 public function delete()
167 public function exportXML(&$a_xml_writer, $a_mode =
"normal", $a_inst = 0)
170 $a_xml_writer->xmlStartTag(
"PageObject", $attrs);
183 $attrs[
"OriginId"] =
"il_" . $a_inst .
184 "_pg_" . $this->
getId();
185 $a_xml_writer->xmlElement(
"PageAlias", $attrs);
189 $a_xml_writer->xmlEndTag(
"PageObject");
219 include_once(
"Services/MetaData/classes/class.ilMD2XML.php");
221 $md2xml->setExportMode(
true);
222 $md2xml->startExport();
223 $a_xml_writer->appendXML($md2xml->getXML());
253 include_once(
"./Services/COPage/classes/class.ilPCFileList.php");
256 $xml = str_replace(
"&",
"&",
$xml);
257 $a_xml_writer->appendXML(
$xml);
300 $path =
"//IntLink[@Type='GlossaryItem']";
302 for (
$i = 0;
$i < count(
$res->nodeset);
$i++) {
303 $target =
$res->nodeset[
$i]->get_attribute(
"Target");
305 $tarr = explode(
"_", $target);
306 $term_id = $tarr[count($tarr) - 1];
307 if (is_int(strpos($target,
"__")) && $term_id > 0) {
312 $res->nodeset[
$i]->set_attribute(
"Target",
"il__git_" . $new_id);
331 $xpath =
new DOMXPath($this->
getDomDoc());
332 $nodes = $xpath->query(
'//Paragraph//IntLink');
334 foreach ($nodes as
$node) {
335 if (in_array(
$node->getAttribute(
"Type"), array(
"File",
"GlossaryItem"))) {
339 $parent =
$node->parentNode;
341 foreach (
$node->childNodes as
$c) {
344 foreach ($childs as
$c) {
346 $parent->insertBefore(
$c,
$node);
349 foreach ($to_del as
$n) {
An exception for terminatinating execution or to throw for unit testing.
static _lookGlossaryID($term_id)
get glossary id form term id
static _copyTerm($a_term_id, $a_glossary_id)
Copy a term to a glossary.
static collectFileItems($a_page, $a_domdoc)
Get all file items that are used within the page.
Class ilPageObject Handles PageObjects of ILIAS Learning Modules (see ILIAS DTD)
getPageConfig()
Get page config object.
insertInstIntoIDs($a_inst, $a_res_ref_to_obj_id=true)
inserts installation id into ids (e.g.
getXMLFromDom( $a_incl_head=false, $a_append_mobs=false, $a_append_bib=false, $a_append_str="", $a_omit_pageobject_tag=false, $style_id=0)
get xml content of page from dom (use this, if any changes are made to the document)
getContentObject($a_hier_id, $a_pc_id="")
Get a content object of the page.
collectMediaObjects($a_inline_only=true)
get all media objects, that are referenced and used within the page
getDomDoc()
Get dom doc (php5 dom document)
create()
Create new scorm 2004.
getParentType()
Get parent type.
getGlossaryId()
Get glossary id.
getFileItemIds()
get ids of all file items within the page
exportXMLMetaData(&$a_xml_writer)
export page alias to xml
createWithLayoutId($a_layout_id)
Create new scorm 2004 with page-layout.
getMediaObjectIds()
get ids of all media objects within the page
removeInvalidLinks()
Remove invalid links.
setScormLmId($a_scormlmid)
Set Scorm LM ID.
exportXML(&$a_xml_writer, $a_mode="normal", $a_inst=0)
export page object to xml (see ilias_co.dtd)
exportXMLPageContent(&$a_xml_writer, $a_inst=0)
export page objects meta data to xml (see ilias_co.dtd)
performAutomaticModifications()
Perform automatic modifications (may be overwritten by sub classes)
setGlossaryId($a_val)
Set glossary id.
afterConstructor()
After constructor.
getScormLmId()
Get Scorm LM ID.
update($a_validate=true, $a_no_history=false)
update object data
xpath_eval($xpath_context, $eval_str, $contextnode=null)
xpath_new_context($dom_document)
foreach($_POST as $key=> $value) $res