ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
class.ilRemoteObjectBase.php
Go to the documentation of this file.
1 <?php
2 /* Copyright (c) 1998-2010 ILIAS open source, Extended GPL, see docs/LICENSE */
3 
4 include_once "Services/Object/classes/class.ilObject2.php";
5 
15 abstract class ilRemoteObjectBase extends ilObject2
16 {
17  protected $local_information;
18  protected $remote_link;
19  protected $organization;
20  protected $mid;
21  protected $auth_hash = '';
22 
23  protected $realm_plain = '';
24 
25  const MAIL_SENDER = 6;
26  const OBJECT_OWNER = 6;
27 
35  public function __construct($a_id = 0, $a_call_by_reference = true)
36  {
37  global $ilDB;
38 
39  parent::__construct($a_id, $a_call_by_reference);
40  $this->db = $ilDB;
41  }
42 
49  public static function getInstanceByEventType($a_type)
50  {
51  switch ($a_type) {
53  include_once 'Modules/RemoteCourse/classes/class.ilObjRemoteCourse.php';
54  return new ilObjRemoteCourse();
55 
57  include_once 'Modules/RemoteCategory/classes/class.ilObjRemoteCategory.php';
58  return new ilObjRemoteCategory();
59 
61  include_once 'Modules/RemoteFile/classes/class.ilObjRemoteFile.php';
62  return new ilObjRemoteFile();
63 
65  include_once 'Modules/RemoteGlossary/classes/class.ilObjRemoteGlossary.php';
66  return new ilObjRemoteGlossary();
67 
69  include_once 'Modules/RemoteGroup/classes/class.ilObjRemoteGroup.php';
70  return new ilObjRemoteGroup();
71 
73  include_once 'Modules/RemoteLearningModule/classes/class.ilObjRemoteLearningModule.php';
74  return new ilObjRemoteLearningModule();
75 
77  include_once 'Modules/RemoteWiki/classes/class.ilObjRemoteWiki.php';
78  return new ilObjRemoteWiki();
79 
81  include_once 'Modules/RemoteTest/classes/class.ilObjRemoteTest.php';
82  return new ilObjRemoteTest();
83  }
84  }
85 
86  public function beforeCreate()
87  {
88  $this->setOwner(self::OBJECT_OWNER);
89  return parent::beforeCreate();
90  }
91 
97  abstract protected function getTableName();
98 
104  abstract protected function getECSObjectType();
105 
112  public static function _lookupOrganization($a_obj_id)
113  {
114  global $ilDB;
115 
116  $query = "SELECT organization FROM " . static::DB_TABLE_NAME .
117  " WHERE obj_id = " . $ilDB->quote($a_obj_id, 'integer') . " ";
118  $res = $ilDB->query($query);
119  while ($row = $res->fetchRow(ilDBConstants::FETCHMODE_OBJECT)) {
120  return $row->organization;
121  }
122  return '';
123  }
124 
129  public function getRealmPlain()
130  {
131  return $this->realm_plain;
132  }
133 
139  public function setOrganization($a_organization)
140  {
141  $this->organization = $a_organization;
142  }
143 
149  public function getOrganization()
150  {
151  return $this->organization;
152  }
153 
159  public function getLocalInformation()
160  {
162  }
163 
169  public function setLocalInformation($a_info)
170  {
171  $this->local_information = $a_info;
172  }
173 
179  public function getMID()
180  {
181  return $this->mid;
182  }
183 
189  public function setMID($a_mid)
190  {
191  $this->mid = $a_mid;
192  }
193 
200  public static function _lookupMID($a_obj_id)
201  {
202  global $ilDB;
203 
204  $query = "SELECT mid FROM " . static::DB_TABLE_NAME .
205  " WHERE obj_id = " . $ilDB->quote($a_obj_id, 'integer') . " ";
206  $res = $ilDB->query($query);
207  while ($row = $res->fetchRow(ilDBConstants::FETCHMODE_OBJECT)) {
208  return $row->mid;
209  }
210  return 0;
211  }
212 
218  public function setRemoteLink($a_link)
219  {
220  $this->remote_link = $a_link;
221  }
222 
228  public function getRemoteLink()
229  {
230  return $this->remote_link;
231  }
232 
240  public function getFullRemoteLink()
241  {
242  global $ilUser;
243 
244 
245  include_once './Services/WebServices/ECS/classes/class.ilECSImport.php';
246  $server_id = ilECSImport::lookupServerId($this->getId());
248 
249  include_once('./Services/WebServices/ECS/classes/class.ilECSUser.php');
250  $user = new ilECSUser($ilUser);
251  $ecs_user_data = $user->toGET();
252  $GLOBALS['ilLog']->write(__METHOD__ . ': Using ecs user data ' . $ecs_user_data);
253 
254  // check token mechanism enabled
255  include_once './Services/WebServices/ECS/classes/class.ilECSParticipantSetting.php';
256  $part = new ilECSParticipantSetting($server_id, $this->getMID());
257  if (!$part->isTokenEnabled()) {
258  return $this->getRemoteLink();
259  }
260 
261  $auth_hash = $this->createAuthResource($this->getRemoteLink() . $user->toREALM());
262  $ecs_url_hash = 'ecs_hash_url=' . urlencode($server->getServerURI() . '/sys/auths/' . $auth_hash);
263 
264  if (strpos($this->getRemoteLink(), '?')) {
265  $link = $this->getRemoteLink() . '&ecs_hash=' . $auth_hash . $ecs_user_data . '&' . $ecs_url_hash;
266  } else {
267  $link = $this->getRemoteLink() . '?ecs_hash=' . $auth_hash . $ecs_user_data . '&' . $ecs_url_hash;
268  }
269  $GLOBALS['ilLog']->write(__METHOD__ . ': ECS full link: ' . $link);
270  return $link;
271  }
272 
279  public function createAuthResource($a_plain_realm)
280  {
281  global $ilLog;
282 
283  include_once './Services/WebServices/ECS/classes/class.ilECSAuth.php';
284  include_once './Services/WebServices/ECS/classes/class.ilECSConnector.php';
285  include_once './Services/WebServices/ECS/classes/class.ilECSImport.php';
286  include_once './Services/WebServices/ECS/classes/class.ilECSSetting.php';
287 
288  try {
289  $server_id = ilECSImport::lookupServerId($this->getId());
290  $import_info = new ilECSImport($server_id, $this->getId());
291 
292  $connector = new ilECSConnector(ilECSSetting::getInstanceByServerId($server_id));
293  $auth = new ilECSAuth();
294  $auth->setPid($import_info->getMID());
295  // URL is deprecated
296  $auth->setUrl($this->getRemoteLink());
297  $realm = sha1($a_plain_realm);
298  $GLOBALS['ilLog']->write(__METHOD__ . ': Using realm ' . $a_plain_realm);
299  $auth->setRealm($realm);
300  $GLOBALS['ilLog']->write(__METHOD__ . ' Mid is ' . $this->getMID());
301  $this->auth_hash = $connector->addAuth(@json_encode($auth), $this->getMID());
302  return $this->auth_hash;
303  } catch (ilECSConnectorException $exc) {
304  $ilLog->write(__METHOD__ . ': Caught error from ECS Auth resource: ' . $exc->getMessage());
305  return false;
306  }
307  }
308 
312  public function doCreate()
313  {
314  global $ilDB;
315 
316  $fields = array(
317  "obj_id" => array("integer", $this->getId()),
318  "local_information" => array("text", ""),
319  "remote_link" => array("text", ""),
320  "mid" => array("integer", 0),
321  "organization" => array("text", "")
322  );
323 
324  $this->doCreateCustomFields($fields);
325 
326  $ilDB->insert($this->getTableName(), $fields);
327  }
328 
333  protected function doCreateCustomFields(array &$a_fields)
334  {
335  }
336 
340  public function doUpdate()
341  {
342  global $ilDB;
343 
344  $fields = array(
345  "local_information" => array("text", $this->getLocalInformation()),
346  "remote_link" => array("text", $this->getRemoteLink()),
347  "mid" => array("integer", $this->getMID()),
348  "organization" => array("text", $this->getOrganization())
349  );
350 
351  $this->doUpdateCustomFields($fields);
352 
353  $where = array("obj_id" => array("integer", $this->getId()));
354 
355  $ilDB->update($this->getTableName(), $fields, $where);
356  }
357 
362  protected function doUpdateCustomFields(array &$a_fields)
363  {
364  }
365 
369  public function doDelete()
370  {
371  global $ilDB;
372 
373  //put here your module specific stuff
374  include_once('./Services/WebServices/ECS/classes/class.ilECSImport.php');
376 
377  $query = "DELETE FROM " . $this->getTableName() .
378  " WHERE obj_id = " . $this->db->quote($this->getId(), 'integer') . " ";
379  $ilDB->manipulate($query);
380  }
381 
385  public function doRead()
386  {
387  $query = "SELECT * FROM " . $this->getTableName() .
388  " WHERE obj_id = " . $this->db->quote($this->getId(), 'integer') . " ";
389  $res = $this->db->query($query);
390  while ($row = $res->fetchRow(ilDBConstants::FETCHMODE_OBJECT)) {
391  $this->setLocalInformation($row->local_information);
392  $this->setRemoteLink($row->remote_link);
393  $this->setMID($row->mid);
394  $this->setOrganization($row->organization);
395 
396  $this->doReadCustomFields($row);
397  }
398  }
399 
404  protected function doReadCustomFields($a_row)
405  {
406  }
407 
415  public function createFromECSEContent(ilECSSetting $a_server, $a_ecs_content, $a_owner)
416  {
417  $this->create();
418 
419  // won't work for personal workspace
420  $this->createReference();
421  $this->setPermissions($a_server->getImportId());
422 
423  include_once './Services/WebServices/ECS/classes/class.ilECSUtils.php';
424  $matchable_content = ilECSUtils::getMatchableContent(
425  $this->getECSObjectType(),
426  $a_server->getServerId(),
427  $a_ecs_content,
428  $a_owner
429  );
430 
431  include_once './Services/WebServices/ECS/classes/class.ilECSCategoryMapping.php';
433  $a_server->getServerId(),
434  $matchable_content
435  ));
436 
437  $this->updateFromECSContent($a_server, $a_ecs_content, $a_owner);
438  }
439 
447  public function updateFromECSContent(ilECSSetting $a_server, $a_ecs_content, $a_owner)
448  {
449  global $ilLog;
450 
451  $ilLog->write('updateFromECSContent: ' . print_r($a_ecs_content, true));
452 
453  // Get organisation for owner (ObjectListGUI performance)
454  $organisation = null;
455  if ($a_owner) {
456  include_once './Services/WebServices/ECS/classes/class.ilECSUtils.php';
457  $organisation = ilECSUtils::lookupParticipantName($a_owner, $a_server->getServerId());
458  $ilLog->write('found organisation: ' . $organisation);
459  }
460 
461  $this->setMID($a_owner); // obsolete?
462  $this->setOrganization($organisation);
463  $this->setTitle($a_ecs_content->title);
464  $this->setDescription($a_ecs_content->abstract);
465  $this->setRemoteLink($a_ecs_content->url);
466 
467  $ilLog->write('updateCustomFromECSContent');
468  $this->updateCustomFromECSContent($a_server, $a_ecs_content);
469 
470  // we are updating late so custom values can be set
471 
472  $ilLog->write('ilObject->update()');
473  $this->update();
474 
475  include_once './Services/WebServices/ECS/classes/class.ilECSUtils.php';
476  $matchable_content = ilECSUtils::getMatchableContent(
477  $this->getECSObjectType(),
478  $a_server->getServerId(),
479  $a_ecs_content,
480  $a_owner
481  );
482 
483  // rule-based category mapping
484  include_once './Services/WebServices/ECS/classes/class.ilECSCategoryMapping.php';
486  $this->getId(),
487  $a_server->getServerId(),
488  $matchable_content
489  );
490  }
491 
500  protected function importMetadataFromJson($a_json, ilECSSetting $a_server, array $a_definition, $a_mapping_mode)
501  {
502  global $ilLog;
503 
504  $ilLog->write("importing metadata from json: " . print_r($a_json, true));
505 
506  include_once('./Services/WebServices/ECS/classes/class.ilECSDataMappingSettings.php');
507  include_once('./Services/AdvancedMetaData/classes/class.ilAdvancedMDValues.php');
508  include_once('./Services/AdvancedMetaData/classes/class.ilAdvancedMDFieldDefinition.php');
509 
511  $values_records = ilAdvancedMDValues::getInstancesForObjectId($this->getId(), $this->getType());
512  foreach ($values_records as $values_record) {
513  // this correctly binds group and definitions
514  $values_record->read();
515  }
516 
517  $do_save = false;
518 
519  foreach ($a_definition as $id => $type) {
520  if (is_array($type)) {
521  $target = $type[1];
522  $type = $type[0];
523  } else {
524  $target = $id;
525  }
526 
527  $timePlace = null;
528  if ($field = $mappings->getMappingByECSName($a_mapping_mode, $id)) {
529  // find element in records
530  $adv_md_def = null;
531  foreach ($values_records as $values_record) {
532  $adv_md_defs = $values_record->getDefinitions();
533  if (isset($adv_md_defs[$field])) {
534  $adv_md_def = $adv_md_defs[$field];
535  break;
536  }
537  }
538  if (!$adv_md_def) {
539  continue;
540  }
541 
542  $raw_value = $a_json->$target;
543 
545  if (!is_object($timePlace)) {
546  include_once('./Services/WebServices/ECS/classes/class.ilECSTimePlace.php');
547  if (is_object($raw_value)) {
548  $timePlace = new ilECSTimePlace();
549  $timePlace->loadFromJSON($raw_value);
550  } else {
551  $timePlace = new ilECSTimePlace();
552  }
553  }
554  $raw_value = $timePlace;
555  }
556 
557  if ($adv_md_def->importFromECS($type, $raw_value, $id)) {
558  $do_save = true;
559  }
560  }
561  }
562 
563  if ($do_save) {
564  foreach ($values_records as $values_record) {
565  $additional = array();
566  foreach ($values_record->getADTGroup()->getElements() as $element_id => $element) {
567  if (!$element->isNull()) {
568  $additional[$element_id] = array("disabled"=>array("integer", 1));
569  }
570  }
571  $values_record->write($additional);
572  }
573  }
574  }
575 
582  protected function updateCustomFromECSContent(ilECSSetting $a_server, $ecs_content)
583  {
584  }
585 
591  public function isLocalObject()
592  {
593  include_once('./Services/WebServices/ECS/classes/class.ilECSExport.php');
594  include_once('./Services/WebServices/ECS/classes/class.ilECSImport.php');
598  )) {
599  return false;
600  }
601  return true;
602  }
603 
613  public function handleCreate(ilECSSetting $a_server, $a_econtent_id, array $a_mids)
614  {
615  return $this->handleUpdate($a_server, $a_econtent_id, $a_mids);
616  }
617 
628  public function handleUpdate(ilECSSetting $a_server, $a_econtent_id, array $a_mids)
629  {
630  global $ilLog;
631 
632  // get content details
633  include_once('./Services/WebServices/ECS/classes/class.ilECSEContentDetails.php');
635  $a_server->getServerId(),
636  $a_econtent_id,
637  $this->getECSObjectType()
638  );
639  if (!$details instanceof ilECSEContentDetails) {
640  $this->handleDelete($a_server, $a_econtent_id);
641  $ilLog->write(__METHOD__ . ': Handling delete of deprecated remote object. DONE');
642  return;
643  }
644 
645  $ilLog->write(__METHOD__ . ': Receivers are ' . print_r($details->getReceivers(), true));
646  $ilLog->write(__METHOD__ . ': Senders are ' . print_r($details->getSenders(), true));
647 
648  // check owner (sender mid)
649  include_once('./Services/WebServices/ECS/classes/class.ilECSParticipantSettings.php');
650  if (!ilECSParticipantSettings::getInstanceByServerId($a_server->getServerId())->isImportAllowed($details->getSenders())) {
651  $ilLog->write('Ignoring disabled participant. MID: ' . $details->getOwner());
652  return true;
653  }
654 
655  // new mids
656  include_once 'Services/WebServices/ECS/classes/class.ilECSImport.php';
657  include_once 'Services/WebServices/ECS/classes/class.ilECSConnector.php';
658  foreach (array_intersect($a_mids, $details->getReceivers()) as $mid) {
659  try {
660  $connector = new ilECSConnector($a_server);
661  $res = $connector->getResource($this->getECSObjectType(), $a_econtent_id);
662  if ($res->getHTTPCode() == ilECSConnector::HTTP_CODE_NOT_FOUND) {
663  continue;
664  }
665  $json = $res->getResult();
666  $GLOBALS['ilLog']->write(__METHOD__ . ': Received json: ' . print_r($json, true));
667  if (!is_object($json)) {
668  // try as array (workaround for invalid content)
669  $json = $json[0];
670  if (!is_object($json)) {
671  throw new ilECSConnectorException('invalid json');
672  }
673  }
674  } catch (ilECSConnectorException $exc) {
675  $ilLog->write(__METHOD__ . ': Error parsing result. ' . $exc->getMessage());
676  $ilLog->logStack();
677  return false;
678  }
679 
680  // Update existing
681 
682  // Check receiver mid
683  if ($obj_id = ilECSImport::_isImported($a_server->getServerId(), $a_econtent_id, $mid)) {
684  $ilLog->write(__METHOD__ . ': Handling update for existing object');
685  $remote = ilObjectFactory::getInstanceByObjId($obj_id, false);
686  if (!$remote instanceof ilRemoteObjectBase) {
687  $ilLog->write(__METHOD__ . ': Cannot instantiate remote object. Got object type ' . $remote->getType());
688  continue;
689  }
690  $remote->updateFromECSContent($a_server, $json, $details->getMySender());
691  } else {
692  $GLOBALS['ilLog']->write(__METHOD__ . ': my sender ' . $details->getMySender() . 'vs mid' . $mid);
693 
694  $ilLog->write(__METHOD__ . ': Handling create for non existing object');
695  $this->createFromECSEContent($a_server, $json, $details->getMySender());
696 
697  // update import status
698  $ilLog->write(__METHOD__ . ': Updating import status');
699  include_once('./Services/WebServices/ECS/classes/class.ilECSImport.php');
700  $import = new ilECSImport($a_server->getServerId(), $this->getId());
701  $import->setEContentId($a_econtent_id);
702  // Store receiver mid
703  $import->setMID($mid);
704  $import->save();
705 
706  $ilLog->write(__METHOD__ . ': Sending notification');
707  $this->sendNewContentNotification($a_server->getServerId());
708  }
709  }
710 
711  $ilLog->write(__METHOD__ . ': done');
712  return true;
713  }
714 
718  protected function sendNewContentNotification($a_server_id)
719  {
720  include_once('Services/WebServices/ECS/classes/class.ilECSSetting.php');
721  $settings = ilECSSetting::getInstanceByServerId($a_server_id);
722  if (!count($rcps = $settings->getEContentRecipients())) {
723  return;
724  }
725 
726  include_once('./Services/Mail/classes/class.ilMail.php');
727  include_once('./Services/Language/classes/class.ilLanguageFactory.php');
728 
730  $lang->loadLanguageModule('ecs');
731 
732  $mail = new ilMail(self::MAIL_SENDER);
733  $message = $lang->txt('ecs_' . $this->getType() . '_created_body_a') . "\n\n";
734  $message .= $lang->txt('title') . ': ' . $this->getTitle() . "\n";
735  if (strlen($desc = $this->getDescription())) {
736  $message .= $lang->txt('desc') . ': ' . $desc . "\n";
737  }
738 
739  include_once('./Services/Link/classes/class.ilLink.php');
740  $href = ilLink::_getStaticLink($this->getRefId(), $this->getType(), true);
741  $message .= $lang->txt("perma_link") . ': ' . $href . "\n\n";
743 
744  $mail->sendMail(
745  $settings->getEContentRecipientsAsString(),
746  '',
747  '',
748  $lang->txt('ecs_new_econtent_subject'),
749  $message,
750  array(),
751  array('normal')
752  );
753  }
754 
765  public function handleDelete(ilECSSetting $a_server, $a_econtent_id, $a_mid = 0)
766  {
767  global $tree, $ilLog;
768 
769 
770  include_once('./Services/WebServices/ECS/classes/class.ilECSImport.php');
771 
772  // there is no information about the original mid anymore.
773  // Therefor delete any remote objects with given econtent id
774  $obj_ids = ilECSImport::_lookupObjIds($a_server->getServerId(), $a_econtent_id);
775  $ilLog->write(__METHOD__ . ': Received obj_ids ' . print_r($obj_ids, true));
776 
777  foreach ($obj_ids as $obj_id) {
778  $references = ilObject::_getAllReferences($obj_id);
779  foreach ($references as $ref_id) {
780  if ($tmp_obj = ilObjectFactory::getInstanceByRefId($ref_id, false)) {
781  $ilLog->write(__METHOD__ . ': Deleting obsolete remote course: ' . $tmp_obj->getTitle());
782  $tmp_obj->delete();
783  $tree->deleteTree($tree->getNodeData($ref_id));
784  }
785  unset($tmp_obj);
786  }
787  }
788  return true;
789  }
790 
798  public function getAllResourceIds(ilECSSetting $a_server, $a_sender_only = false)
799  {
800  global $ilLog;
801 
802  try {
803  include_once './Services/WebServices/ECS/classes/class.ilECSConnector.php';
804  $connector = new ilECSConnector($a_server);
805  $connector->addHeader('X-EcsQueryStrings', $a_sender_only ? 'sender=true' : 'all=true'); // #11301
806  $list = $connector->getResourceList($this->getECSObjectType());
807  if ($list instanceof ilECSResult) {
808  return $list->getResult()->getLinkIds();
809  }
810  } catch (ilECSConnectorException $exc) {
811  $ilLog->write(__METHOD__ . ': Error getting resource list. ' . $exc->getMessage());
812  }
813  }
814 }
Remote test app class.
static getInstancesForObjectId($a_obj_id, $a_obj_type=null, $a_sub_type="-", $a_sub_id=0)
Get instances for given object id.
$auth
Definition: metadata.php:48
doDelete()
Delete remote object.
sendNewContentNotification($a_server_id)
send notifications about new EContent
static getInstanceByServerId($a_server_id)
Get singleton instance.
putInTree($a_parent_ref)
static lookupParticipantName($a_owner, $a_server_id)
Lookup participant name.
if(isset($_REQUEST['delete'])) $list
Definition: registry.php:41
getTableName()
Get db table name.
getOrganization()
get organization
static _lookupEContentId($a_obj_id)
get econent_id
static getInstanceByServerId($a_server_id)
Get singleton instance per server.
doCreateCustomFields(array &$a_fields)
Add custom fields to db insert.
getRemoteLink()
get remote link
setDescription($a_desc)
static _isRemote($a_server_id, $a_econtent_id)
is remote object
Representation of ECS EContent Time Place.
Remote file app class.
Remote glossary app class.
__construct($a_id=0, $a_call_by_reference=true)
Constructor.
getServerId()
Get current server id.
handleCreate(ilECSSetting $a_server, $a_econtent_id, array $a_mids)
Handle creation.
doUpdateCustomFields(array &$a_fields)
Add custom fields to db update.
$GLOBALS['loaded']
Global hash that tracks already loaded includes.
static _lookupMID($a_obj_id)
lookup owner mid
handleDelete(ilECSSetting $a_server, $a_econtent_id, $a_mid=0)
Handle delete event.
static handleUpdate($a_obj_id, $a_server_id, $a_matchable_content)
Handle update of ecs content and create references.
setRemoteLink($a_link)
set remote link
updateCustomFromECSContent(ilECSSetting $a_server, $ecs_content)
update remote object settings from ecs content
Presentation of ecs content details (http://...campusconnect/courselinks/id/details) ...
Remote learning module app class.
getImportId()
get import id
setPermissions($a_parent_ref)
getECSObjectType()
Get ECS resource identifier, e.g.
doReadCustomFields($a_row)
Read custom fields from db row.
getRealmPlain()
Get realm plain.
static _deleteByObjId($a_obj_id)
Delete by obj_id.
static getInstanceByEventType($a_type)
Get instance by ilECSEvent(QueueReader) type.
Remote wiki app class.
static _getAllReferences($a_id)
get all reference ids of object
importMetadataFromJson($a_json, ilECSSetting $a_server, array $a_definition, $a_mapping_mode)
Add advanced metadata to json (export)
static getInstanceByServerId($a_server_id)
Get instance by server id.
isLocalObject()
Is remote object from same installation?
const TYPE_TIMEPLACE
setOwner($a_owner)
static getMatchableContent($a_resource_id, $a_server_id, $a_ecs_content, $a_owner)
Convert ECS content to rule matchable values.
$a_type
Definition: workflow.php:92
static _getLanguage($a_lang_key='')
Get langauge object.
catch(Exception $e) $message
setOrganization($a_organization)
set organization
create()
create
foreach($_POST as $key=> $value) $res
setLocalInformation($a_info)
set local information
static getMatchingCategory($a_server_id, $a_matchable_content)
get matching category
This class handles base functions for mail handling.
getFullRemoteLink()
get full remote link Including ecs generated hash and auth mode
Storage of ECS imported objects.
static _isImported($a_server_id, $a_econtent_id, $a_mid, $a_sub_id=null)
check if econtent is imported for a specific mid
$ilUser
Definition: imgupload.php:18
$query
setTitle($a_title)
static lookupServerId($a_obj_id)
Lookup server id of imported content <type> $ilDB.
Remote object app base class.
Remote course app class.
$additional
Definition: goto.php:50
static getInstanceByObjId($a_obj_id, $stop_on_error=true)
get an instance of an Ilias object by object id
Create styles array
The data for the language used.
Remote group app class.
$server
Definition: getUserInfo.php:12
static _lookupOrganization($a_obj_id)
lookup organization
createAuthResource($a_plain_realm)
create authentication resource on ecs server
handleUpdate(ilECSSetting $a_server, $a_econtent_id, array $a_mids)
Handle update event.
static _lookupObjIds($a_server_id, $a_econtent_id)
Lookup obj_id.
global $ilDB
static _getAutoGeneratedMessageString(ilLanguage $lang=null)
Get auto generated info string.
setEContentId($a_id)
set econtent id
static getInstanceByRefId($a_ref_id, $stop_on_error=true)
get an instance of an Ilias object by reference id
doUpdate()
Update remote object.
Class ilObject2 This is an intermediate progress of ilObject class.
createFromECSEContent(ilECSSetting $a_server, $a_ecs_content, $a_owner)
create remote object from ECSContent object
Remote category app class.
static getInstance($a_server_id, $a_econtent_id, $a_resource_type)
Get data from server.
getAllResourceIds(ilECSSetting $a_server, $a_sender_only=false)
Get all available resources.
Stores relevant user data.
doCreate()
Create remote object.
updateFromECSContent(ilECSSetting $a_server, $a_ecs_content, $a_owner)
update remote object settings from ecs content
getLocalInformation()
get local information