ILIAS  release_9 Revision v9.13-25-g2c18ec4c24f
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 35 of file class.ilSoapDataCollectionAdministration.php.

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

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

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