26                $this->content_obj = $a_content_object;
 
   37                switch($a_content_obj->
getType())
 
   40                                include_once 
'Modules/Course/classes/class.ilECSCourseSettings.php';
 
   44                                include_once 
'Modules/Category/classes/class.ilECSCategorySettings.php';
 
   48                                include_once 
'Modules/File/classes/class.ilECSFileSettings.php';
 
   52                                include_once 
'Modules/Glossary/classes/class.ilECSGlossarySettings.php';
 
   56                                include_once 
'Modules/Group/classes/class.ilECSGroupSettings.php';
 
   60                                include_once 
'Modules/LearningModule/classes/class.ilECSLearningModuleSettings.php';
 
   64                                include_once 
'Modules/Wiki/classes/class.ilECSWikiSettings.php';
 
   92                include_once(
'./Services/WebServices/ECS/classes/class.ilECSServerSettings.php');
 
   96                        include_once(
'./Services/WebServices/ECS/classes/class.ilECSImport.php');
 
  122                $obj_id = $this->content_obj->getId();
 
  125                include_once 
'./Services/WebServices/ECS/classes/class.ilECSExport.php';
 
  126                include_once 
'./Services/WebServices/ECS/classes/class.ilECSParticipantSettings.php';
 
  146                $lng->loadLanguageModule(
'ecs');
 
  150                $ecs->setTitle(
$lng->txt(
'ecs_'.$a_type.
'_export'));
 
  156                $exp->setRequired(
true);
 
  159                $exp->addOption($off);
 
  161                $exp->addOption($on);
 
  171                $receivers = array();
 
  172                include_once(
'./Services/WebServices/ECS/classes/class.ilECSEContentDetails.php');
 
  177                        $participants = 
null;
 
  179                                $this->getECSObjectType());             
 
  182                                $participants = $details->getReceivers();
 
  186                                foreach($participants as $mid)
 
  188                                        $receivers[] = $sid.
'_'.$mid;
 
  192                $publish_for->setValue($receivers);
 
  194                foreach($exportablePart as $pInfo)
 
  196                        include_once 
'./Services/WebServices/ECS/classes/class.ilECSParticipantSetting.php';
 
  200                                $partSetting->getCommunityName().
': '.$partSetting->getTitle(),
 
  203                        $com->setValue($pInfo[
'sid'].
'_'.$pInfo[
'mid']);
 
  204                        $publish_for->addOption($com);
 
  206                $on->addSubItem($publish_for);
 
  227                foreach((array) 
$_POST[
'ecs_sid'] as $sid_mid)
 
  229                        $tmp = explode(
'_',$sid_mid);
 
  230                        $mids[$tmp[0]][] = $tmp[1];
 
  235                        include_once 
'./Services/WebServices/ECS/classes/class.ilECSCommunitiesCache.php';
 
  236                        include_once 
'./Services/WebServices/ECS/classes/class.ilECSParticipantSettings.php';
 
  237                        include_once 
'./Services/WebServices/ECS/classes/class.ilECSSetting.php';
 
  251                                        if(!count($mids[$server_id]))
 
  283                        include_once(
'./Services/WebServices/ECS/classes/class.ilECSExport.php');
 
  287                        if($export_settings->isExported())
 
  292                                        $this->
doUpdate($a_server, $export_settings, $a_mids);                                                          
 
  297                                        $this->
doDelete($a_server, $export_settings);                                   
 
  306                                        $this->
doAdd($a_server, $export_settings, $a_mids);
 
  337                include_once 
'./Services/WebServices/ECS/classes/class.ilECSExport.php';
 
  339                foreach($export_servers as $server_id)
 
  341                        include_once 
'./Services/WebServices/ECS/classes/class.ilECSSetting.php';
 
  347                                        include_once(
'./Services/WebServices/ECS/classes/class.ilECSExport.php');
 
  348                                        $export_settings = 
new ilECSExport($server_id, $this->content_obj->getId());
 
  351                                        if($export_settings->isExported())
 
  363                                        $ilLog->write(__METHOD__.
': Cannot handle ECS content update. '.$exc->getMessage());
 
  382                $ilLog->write(__METHOD__.
': Starting ECS add resource...');
 
  386                include_once 
'Services/WebServices/ECS/classes/class.ilECSConnector.php';
 
  395                $a_export_settings->
save();
 
  415                include_once 
