/** * This is executed when we reach the closing </MOD> tag of our 'referentiel' path */ public function on_referentiel_end() { // finish writing referentiel.xml $this->xmlwriter->end_tag('referentiel'); $this->xmlwriter->end_tag('activity'); $this->close_xml_writer(); /* // write inforef.xml $this->open_xml_writer("activities/referentiel_{$this->moduleid}/inforef.xml"); $this->xmlwriter->begin_tag('inforef'); $this->xmlwriter->begin_tag('fileref'); foreach ($this->fileman->get_fileids() as $fileid) { $this->write_xml('file', array('id' => $fileid)); } $this->xmlwriter->end_tag('fileref'); $this->xmlwriter->end_tag('inforef'); $this->close_xml_writer(); */ // write inforef.xml $this->inforefman->add_refs('file', $this->fileman->get_fileids()); $this->open_xml_writer("activities/referentiel_{$this->moduleid}/inforef.xml"); $this->inforefman->write_refs($this->xmlwriter); $this->close_xml_writer(); // get ready for the next instance $this->cminfo = null; $this->moduleid = null; }
/** * This is executed when the parser reaches </MOD> */ public function on_workshop_end() { // close workshop.xml $this->xmlwriter->end_tag('workshop'); $this->xmlwriter->end_tag('activity'); $this->close_xml_writer(); // write inforef.xml $this->inforefman->add_refs('file', $this->fileman->get_fileids()); $moduleid = $this->currentcminfo['id']; $this->open_xml_writer("activities/workshop_{$moduleid}/inforef.xml"); $this->inforefman->write_refs($this->xmlwriter); $this->close_xml_writer(); // get ready for the next instance $this->currentworkshop = null; $this->currentcminfo = null; $this->newelementids = array(); }