34 $this->logger =
$GLOBALS[
'DIC']->logger()->obj();
35 $this->content_obj = $a_content_object;
46 switch ($a_content_obj->
getType()) {
48 include_once
'Modules/Course/classes/class.ilECSCourseSettings.php';
52 include_once
'Modules/Category/classes/class.ilECSCategorySettings.php';
56 include_once
'Modules/File/classes/class.ilECSFileSettings.php';
60 include_once
'Modules/Glossary/classes/class.ilECSGlossarySettings.php';
64 include_once
'Modules/Group/classes/class.ilECSGroupSettings.php';
68 include_once
'Modules/LearningModule/classes/class.ilECSLearningModuleSettings.php';
72 include_once
'Modules/Wiki/classes/class.ilECSWikiSettings.php';
100 include_once(
'./Services/WebServices/ECS/classes/class.ilECSServerSettings.php');
103 #include_once('./Services/WebServices/ECS/classes/class.ilECSImport.php'); 104 #if(!ilECSImport::lookupServerId($this->content_obj->getId())) 126 $this->logger->debug(
'Show ecs settings.');
128 $this->logger->debug(
'Object type is not active. => no settings.');
132 $obj_id = $this->content_obj->getId();
135 include_once
'./Services/WebServices/ECS/classes/class.ilECSExport.php';
136 include_once
'./Services/WebServices/ECS/classes/class.ilECSParticipantSettings.php';
139 $this->logger->debug(
'Called withot references. => no settings.');
145 $this->logger->debug(
'Object type is not exportable. => no settings.');
152 $this->logger->debug(
'Parent crs/grp in path. => no settings.');
156 $lng->loadLanguageModule(
'ecs');
160 $ecs->setTitle(
$lng->txt(
'ecs_' .
$a_type .
'_export'));
169 $exp->addOption($off);
171 $exp->addOption($on);
181 $receivers = array();
182 include_once(
'./Services/WebServices/ECS/classes/class.ilECSEContentDetails.php');
186 $participants = null;
189 $exp->getEContentId(),
193 $participants = $details->getReceivers();
196 foreach ($participants as $mid) {
197 $receivers[] = $sid .
'_' . $mid;
203 foreach ($exportablePart as $pInfo) {
204 include_once
'./Services/WebServices/ECS/classes/class.ilECSParticipantSetting.php';
208 $partSetting->getCommunityName() .
': ' . $partSetting->getTitle(),
211 $com->
setValue($pInfo[
'sid'] .
'_' . $pInfo[
'mid']);
212 $publish_for->addOption($com);
214 $on->addSubItem($publish_for);
234 foreach ((array)
$_POST[
'ecs_sid'] as $sid_mid) {
235 $tmp = explode(
'_', $sid_mid);
236 $mids[$tmp[0]][] = $tmp[1];
240 include_once
'./Services/WebServices/ECS/classes/class.ilECSCommunitiesCache.php';
241 include_once
'./Services/WebServices/ECS/classes/class.ilECSParticipantSettings.php';
242 include_once
'./Services/WebServices/ECS/classes/class.ilECSSetting.php';
250 if (!
$_POST[
'ecs_export']) {
254 !isset($mids[$server_id]) ||
255 !is_array($mids[$server_id]) ||
256 !count($mids[$server_id])) {
262 isset($mids[$server_id]) ? $mids[$server_id] : []
284 include_once(
'./Services/WebServices/ECS/classes/class.ilECSExport.php');
288 if ($export_settings->isExported()) {
290 if ((
bool) $a_export) {
291 $this->
doUpdate($a_server, $export_settings, $a_mids);
295 $this->
doDelete($a_server, $export_settings);
302 $this->
doAdd($a_server, $export_settings, $a_mids);
330 include_once
'./Services/WebServices/ECS/classes/class.ilECSExport.php';
332 foreach ($export_servers as $server_id) {
333 include_once
'./Services/WebServices/ECS/classes/class.ilECSSetting.php';
337 include_once(
'./Services/WebServices/ECS/classes/class.ilECSExport.php');
338 $export_settings =
new ilECSExport($server_id, $this->content_obj->getId());
341 if ($export_settings->isExported()) {
348 $ilLog->write(__METHOD__ .
': Cannot handle ECS content update. ' . $exc->getMessage());
369 $ilLog->write(__METHOD__ .
': Starting ECS add resource...');
373 include_once
'Services/WebServices/ECS/classes/class.ilECSConnector.php';
376 $econtent_id = $connector->addResource(
384 $a_export_settings->
save();
406 include_once
'Services/WebServices/ECS/classes/class.ilECSConnector.php';
410 $ilLog->write(__METHOD__ .
': Missing eid. Aborting.');
418 $ilLog->write(__METHOD__ .
': Start updating ECS content - ' . print_r($a_mids,
true));
422 $connector->updateResource(
447 include_once
'./Services/WebServices/ECS/classes/class.ilECSSetting.php';
448 include_once
'./Services/WebServices/ECS/classes/class.ilECSConnector.php';
452 $ilLog->write(__METHOD__ .
': Missing eid. Aborting.');
457 $ilLog->write(__METHOD__ .
': Start deleting ECS content...');
458 $connector->deleteResource(
465 $a_export_settings->
save();
479 include_once
'./Services/WebServices/ECS/classes/class.ilECSServerSettings.php';
484 include_once
'./Services/WebServices/ECS/classes/class.ilECSSetting.php';
485 include_once
'./Services/WebServices/ECS/classes/class.ilECSExport.php' ;
487 foreach ($a_subbtree_nodes as $node) {
488 if (in_array($node[
'obj_id'], $exported)) {
496 $settings->doDelete(
$server, $export_settings);
512 $receivers = array();
513 include_once(
'./Services/WebServices/ECS/classes/class.ilECSEContentDetails.php');
514 foreach ((array) $a_server_id as $sid) {
515 $participants = null;
518 $participants = $details->getReceivers();
521 foreach ($participants as $mid) {
526 return (array) $receivers;
544 include_once(
'./Services/Mail/classes/class.ilMail.php');
545 include_once(
'./Services/Language/classes/class.ilLanguageFactory.php');
548 $lang->loadLanguageModule(
'ecs');
551 $mail =
new ilMail(self::MAIL_SENDER);
553 $message .=
$lang->txt(
'title') .
': ' . $this->content_obj->getTitle() .
"\n";
554 if (strlen($desc = $this->content_obj->getDescription())) {
565 include_once(
'./Services/WebServices/ECS/classes/class.ilECSEContentDetails.php');
572 $receivers = $details->getReceivers();
575 foreach ($receivers as $member) {
578 include_once
'./Services/WebServices/ECS/classes/class.ilECSCommunityReader.php';
581 $message .= (
"\n\n" . $part->getParticipantName() .
"\n");
582 $message .= ($part->getDescription());
588 $message .= (
' ' .
$lang->txt(
'ecs_not_published') .
"\n\n");
591 $ilLog->write(__METHOD__ .
': Cannot read approvements.');
595 include_once(
'./Services/Link/classes/class.ilLink.php');
597 $message .=
$lang->txt(
"perma_link") .
': ' . $href .
"\n\n";
604 $lang->txt(
'ecs_new_approval_subject'),
620 ($this->content_obj->getType() ==
'crs') ||
621 ($this->content_obj->getType() ==
'grp')
623 $GLOBALS[
'DIC'][
'ilLog']->write(__METHOD__ .
': Permission update for courses/groups');
624 $GLOBALS[
'DIC'][
'rbacadmin']->grantPermission(
627 $this->content_obj->getRefId()
641 $json->lang =
'en_EN';
643 $json->etype = $a_etype;
644 $json->title = $this->content_obj->getTitle();
645 $json->abstract = $this->content_obj->getLongDescription();
647 include_once(
'./Services/Link/classes/class.ilLink.php');
648 $json->url =
ilLink::_getLink($this->content_obj->getRefId(), $this->content_obj->getType());
662 include_once(
'./Services/WebServices/ECS/classes/class.ilECSDataMappingSettings.php');
663 include_once(
'./Services/AdvancedMetaData/classes/class.ilAdvancedMDValues.php');
664 include_once(
'./Services/AdvancedMetaData/classes/class.ilAdvancedMDFieldDefinition.php');
667 include_once
"Services/WebServices/ECS/classes/class.ilECSUtils.php";
670 foreach ($a_definition as
$id =>
$type) {
671 if (is_array(
$type)) {
683 $a_json->$target = explode(
',', $value);
687 $a_json->$target = (int) $value;
691 $a_json->$target = (string) $value;
695 if (!isset($a_json->$target)) {
696 include_once(
'./Services/WebServices/ECS/classes/class.ilECSTimePlace.php');
699 $a_json->$target->{
'set' . ucfirst(
$id)}($value);
This class represents an option in a radio group.
static getInstanceByServerId($a_server_id)
Get singleton instance.
handleContentUpdate()
Update ECS Content.
static getInstanceByServerId($a_server_id)
Get singleton instance per server.
getParticipants($a_server_id, $a_econtent_id)
Get participants for server and ecs resource.
Representation of ECS EContent Time Place.
static _getOperationIdsByName($operations)
get ops_id's by name.
getServerId()
Get current server id.
static getExportableParticipants($a_type)
Get participants which are enabled and export is allowed.
Storage of ECS exported objects.
doUpdate(ilECSSetting $a_server, ilECSExport $a_export_settings, array $a_mids=null)
Update ECS resource.
isActive()
Is ECS (for current object) active?
getApprovalRecipientsAsString()
get approval recipients as string
static _handleDelete(array $a_subbtree_nodes)
handle delete Objects that are moved to the trash call ECS-Remove
setExported($a_status)
Set exported.
static _getStaticLink( $a_ref_id, $a_type='', $a_fallback_goto=true, $append="")
Get static link.
static getInstance()
Get singleton instance.
if(!array_key_exists('StateId', $_REQUEST)) $id
handleSettingsForServer(ilECSSetting $a_server, $a_export, $a_mids)
Save ECS settings (add- update- deleteResource)
Presentation of ecs content details (http://...campusconnect/courselinks/id/details) ...
getECSObjectType()
Get ECS resource identifier, e.g.
__construct(ilObject $a_content_object)
Constructor.
Class ilECSLearningModuleSettings.
getContentObject()
Get content object.
static _getLanguage($a_lang_key='')
Get langauge object.
static getExportedIds()
Get exported ids ilDB $ilDB.
catch(Exception $e) $message
static getExportServerIds($a_obj_id)
lookup server ids of exported materials ilDB $ilDB
static getInstanceByObject(ilObject $a_content_obj)
Get settings handler for repository object.
addMetadataToJson(&$a_json, ilECSSetting $a_server, array $a_definition)
Add advanced metadata to json (export)
sendNewContentNotification(ilECSSetting $a_server, $a_econtent_id)
send notifications about new EContent
isExported()
check if an object is exported or not
getEContentId()
get econtent id
static getAdvancedMDValuesForObjId($a_obj_id)
Get advanced metadata values for object id.
Class ilECSGroupSettings.
handlePermissionUpdate(ilECSSetting $server)
Handle permission update.
doAdd(ilECSSetting $a_server, ilECSExport $a_export_settings, array $a_mids)
Add resource to ECS.
static _isExported($a_obj_id)
Check if object is exported.
buildJson(ilECSSetting $a_server)
Build resource-specific json.
getType()
get object type public
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
getGlobalRole()
get global role
handleSettingsUpdate()
Update ECS Export Settings.
getJsonCore($a_etype)
Build core json structure.
static _getAutoGeneratedMessageString(ilLanguage $lang=null)
Get auto generated info string.
for($i=1; $i<=count($kw_cases_sel); $i+=1) $lang
static getInstanceByRefId($a_ref_id, $stop_on_error=true)
get an instance of an Ilias object by reference id
setEContentId($a_id)
set econtent id
Class ilECSCategorySettings.
getApprovalRecipients()
get approval recipients
Handles object exports to ECS.
addSettingsToForm(ilPropertyFormGUI $a_form, $a_type)
Fill ECS export settings "multiple servers".
static getInstance($a_server_id, $a_econtent_id, $a_resource_type)
Get data from server.
static _getLink($a_ref_id, $a_type='', $a_params=array(), $append="")
doDelete(ilECSSetting $a_server, ilECSExport $a_export_settings)
Delete ECS resource.
$GLOBALS['JPEG_Segment_Names']
Global Variable: XMP_tag_captions.
Class ilECSGlossarySettings.
static getExportServers()
Get server ids which allow an export <type> $ilDB.
Class ilECSCourseSettings.