'Services/WebServices/ECS/classes/class.ilECSConnector.php';
 
  420                        $ilLog->write(__METHOD__.
': Missing eid. Aborting.');
 
  429                $ilLog->write(__METHOD__.
': Start updating ECS content - '.print_r($a_mids,
true));
 
  434                        $econtent_id, json_encode($json));
 
  454                        include_once 
'./Services/WebServices/ECS/classes/class.ilECSSetting.php';
 
  455                        include_once 
'./Services/WebServices/ECS/classes/class.ilECSConnector.php';
 
  460                                $ilLog->write(__METHOD__.
': Missing eid. Aborting.');
 
  465                        $ilLog->write(__METHOD__.
': Start deleting ECS content...');
 
  471                        $a_export_settings->
save();
 
  485                include_once 
'./Services/WebServices/ECS/classes/class.ilECSServerSettings.php';
 
  491                include_once 
'./Services/WebServices/ECS/classes/class.ilECSSetting.php';
 
  492                include_once 
'./Services/WebServices/ECS/classes/class.ilECSExport.php' ;
 
  494                foreach($a_subbtree_nodes as $node)
 
  496                        if(in_array($node[
'obj_id'],$exported))
 
  507                                                $settings->doDelete(
$server, $export_settings);
 
  523                $receivers = array();
 
  524                include_once(
'./Services/WebServices/ECS/classes/class.ilECSEContentDetails.php');
 
  525                foreach((array) $a_server_id as $sid)
 
  527                        $participants = 
null;
 
  531                                $participants = $details->getReceivers();
 
  535                                foreach($participants as $mid)
 
  541                return (array) $receivers;
 
  558                include_once(
'./Services/Mail/classes/class.ilMail.php');
 
  559                include_once(
'./Services/Language/classes/class.ilLanguageFactory.php');
 
  562                $lang->loadLanguageModule(
'ecs');
 
  565                $mail = 
new ilMail(self::MAIL_SENDER);
 
  566                $message = 
$lang->txt(
'ecs_export_created_body_a').
"\n\n";
 
  567                $message .= 
$lang->txt(
'title').
': '.$this->content_obj->getTitle().
"\n";
 
  568                if(strlen($desc = $this->content_obj->getDescription()))
 
  570                        $message .= 
$lang->txt(
'desc').
': '.$desc.
"\n";
 
  574                $message .= (
"\n".$lang->txt(
'ecs_published_for'));
 
  581                        include_once(
'./Services/WebServices/ECS/classes/class.ilECSEContentDetails.php');
 
  583                                $a_econtent_id, $this->getECSObjectType());                                             
 
  586                                $receivers = $details->getReceivers();
 
  590                                foreach($receivers as $member)
 
  594                                        include_once 
'./Services/WebServices/ECS/classes/class.ilECSCommunityReader.php';
 
  597                                        $message .= (
"\n\n".$part->getParticipantName().
"\n");
 
  598                                        $message .= ($part->getDescription());                                  
 
  607                                $message .= (
' '.$lang->txt(
'ecs_not_published').
"\n\n");
 
  612                        $ilLog->write(__METHOD__.
': Cannot read approvements.');
 
  616                include_once(
'./Services/Link/classes/class.ilLink.php');
 
  618                $message .= 
