ILIAS  release_8 Revision v8.24
class.ilECSCourseSettings.php
Go to the documentation of this file.
1<?php
2
3declare(strict_types=0);
4
27{
28 protected ilLogger $logger;
29
30 public function __construct(ilObject $a_content_object)
31 {
32 global $DIC;
33
34 $this->logger = $DIC->logger()->crs();
35 parent::__construct($a_content_object);
36 }
37
38 protected function getECSObjectType(): string
39 {
40 return '/campusconnect/courselinks';
41 }
42
43 protected function buildJson(ilECSSetting $a_server)
44 {
45 $json = $this->getJsonCore('application/ecs-course');
46
47 // meta language
49 $this->content_obj->getId(),
50 $this->content_obj->getId(),
51 $this->content_obj->getType()
52 );
53 if (strlen($lang) !== 0) {
54 $json->lang = $lang . '_' . strtoupper($lang);
55 }
56 $json->status = $this->content_obj->isActivated() ? 'online' : 'offline';
57
59 $this->addMetadataToJson($json, $a_server, $definition);
60 $json->courseID = 'il_' . IL_INST_ID . '_' . $this->getContentObject()->getType() . '_' . $this->getContentObject()->getId();
61 return $json;
62 }
63}
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
getECSObjectType()
Get ECS resource identifier, e.g.
buildJson(ilECSSetting $a_server)
Build resource-specific json.
__construct(ilObject $a_content_object)
Constructor.
Handles object exports to ECS.
getContentObject()
Get content object.
getJsonCore(string $a_etype)
Build core json structure.
addMetadataToJson(object $a_json, ilECSSetting $a_server, array $a_definition)
Add advanced metadata to json (export)
static getEContentDefinition(string $a_resource_id)
Get econtent / metadata definition.
Component logger with individual log levels by component id.
static _lookupFirstLanguage(int $a_rbac_id, int $a_obj_id, string $a_obj_type)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
const IL_INST_ID
Definition: constants.php:40
global $DIC
Definition: feed.php:28
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
$lang
Definition: xapiexit.php:26