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())) 124 $this->logger->debug(
'Show ecs settings.');
126 $this->logger->debug(
'Object type is not active. => no settings.');
130 $obj_id = $this->content_obj->getId();
133 include_once
'./Services/WebServices/ECS/classes/class.ilECSExport.php';
134 include_once
'./Services/WebServices/ECS/classes/class.ilECSParticipantSettings.php';
137 $this->logger->debug(
'Called withot references. => no settings.');
143 $this->logger->debug(
'Object type is not exportable. => no settings.');
150 $this->logger->debug(
'Parent crs/grp in path. => no settings.');
154 $lng->loadLanguageModule(
'ecs');
158 $ecs->setTitle($lng->txt(
'ecs_' .
$a_type .
'_export'));
167 $exp->addOption($off);
169 $exp->addOption($on);
179 $receivers =
array();
180 include_once(
'./Services/WebServices/ECS/classes/class.ilECSEContentDetails.php');
184 $participants = null;
187 $exp->getEContentId(),
191 $participants = $details->getReceivers();
194 foreach ($participants as $mid) {
195 $receivers[] = $sid .
'_' . $mid;
201 foreach ($exportablePart as $pInfo) {
202 include_once
'./Services/WebServices/ECS/classes/class.ilECSParticipantSetting.php';
206 $partSetting->getCommunityName() .
': ' . $partSetting->getTitle(),
209 $com->
setValue($pInfo[
'sid'] .
'_' . $pInfo[
'mid']);
210 $publish_for->addOption($com);
212 $on->addSubItem($publish_for);
233 $tmp = explode(
'_', $sid_mid);
234 $mids[$tmp[0]][] = $tmp[1];
238 include_once
'./Services/WebServices/ECS/classes/class.ilECSCommunitiesCache.php';
239 include_once
'./Services/WebServices/ECS/classes/class.ilECSParticipantSettings.php';
240 include_once
'./Services/WebServices/ECS/classes/class.ilECSSetting.php';
248 if (!
$_POST[
'ecs_export']) {
251 if (!count($mids[$server_id])) {
279 include_once(
'./Services/WebServices/ECS/classes/class.ilECSExport.php');
283 if ($export_settings->isExported()) {
285 if ((
bool) $a_export) {
286 $this->
doUpdate($a_server, $export_settings, $a_mids);
290 $this->
doDelete($a_server, $export_settings);
297 $this->
doAdd($a_server, $export_settings, $a_mids);
323 include_once
'./Services/WebServices/ECS/classes/class.ilECSExport.php';
325 foreach ($export_servers as $server_id) {
326 include_once
'./Services/WebServices/ECS/classes/class.ilECSSetting.php';
330 include_once(
'./Services/WebServices/ECS/classes/class.ilECSExport.php');
331 $export_settings =
new ilECSExport($server_id, $this->content_obj->getId());
334 if ($export_settings->isExported()) {
341 $ilLog->write(__METHOD__ .
': Cannot handle ECS content update. ' . $exc->getMessage());
360 $ilLog->write(__METHOD__ .
': Starting ECS add resource...');
364 include_once
'Services/WebServices/ECS/classes/class.ilECSConnector.php';
367 $econtent_id = $connector->addResource(
375 $a_export_settings->
save();
395 include_once
'Services/WebServices/ECS/classes/class.ilECSConnector.php';
399 $ilLog->write(__METHOD__ .
': Missing eid. Aborting.');
407 $ilLog->write(__METHOD__ .
': Start updating ECS content - ' . print_r($a_mids,
true));
411 $connector->updateResource(
434 include_once
'./Services/WebServices/ECS/classes/class.ilECSSetting.php';
435 include_once
'./Services/WebServices/ECS/classes/class.ilECSConnector.php';
439 $ilLog->write(__METHOD__ .
': Missing eid. Aborting.');
444 $ilLog->write(__METHOD__ .
': Start deleting ECS content...');
445 $connector->deleteResource(
452 $a_export_settings->
save();
466 include_once
'./Services/WebServices/ECS/classes/class.ilECSServerSettings.php';
471 include_once
'./Services/WebServices/ECS/classes/class.ilECSSetting.php';
472 include_once
'./Services/WebServices/ECS/classes/class.ilECSExport.php' ;
474 foreach ($a_subbtree_nodes as $node) {
475 if (in_array($node[
'obj_id'], $exported)) {
483 $settings->doDelete(
$server, $export_settings);
499 $receivers =
array();
500 include_once(
'./Services/WebServices/ECS/classes/class.ilECSEContentDetails.php');
501 foreach ((
array) $a_server_id as $sid) {
502 $participants = null;
505 $participants = $details->getReceivers();
508 foreach ($participants as $mid) {
513 return (
array) $receivers;
529 include_once(
'./Services/Mail/classes/class.ilMail.php');
530 include_once(
'./Services/Language/classes/class.ilLanguageFactory.php');
533 $lang->loadLanguageModule(
'ecs');
536 $mail =
new ilMail(self::MAIL_SENDER);
538 $message .=
$lang->txt(
'title') .
': ' . $this->content_obj->getTitle() .
"\n";
539 if (strlen($desc = $this->content_obj->getDescription())) {
550 include_once(
'./Services/WebServices/ECS/classes/class.ilECSEContentDetails.php');
557 $receivers = $details->getReceivers();
560 foreach ($receivers as $member) {
563 include_once
'./Services/WebServices/ECS/classes/class.ilECSCommunityReader.php';
566 $message .= (
"\n\n" . $part->getParticipantName() .
"\n");
567 $message .= ($part->getDescription());
573 $message .= (
' ' .
$lang->txt(
'ecs_not_published') .
"\n\n");
576 $ilLog->write(__METHOD__ .
': Cannot read approvements.');
580 include_once(
'./Services/Link/classes/class.ilLink.php');
582 $message .=
$lang->txt(
"perma_link") .
': ' . $href .
"\n\n";
589 $lang->txt(
'ecs_new_approval_subject'),
605 ($this->content_obj->getType() ==
'crs') ||
606 ($this->content_obj->getType() ==
'grp')
608 $GLOBALS[
'ilLog']->write(__METHOD__ .
': Permission update for courses/groups');
609 $GLOBALS[
'rbacadmin']->grantPermission(
612 $this->content_obj->getRefId()
625 $json =
new stdClass();
626 $json->lang =
'en_EN';
628 $json->etype = $a_etype;
629 $json->title = $this->content_obj->getTitle();
630 $json->abstract = $this->content_obj->getLongDescription();
632 include_once(
'./Services/Link/classes/class.ilLink.php');
633 $json->url =
ilLink::_getLink($this->content_obj->getRefId(), $this->content_obj->getType());
647 include_once(
'./Services/WebServices/ECS/classes/class.ilECSDataMappingSettings.php');
648 include_once(
'./Services/AdvancedMetaData/classes/class.ilAdvancedMDValues.php');
649 include_once(
'./Services/AdvancedMetaData/classes/class.ilAdvancedMDFieldDefinition.php');
652 include_once
"Services/WebServices/ECS/classes/class.ilECSUtils.php";
655 foreach ($a_definition as
$id =>
$type) {
656 if (is_array(
$type)) {
664 $value = isset($values[$field]) ? $values[$field] :
'';
668 $a_json->$target = explode(
',', $value);
672 $a_json->$target = (int) $value;
676 $a_json->$target = (
string) $value;
680 if (!isset($a_json->$target)) {
681 include_once(
'./Services/WebServices/ECS/classes/class.ilECSTimePlace.php');
684 $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.
$GLOBALS['loaded']
Global hash that tracks already loaded includes.
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.
This class handles base functions for mail handling.
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
Create styles array
The data for the language used.
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.
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.
Class ilECSGlossarySettings.
static getExportServers()
Get server ids which allow an export <type> $ilDB.
Class ilECSCourseSettings.