ILIAS  Release_4_4_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
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 $ilLog;
25 
26  $json = $this->getJsonCore('application/ecs-course');
27 
28  // meta language
29  include_once('./Services/MetaData/classes/class.ilMDLanguage.php');
30  $lang = ilMDLanguage::_lookupFirstLanguage($this->content_obj->getId(),$this->content_obj->getId(),$this->content_obj->getType());
31  if(strlen($lang))
32  {
33  $json->lang = $lang.'_'.strtoupper($lang);
34  }
35 
36  $json->status = $this->content_obj->isActivated() ? 'online' : 'offline';
37 
38  include_once('./Services/WebServices/ECS/classes/class.ilECSUtils.php');
40  $this->addMetadataToJson($json, $a_server, $definition);
41 
42  return $json;
43  }
44 }
45 
46 ?>