ILIAS  release_8 Revision v8.23
ilSoapDataCollectionAdministration Class Reference

Soap data-collection administration methods. More...

+ Inheritance diagram for ilSoapDataCollectionAdministration:
+ Collaboration diagram for ilSoapDataCollectionAdministration:

Public Member Functions

 exportDataCollectionContent (string $sid, int $target_ref_id, ?int $table_id=null, string $format=ilDclContentExporter::EXPORT_EXCEL, ?string $filepath=null)
 Export DataCollection async. More...
 
- Public Member Functions inherited from ilSoapAdministration
 __construct (bool $use_nusoap=true)
 
 getMessage ()
 
 appendMessage (string $a_str)
 
 setMessageCode (string $a_code)
 
 getMessageCode ()
 
 reInitUser ()
 
 isFault ($object)
 
 getInstallationInfoXML ()
 
 getClientInfoXML (string $clientid)
 

Additional Inherited Members

- Data Fields inherited from ilSoapAdministration
const NUSOAP = 1
 
const PHP5 = 2
 
int $error_method
 Defines type of error handling (PHP5 || NUSOAP) More...
 
- Protected Member Functions inherited from ilSoapAdministration
 checkSession (string $sid)
 
 explodeSid (string $sid)
 
 setMessage (string $a_str)
 
 initAuth (string $sid)
 
 initIlias ()
 
 initAuthenticationObject ()
 
 raiseError (string $a_message, $a_code)
 
 checkObjectAccess (int $ref_id, array $expected_type, string $permission, bool $returnObject=false)
 check access for ref id: expected type, permission, return object instance if returnobject is true More...
 
- Protected Attributes inherited from ilSoapAdministration
bool $soap_check = true
 
string $message = ''
 
string $message_code = ''
 

Detailed Description

Soap data-collection administration methods.

Author
Michael Herren mh@st.nosp@m.uder.nosp@m.-raim.nosp@m.ann..nosp@m.ch

Definition at line 29 of file class.ilSoapDataCollectionAdministration.php.

Member Function Documentation

◆ exportDataCollectionContent()

ilSoapDataCollectionAdministration::exportDataCollectionContent ( string  $sid,
int  $target_ref_id,
?int  $table_id = null,
string  $format = ilDclContentExporter::EXPORT_EXCEL,
?string  $filepath = null 
)

Export DataCollection async.

Returns
soap_fault|SoapFault|null|bool

Definition at line 36 of file class.ilSoapDataCollectionAdministration.php.

References $format, ilObject\_isInTrash(), ilSoapAdministration\checkSession(), ilSoapAdministration\getMessage(), ilSoapAdministration\getMessageCode(), ilObjDataCollectionAccess\hasReadAccess(), ilSoapAdministration\initAuth(), ilSoapAdministration\initIlias(), and ilSoapAdministration\raiseError().

42  {
43  $this->initAuth($sid);
44  $this->initIlias();
45  if (!$this->checkSession($sid)) {
46  return $this->raiseError($this->getMessage(), $this->getMessageCode());
47  }
48 
49  require_once "Modules/DataCollection/classes/class.ilObjDataCollection.php";
50  if (!$target_obj = new ilObjDataCollection($target_ref_id)) {
51  return $this->raiseError('No valid target given.', 'CLIENT');
52  }
53 
54  if (ilObject::_isInTrash($target_ref_id)) {
55  return $this->raiseError(
56  "Parent with ID $target_ref_id has been deleted.",
57  'CLIENT_TARGET_DELETED'
58  );
59  }
60 
61  if (!ilObjDataCollectionAccess::hasReadAccess($target_ref_id)) {
62  return $this->raiseError(
63  'Check access failed. No permission to read DataCollection',
64  "CLIENT_PERMISSION_ISSUE"
65  );
66  }
67 
68  try {
69  require_once "Modules/DataCollection/classes/Content/class.ilDclContentExporter.php";
70  $exporter = new ilDclContentExporter($target_ref_id, $table_id);
71  return $exporter->export($format, $filepath);
72  } catch (ilException $exception) {
73  return $this->raiseError($exception->getMessage(), $exception->getCode());
74  }
75  }
raiseError(string $a_message, $a_code)
static _isInTrash(int $ref_id)
$format
Definition: metadata.php:235
static hasReadAccess(int $ref, ?int $user_id=0)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
+ Here is the call graph for this function:

The documentation for this class was generated from the following file: