function ilMDXMLCopier($content, $a_rbac_id, $a_obj_id, $a_obj_type) { $this->setMDObject(new ilMD($a_rbac_id, $a_obj_id, $a_obj_type)); parent::ilMDSaxParser(); $this->setXMLContent($content); // set filter of tags which are handled in this class $this->__setFilter(); }
function ilMDXMLParser($content, $a_obj_id, $a_rbac_id, $a_type) { $this->setMDObject(new ilMD($a_obj_id, $a_rbac_id, $a_type)); // Wenn content eine XML-Datei ist: #parent::ilMDSaxParser($content); // Ist content ein xml-String: parent::ilMDSaxParser(); $this->setXMLContent($content); }
/** * Constructor * * @param object $a_content_object must be of type ilObjContentObject * ilObjTest or ilObjQuestionPool * @param string $a_xml_file xml file * @param string $a_subdir subdirectory in import directory * @access public */ function ilCourseXMLParser($a_course_obj, $a_xml_file = '') { global $lng, $ilLog; parent::ilMDSaxParser($a_xml_file); $this->sax_controller = new ilSaxController(); $this->log =& $ilLog; $this->course_obj = $a_course_obj; $this->course_members = ilCourseParticipants::_getInstanceByObjId($this->course_obj->getId()); $this->course_waiting_list = new ilCourseWaitingList($this->course_obj->getId()); // flip the array so we can use array_key_exists $this->course_members_array = array_flip($this->course_members->getParticipants()); $this->md_obj = new ilMD($this->course_obj->getId(), 0, 'crs'); $this->setMDObject($this->md_obj); $this->lng =& $lng; }
/** * Constructor * * @param object $a_content_object must be of type ilObjContentObject * ilObjTest or ilObjQuestionPool * @param string $a_xml_file xml file * @param string $a_subdir subdirectory in import directory * @access public */ function ilContObjParser(&$a_content_object, $a_xml_file, $a_subdir) { global $lng, $tree; parent::ilMDSaxParser($a_xml_file); $this->cnt = array(); $this->current_element = array(); $this->structure_objects = array(); $this->content_object =& $a_content_object; //$this->lm_id = $a_lm_id; $this->st_into_tree = array(); $this->pg_into_tree = array(); $this->pages_to_parse = array(); $this->mobs_with_int_links = array(); $this->mob_mapping = array(); $this->file_item_mapping = array(); $this->pg_mapping = array(); $this->link_targets = array(); $this->subdir = $a_subdir; $this->lng =& $lng; $this->tree =& $tree; $this->inside_code = false; $this->qst_mapping = array(); $this->coType = $this->content_object->getType(); $this->metadata_parsing_disabled = false; if ($this->coType != "tst" and $this->coType != "qpl") { $this->lm_tree = new ilTree($this->content_object->getId()); $this->lm_tree->setTreeTablePK("lm_id"); $this->lm_tree->setTableNames('lm_tree', 'lm_data'); } //$this->lm_tree->addTree($a_lm_id, 1); happens in ilObjLearningModuleGUI }