ILIAS
release_5-3 Revision v5.3.23-19-g915713cf615
◀ 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
require_once(
'./webservice/soap/classes/class.ilSoapAdministration.php'
);
24
25
33
class
ilSoapDataCollectionAdministration
extends
ilSoapAdministration
34
{
35
47
public
function
exportDataCollectionContent
($sid, $target_ref_id, $table_id = null,
$format
=
ilDclContentExporter::EXPORT_EXCEL
, $filepath = null)
48
{
49
$this->
initAuth
($sid);
50
$this->
initIlias
();
51
if
(!$this->__checkSession($sid)) {
52
return
$this->
__raiseError
($this->
__getMessage
(), $this->
__getMessageCode
());
53
}
54
55
require_once
"Modules/DataCollection/classes/class.ilObjDataCollection.php"
;
56
if
(!$target_obj =
new
ilObjDataCollection
($target_ref_id)) {
57
return
$this->
__raiseError
(
'No valid target given.'
,
'CLIENT'
);
58
}
59
60
if
(
ilObject::_isInTrash
($target_ref_id)) {
61
return
$this->
__raiseError
(
62
"Parent with ID $target_ref_id has been deleted."
,
63
'CLIENT_TARGET_DELETED'
64
);
65
}
66
67
if
(!
ilObjDataCollectionAccess::hasReadAccess
($target_ref_id)) {
68
return
$this->
__raiseError
(
69
'Check access failed. No permission to read DataCollection'
,
70
"CLIENT_PERMISSION_ISSUE"
71
);
72
}
73
74
try
{
75
require_once
"Modules/DataCollection/classes/Content/class.ilDclContentExporter.php"
;
76
$exporter =
new
ilDclContentExporter
($target_ref_id, $table_id);
77
return
$exporter->export(
$format
, $filepath);
78
}
catch
(
ilException
$exception) {
79
return
$this->
__raiseError
($exception->getMessage(), $exception->getCode());
80
}
81
}
82
}
ilException
$format
$format
Definition:
metadata.php:141
ilDclContentExporter\EXPORT_EXCEL
const EXPORT_EXCEL
Definition:
class.ilDclContentExporter.php:24
ilSoapDataCollectionAdministration
Definition:
class.ilSoapDataCollectionAdministration.php:33
ilObjDataCollectionAccess\hasReadAccess
static hasReadAccess($ref, $user_id=0)
Definition:
class.ilObjDataCollectionAccess.php:283
ilSoapAdministration
Definition:
class.ilSoapAdministration.php:41
ilObject\_isInTrash
static _isInTrash($a_ref_id)
checks wether object is in trash
Definition:
class.ilObject.php:1219
ilSoapAdministration\__getMessage
__getMessage()
Definition:
class.ilSoapAdministration.php:151
ilSoapAdministration\__raiseError
__raiseError($a_message, $a_code)
Definition:
class.ilSoapAdministration.php:204
ilSoapDataCollectionAdministration\exportDataCollectionContent
exportDataCollectionContent($sid, $target_ref_id, $table_id=null, $format=ilDclContentExporter::EXPORT_EXCEL, $filepath=null)
Export DataCollection async.
Definition:
class.ilSoapDataCollectionAdministration.php:47
ilSoapAdministration\__getMessageCode
__getMessageCode()
Definition:
class.ilSoapAdministration.php:166
ilSoapAdministration\initAuth
initAuth($sid)
Init authentication.
Definition:
class.ilSoapAdministration.php:175
ilDclContentExporter
Hook-Class for exporting data-collections (used in SOAP-Class) This Class avoids duplicated code by r...
Definition:
class.ilDclContentExporter.php:20
ilSoapAdministration\initIlias
initIlias()
Definition:
class.ilSoapAdministration.php:183
ilObjDataCollection
Class ilObjDataCollection.
Definition:
class.ilObjDataCollection.php:16
webservice
soap
classes
class.ilSoapDataCollectionAdministration.php
Generated on Sat Jan 18 2025 19:01:44 for ILIAS by
1.8.13 (using
Doxyfile
)