ILIAS
release_10 Revision v10.1-43-ga1241a92c2f
◀ ilDoc Overview
class.ilSoapDataCollectionAdministration.php
Go to the documentation of this file.
1
<?php
2
/*
3
+-----------------------------------------------------------------------------+
4
| ILIAS open source |
5
+-----------------------------------------------------------------------------+
6
| Copyright (c) 1998-2006 ILIAS open source, University of Cologne |
7
| |
8
| This program is free software; you can redistribute it and/or |
9
| modify it under the terms of the GNU General Public License |
10
| as published by the Free Software Foundation; either version 2 |
11
| of the License, or (at your option) any later version. |
12
| |
13
| This program is distributed in the hope that it will be useful, |
14
| but WITHOUT ANY WARRANTY; without even the implied warranty of |
15
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
16
| GNU General Public License for more details. |
17
| |
18
| You should have received a copy of the GNU General Public License |
19
| along with this program; if not, write to the Free Software |
20
| Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
21
+-----------------------------------------------------------------------------+
22
*/
23
28
class
ilSoapDataCollectionAdministration
extends
ilSoapAdministration
29
{
34
public
function
exportDataCollectionContent
(
35
string
$sid,
36
int
$target_ref_id,
37
?
int
$table_id = null,
38
string
$format =
ilDclContentExporter::EXPORT_EXCEL
,
39
?
string
$filepath = null
40
) {
41
$this->
initAuth
($sid);
42
$this->
initIlias
();
43
if
(!$this->
checkSession
($sid)) {
44
return
$this->
raiseError
($this->
getMessage
(), $this->
getMessageCode
());
45
}
46
47
if
(!$target_obj =
new
ilObjDataCollection
($target_ref_id)) {
48
return
$this->
raiseError
(
'No valid target given.'
,
'CLIENT'
);
49
}
50
51
if
(
ilObject::_isInTrash
($target_ref_id)) {
52
return
$this->
raiseError
(
53
"Parent with ID $target_ref_id has been deleted."
,
54
'CLIENT_TARGET_DELETED'
55
);
56
}
57
58
if
(!
ilObjDataCollectionAccess::hasReadAccess
($target_ref_id)) {
59
return
$this->
raiseError
(
60
'Check access failed. No permission to read DataCollection'
,
61
"CLIENT_PERMISSION_ISSUE"
62
);
63
}
64
65
try
{
66
$exporter =
new
ilDclContentExporter
($target_ref_id, $table_id);
67
return
$exporter->export($format, $filepath);
68
}
catch
(
ilException
$exception) {
69
return
$this->
raiseError
($exception->getMessage(), $exception->getCode());
70
}
71
}
72
}
ilException
ilDclContentExporter\EXPORT_EXCEL
const EXPORT_EXCEL
Definition:
class.ilDclContentExporter.php:29
ilSoapAdministration\getMessageCode
getMessageCode()
Definition:
class.ilSoapAdministration.php:131
ilSoapDataCollectionAdministration
Soap data-collection administration methods.
Definition:
class.ilSoapDataCollectionAdministration.php:28
ilSoapAdministration\raiseError
raiseError(string $a_message, $a_code)
Definition:
class.ilSoapAdministration.php:186
ilSoapAdministration
ilSoapDataCollectionAdministration\exportDataCollectionContent
exportDataCollectionContent(string $sid, int $target_ref_id, ?int $table_id=null, string $format=ilDclContentExporter::EXPORT_EXCEL, ?string $filepath=null)
Export DataCollection async.
Definition:
class.ilSoapDataCollectionAdministration.php:34
ilSoapAdministration\initAuth
initAuth(string $sid)
Definition:
class.ilSoapAdministration.php:136
ilSoapAdministration\checkSession
checkSession(string $sid)
Definition:
class.ilSoapAdministration.php:59
ilObject\_isInTrash
static _isInTrash(int $ref_id)
Definition:
class.ilObject.php:1096
ilObjDataCollectionAccess\hasReadAccess
static hasReadAccess(int $ref, ?int $user_id=0)
Definition:
class.ilObjDataCollectionAccess.php:240
ilDclContentExporter
Hook-Class for exporting data-collections (used in SOAP-Class) This Class avoids duplicated code by r...
Definition:
class.ilDclContentExporter.php:26
ilSoapAdministration\initIlias
initIlias()
Definition:
class.ilSoapAdministration.php:156
ilSoapAdministration\getMessage
getMessage()
Definition:
class.ilSoapAdministration.php:115
ilObjDataCollection
Definition:
class.ilObjDataCollection.php:22
components
ILIAS
soap
classes
class.ilSoapDataCollectionAdministration.php
Generated on Wed Sep 10 2025 15:16:22 for ILIAS by
1.8.13 (using
Doxyfile
)