$lang->txt(
"perma_link").
': '.$href.
"\n\n";
 
  623                        $lang->txt(
'ecs_new_approval_subject'),
 
  624                        $message,array(),array(
'normal'));
 
  631                if($this->content_obj->getType() == 
'crs')
 
  633                        $GLOBALS[
'ilLog']->write(__METHOD__.
': Permission update');
 
  634                        if($this->content_obj->getType() == 
'crs')
 
  636                                $GLOBALS[
'rbacadmin']->grantPermission(
 
  639                                        $this->content_obj->getRefId()
 
  653                $json = 
new stdClass();
 
  654                $json->lang = 
'en_EN'; 
 
  656                $json->etype = $a_etype;
 
  657                $json->title = $this->content_obj->getTitle();
 
  658                $json->abstract = $this->content_obj->getLongDescription();     
 
  660                include_once(
'./Services/Link/classes/class.ilLink.php');
 
  661                $json->url = 
ilLink::_getLink($this->content_obj->getRefId(),$this->content_obj->getType());
 
  675                include_once(
'./Services/WebServices/ECS/classes/class.ilECSDataMappingSettings.php');
 
  676                include_once(
'./Services/AdvancedMetaData/classes/class.ilAdvancedMDValues.php');
 
  677                include_once(
'./Services/AdvancedMetaData/classes/class.ilAdvancedMDFieldDefinition.php');
 
  680                include_once 
"Services/WebServices/ECS/classes/class.ilECSUtils.php";
 
  683                foreach($a_definition as $id => $type)
 
  697                                $value = isset($values[$field]) ? $values[$field] : 
'';
 
  702                                                $a_json->$target = explode(
',', $value);
 
  706                                                $a_json->$target = (int)$value;
 
  710                                                $a_json->$target = (string)$value;
 
  714                                                if(!isset($a_json->$target))
 
  716                                                        include_once(
'./Services/WebServices/ECS/classes/class.ilECSTimePlace.php');                                            
 
  719                                                $a_json->$target->{
'set'.ucfirst($id)}($value);
 
Class ilECSCategorySettings.
Class ilECSCourseSettings.
static getInstanceByServerId($a_server_id)
Get singleton instance.
Presentation of ecs content details (http://...campusconnect/courselinks/id/details)
static getInstance($a_server_id, $a_econtent_id, $a_resource_type)
Get data from server.
Storage of ECS exported objects.
getEContentId()
get econtent id
static getExportedIds()
Get exported ids @global ilDB $ilDB.
setExported($a_status)
Set exported.
isExported()
check if an object is exported or not
static _isExported($a_obj_id)
Check if object is exported.
static getExportServerIds($a_obj_id)
lookup server ids of exported materials @global ilDB $ilDB
setEContentId($a_id)
set econtent id
Class ilECSGlossarySettings.
Class ilECSGroupSettings.
static lookupServerId($a_obj_id)
Lookup server id of imported content @global <type> $ilDB.
Class ilECSLearningModuleSettings.
Handles object exports to ECS.
getContentObject()
Get content object.
doUpdate(ilECSSetting $a_server, ilECSExport $a_export_settings, array $a_mids=null)
Update ECS resource.
static getInstanceByObject(ilObject $a_content_obj)
Get settings handler for repository object.
getJsonCore($a_etype)
Build core json structure.
sendNewContentNotification(ilECSSetting $a_server, $a_econtent_id)
send notifications about new EContent
isActive()
Is ECS (for current object) active?
static _handleDelete(array $a_subbtree_nodes)
addMetadataToJson(&$a_json, ilECSSetting $a_server, array $a_definition)
Add advanced metadata to json (export)
handlePermissionUpdate(ilECSSetting $server)
doAdd(ilECSSetting $a_server, ilECSExport $a_export_settings, array $a_mids)
Add resource to ECS.
addSettingsToForm(ilPropertyFormGUI $a_form, $a_type)
Fill ECS export settings "multiple servers".
handleSettingsUpdate()
Update ECS Export Settings.
getECSObjectType()
Get ECS resource identifier, e.g.
doDelete(ilECSSetting $a_server, ilECSExport $a_export_settings)
Delete ECS resource.
handleSettingsForServer(ilECSSetting $a_server, $a_export, $a_mids)
Save ECS settings (add- update- deleteResource)
getParticipants($a_server_id, $a_econtent_id)
Get participants for server and ecs resource.
buildJson(ilECSSetting $a_server)
Build resource-specific json.
handleContentUpdate()
Update ECS Content.
__construct(ilObject $a_content_object)
Constructor.
static getExportServers()
Get server ids which allow an export @global <type> $ilDB.
static getExportableParticipants($a_type)
Get participants which are enabled and export is allowed.
static getInstance()
Get singleton instance.
getServerId()
Get current server id.
getApprovalRecipientsAsString()
get approval recipients as string
getApprovalRecipients()
get approval recipients
static getInstanceByServerId($a_server_id)
Get singleton instance per server.
Representation of ECS EContent Time Place.
static getAdvancedMDValuesForObjId($a_obj_id)
Get advanced metadata values for object id.
static _getLanguage($a_lang_key='')
Get langauge object.
static _getLink($a_ref_id, $a_type='', $a_params=array(), $append="")
static _getStaticLink($a_ref_id, $a_type='', $a_fallback_goto=true, $append="")
Get static link.
Class Mail this class handles base functions for mail handling.
static _getAutoGeneratedMessageString($lang=null)
get auto generated info string
getInstanceByRefId($a_ref_id, $stop_on_error=true)
get an instance of an Ilias object by reference id
Class ilObject Basic functions for all objects.
getType()
get object type @access public
This class represents an option in a radio group.
static _getOperationIdsByName($operations)
get ops_id's by name.
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.