ILIAS  trunk Revision v11.0_alpha-1866-gfa368f7776e
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ilECSCourseSettings Class Reference

Class ilECSCourseSettings. More...

+ Inheritance diagram for ilECSCourseSettings:
+ Collaboration diagram for ilECSCourseSettings:

Public Member Functions

 __construct (ilObject $a_content_object)
 
- Public Member Functions inherited from ilECSObjectSettings
 __construct (ilObject $a_content_object)
 Constructor. More...
 
 getContentObject ()
 Get content object. More...
 
 addSettingsToForm (ilPropertyFormGUI $a_form, $a_type)
 Fill ECS export settings "multiple servers". More...
 
 getSettingsSection (FieldFactory $field_factory, Refinery $refinery)
 
 saveSettingsSection (array $section)
 
 handleSettingsUpdate (ilPropertyFormGUI $form)
 Update ECS Export Settings. More...
 
 handleContentUpdate ()
 Update ECS Content. More...
 
 doDelete (ilECSSetting $a_server, ilECSExport $a_export_settings)
 Delete ECS resource. More...
 

Protected Member Functions

 getECSObjectType ()
 
 buildJson (ilECSSetting $a_server)
 
- Protected Member Functions inherited from ilECSObjectSettings
 getECSObjectType ()
 Get ECS resource identifier, e.g. More...
 
 isActive ()
 Is ECS (for current object) active? More...
 
 ecsCanBeActivatedForObject (ilECSExportManager $export_manager, array $exportable_participants)
 
 getTrafoForECSExportSection (Refinery $refinery)
 
 getValueForECSExportOptionalGroup (ilECSExportManager $export_manager, array $potential_receivers)
 
 handleSettingsForServer (ilECSSetting $a_server, bool $a_export, array $a_mids)
 Save ECS settings (add- update- deleteResource) More...
 
 doAdd (ilECSSetting $a_server, ilECSExport $a_export_settings, array $a_mids)
 Add resource to ECS. More...
 
 doUpdate (ilECSSetting $a_server, ilECSExport $a_export_settings, ?array $a_mids=null)
 Update ECS resource. More...
 
 getParticipants (int $a_server_id, int $a_econtent_id)
 Get participants for server and ecs resource. More...
 
 sendNewContentNotification (ilECSSetting $a_server, $a_econtent_id)
 send notifications about new EContent More...
 
 handlePermissionUpdate (ilECSSetting $server)
 Handle permission update. More...
 
 getJsonCore (string $a_etype)
 Build core json structure. More...
 
 addMetadataToJson (object $a_json, ilECSSetting $a_server, array $a_definition)
 Add advanced metadata to json (export) More...
 
 buildJson (ilECSSetting $a_server)
 Build resource-specific json. More...
 

Protected Attributes

ilLogger $logger
 
LOMServices $lom_services
 
- Protected Attributes inherited from ilECSObjectSettings
ilObject $content_obj
 

Additional Inherited Members

- Static Public Member Functions inherited from ilECSObjectSettings
static getInstanceByObject (ilObject $a_content_obj)
 Get settings handler for repository object. More...
 
static _handleDelete (array $a_subbtree_nodes)
 handle delete Objects that are moved to the trash call ECS-Remove More...
 
- Data Fields inherited from ilECSObjectSettings
const MAIL_SENDER = 6
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilECSCourseSettings::__construct ( ilObject  $a_content_object)

Definition at line 33 of file class.ilECSCourseSettings.php.

References $DIC, ILIAS\GlobalScreen\Provider\__construct(), and ILIAS\Repository\logger().

34  {
35  global $DIC;
36 
37  $this->logger = $DIC->logger()->crs();
38  $this->lom_services = $DIC->learningObjectMetadata();
39  parent::__construct($a_content_object);
40  }
global $DIC
Definition: shib_login.php:22
__construct(Container $dic, ilPlugin $plugin)
+ Here is the call graph for this function:

Member Function Documentation

◆ buildJson()

ilECSCourseSettings::buildJson ( ilECSSetting  $a_server)
protected

Definition at line 47 of file class.ilECSCourseSettings.php.

References $lang, ilECSObjectSettings\addMetadataToJson(), ilECSObjectSettings\getContentObject(), ilECSUtils\getEContentDefinition(), getECSObjectType(), ilECSObjectSettings\getJsonCore(), and IL_INST_ID.

48  {
49  $json = $this->getJsonCore('application/ecs-course');
50 
51  // meta language
52  $lang = $this->lom_services->read(
53  $this->content_obj->getId(),
54  $this->content_obj->getId(),
55  $this->content_obj->getType(),
56  $this->lom_services->paths()->languages()
57  )->firstData($this->lom_services->paths()->languages())->value();
58 
59  if (strlen($lang) !== 0) {
60  $json->lang = $lang . '_' . strtoupper($lang);
61  }
62  $json->status = $this->content_obj->isActivated() ? 'online' : 'offline';
63 
65  $this->addMetadataToJson($json, $a_server, $definition);
66  $json->courseID = 'il_' . IL_INST_ID . '_' . $this->getContentObject()->getType() . '_' . $this->getContentObject()->getId();
67  return $json;
68  }
const IL_INST_ID
Definition: constants.php:40
static getEContentDefinition(string $a_resource_id)
Get econtent / metadata definition.
addMetadataToJson(object $a_json, ilECSSetting $a_server, array $a_definition)
Add advanced metadata to json (export)
getContentObject()
Get content object.
getJsonCore(string $a_etype)
Build core json structure.
$lang
Definition: xapiexit.php:25
+ Here is the call graph for this function:

◆ getECSObjectType()

ilECSCourseSettings::getECSObjectType ( )
protected

Definition at line 42 of file class.ilECSCourseSettings.php.

Referenced by buildJson().

42  : string
43  {
44  return '/campusconnect/courselinks';
45  }
+ Here is the caller graph for this function:

Field Documentation

◆ $logger

ilLogger ilECSCourseSettings::$logger
protected

Definition at line 30 of file class.ilECSCourseSettings.php.

◆ $lom_services

LOMServices ilECSCourseSettings::$lom_services
protected

Definition at line 31 of file class.ilECSCourseSettings.php.


The documentation for this class was generated from the following file: