protected function buildJson(ilECSSetting $a_server) { global $ilLog; $json = $this->getJsonCore('application/ecs-course'); // meta language include_once './Services/MetaData/classes/class.ilMDLanguage.php'; $lang = ilMDLanguage::_lookupFirstLanguage($this->content_obj->getId(), $this->content_obj->getId(), $this->content_obj->getType()); if (strlen($lang)) { $json->lang = $lang . '_' . strtoupper($lang); } $json->status = $this->content_obj->isActivated() ? 'online' : 'offline'; include_once './Services/WebServices/ECS/classes/class.ilECSUtils.php'; $definition = ilECSUtils::getEContentDefinition($this->getECSObjectType()); $this->addMetadataToJson($json, $a_server, $definition); return $json; }