/**
  * Fill ECS export settings "multiple servers"
  * 
  * to be used in ilObject->initEditForm()
  * 
  * @param ilPropertyFormGUI $a_form
  */
 public function addSettingsToForm(ilPropertyFormGUI $a_form, $a_type)
 {
     global $lng;
     if (!$this->isActive()) {
         return;
     }
     $obj_id = $this->content_obj->getId();
     // Return if no participant is enabled for export and the current object is not released
     include_once './Services/WebServices/ECS/classes/class.ilECSExport.php';
     include_once './Services/WebServices/ECS/classes/class.ilECSParticipantSettings.php';
     $exportablePart = ilECSParticipantSettings::getExportableParticipants();
     if (!$exportablePart and !ilECSExport::_isExported($obj_id)) {
         return true;
     }
     $lng->loadLanguageModule('ecs');
     // show ecs property form section
     $ecs = new ilFormSectionHeaderGUI();
     $ecs->setTitle($lng->txt('ecs_' . $a_type . '_export'));
     $a_form->addItem($ecs);
     // release or not
     $exp = new ilRadioGroupInputGUI($lng->txt('ecs_' . $a_type . '_export_obj_settings'), 'ecs_export');
     $exp->setRequired(true);
     $exp->setValue(ilECSExport::_isExported($obj_id) ? 1 : 0);
     $off = new ilRadioOption($lng->txt('ecs_' . $a_type . '_export_disabled'), 0);
     $exp->addOption($off);
     $on = new ilRadioOption($lng->txt('ecs_' . $a_type . '_export_enabled'), 1);
     $exp->addOption($on);
     $a_form->addItem($exp);
     // Show all exportable participants
     $publish_for = new ilCheckboxGroupInputGUI($lng->txt('ecs_publish_for'), 'ecs_sid');
     // @TODO: Active checkboxes for recipients
     //$publish_for->setValue((array) $members);
     // Read receivers
     $receivers = array();
     include_once './Services/WebServices/ECS/classes/class.ilECSEContentDetails.php';
     foreach (ilECSExport::getExportServerIds($obj_id) as $sid) {
         $exp = new ilECSExport($sid, $obj_id);
         $participants = null;
         $details = ilECSEContentDetails::getInstance($sid, $exp->getEContentId(), $this->getECSObjectType());
         if ($details instanceof ilECSEContentDetails) {
             $participants = $details->getReceivers();
         }
         if ($participants) {
             foreach ($participants as $mid) {
                 $receivers[] = $sid . '_' . $mid;
             }
         }
     }
     $publish_for->setValue($receivers);
     foreach ($exportablePart as $pInfo) {
         include_once './Services/WebServices/ECS/classes/class.ilECSParticipantSetting.php';
         $partSetting = new ilECSParticipantSetting($pInfo['sid'], $pInfo['mid']);
         $com = new ilCheckboxInputGUI($partSetting->getCommunityName() . ': ' . $partSetting->getTitle(), 'sid_mid');
         $com->setValue($pInfo['sid'] . '_' . $pInfo['mid']);
         $publish_for->addOption($com);
     }
     $on->addSubItem($publish_for);
     return true;
 }