function updateMetaData() { global $ilUser; include_once "./Services/MetaData/classes/class.ilMD.php"; $md =& new ilMD($this->getId(), 0, $this->getType()); $md_gen =& $md->getGeneral(); if ($md_gen == false) { include_once "./Services/MetaData/classes/class.ilMDCreator.php"; $md_creator = new ilMDCreator($this->getId(), 0, $this->getType()); $md_creator->setTitle($this->getTitle()); $md_creator->setTitleLanguage($ilUser->getPref('language')); $md_creator->create(); } parent::updateMetaData(); }
/** * create meta data entry */ function createMetaData() { include_once 'Services/MetaData/classes/class.ilMDCreator.php'; global $ilUser; $md_creator = new ilMDCreator($this->getLMId(), $this->getId(), $this->getType()); $md_creator->setTitle($this->getTitle()); $md_creator->setTitleLanguage($ilUser->getPref('language')); $md_creator->setDescription($this->getDescription()); $md_creator->setDescriptionLanguage($ilUser->getPref('language')); $md_creator->setKeywordLanguage($ilUser->getPref('language')); $md_creator->setLanguage($ilUser->getPref('language')); $md_creator->create(); return true; }
/** * create meta data entry */ function createMetaData() { include_once 'Services/MetaData/classes/class.ilMDCreator.php'; global $ilUser; $glo_id = ilGlossaryTerm::_lookGlossaryID($this->getTermId()); $lang = ilGlossaryTerm::_lookLanguage($this->getTermId()); $md_creator = new ilMDCreator($glo_id, $this->getId(), $this->getType()); $md_creator->setTitle($this->getTitle()); $md_creator->setTitleLanguage($lang); $md_creator->setDescription($this->getDescription()); $md_creator->setDescriptionLanguage($lang); $md_creator->setKeywordLanguage($lang); $md_creator->setLanguage($lang); //echo "-".$this->getTitle()."-"; exit; $md_creator->create(); return true; }