ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
class.ilECSCourseSettings.php
Go to the documentation of this file.
1 <?php
2 
3 /* Copyright (c) 1998-2010 ILIAS open source, Extended GPL, see docs/LICENSE */
4 
5 include_once 'Services/WebServices/ECS/classes/class.ilECSObjectSettings.php';
6 
16 {
17  protected function getECSObjectType()
18  {
19  return '/campusconnect/courselinks';
20  }
21 
22  protected function buildJson(ilECSSetting $a_server)
23  {
24  global $DIC;
25 
26  $ilLog = $DIC['ilLog'];
27 
28  $json = $this->getJsonCore('application/ecs-course');
29 
30  // meta language
31  include_once('./Services/MetaData/classes/class.ilMDLanguage.php');
32  $lang = ilMDLanguage::_lookupFirstLanguage($this->content_obj->getId(), $this->content_obj->getId(), $this->content_obj->getType());
33  if (strlen($lang)) {
34  $json->lang = $lang . '_' . strtoupper($lang);
35  }
36 
37  $json->status = $this->content_obj->isActivated() ? 'online' : 'offline';
38 
39  include_once('./Services/WebServices/ECS/classes/class.ilECSUtils.php');
41  $this->addMetadataToJson($json, $a_server, $definition);
42 
43  $json->courseID = 'il_' . IL_INST_ID . '_' . $this->getContentObject()->getType() . '_' . $this->getContentObject()->getId();
44 
45  return $json;
46  }
47 }
global $DIC
Definition: saml.php:7
static getEContentDefinition($a_resource_id)
Get econtent / metadata definition.
static _lookupFirstLanguage($a_rbac_id, $a_obj_id, $a_obj_type)
Lookup first language.
getContentObject()
Get content object.
addMetadataToJson(&$a_json, ilECSSetting $a_server, array $a_definition)
Add advanced metadata to json (export)
getJsonCore($a_etype)
Build core json structure.
buildJson(ilECSSetting $a_server)
for($i=1; $i<=count($kw_cases_sel); $i+=1) $lang
Definition: langwiz.php:349
Handles object exports to ECS.
Class ilECSCourseSettings.