ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ilSoapDataCollectionAdministration Class Reference

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V. 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

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V.

ILIAS is licensed with the GPL-3.0, see https://www.gnu.org/licenses/gpl-3.0.en.html You should have received a copy of said license along with the source code, too.

If this is not the case or you just want to try ILIAS, you'll find us at: https://www.ilias.de https://github.com/ILIAS-eLearning 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 22 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 28 of file class.ilSoapDataCollectionAdministration.php.

34 {
35 $this->initAuth($sid);
36 $this->initIlias();
37 if (!$this->checkSession($sid)) {
38 return $this->raiseError($this->getMessage(), $this->getMessageCode());
39 }
40
41 if (!$target_obj = new ilObjDataCollection($target_ref_id)) {
42 return $this->raiseError('No valid target given.', 'CLIENT');
43 }
44
45 if (ilObject::_isInTrash($target_ref_id)) {
46 return $this->raiseError(
47 "Parent with ID $target_ref_id has been deleted.",
48 'CLIENT_TARGET_DELETED'
49 );
50 }
51
52 if (!ilObjDataCollectionAccess::hasReadAccess($target_ref_id)) {
53 return $this->raiseError(
54 'Check access failed. No permission to read DataCollection',
55 "CLIENT_PERMISSION_ISSUE"
56 );
57 }
58
59 try {
60 $exporter = new ilDclContentExporter($target_ref_id, $table_id);
61 return $exporter->export($format, $filepath);
62 } catch (ilException $exception) {
63 return $this->raiseError($exception->getMessage(), $exception->getCode());
64 }
65 }
Hook-Class for exporting data-collections (used in SOAP-Class) This Class avoids duplicated code by r...
Base class for ILIAS Exception handling.
static hasReadAccess(int $ref, ?int $user_id=0)
static _isInTrash(int $ref_id)
raiseError(string $a_message, $a_code)

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

+ Here is the call graph for this function:

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