ILIAS
release_5-2 Revision v5.2.25-18-g3f80b828510
◀ 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
50
$this->
initAuth
($sid);
51
$this->
initIlias
();
52
if
(!$this->__checkSession($sid))
53
{
54
return
$this->
__raiseError
($this->
__getMessage
(), $this->
__getMessageCode
());
55
}
56
57
require_once
"Modules/DataCollection/classes/class.ilObjDataCollection.php"
;
58
if
(!$target_obj =
new
ilObjDataCollection
($target_ref_id))
59
{
60
return
$this->
__raiseError
(
'No valid target given.'
,
'CLIENT'
);
61
}
62
63
if
(
ilObject::_isInTrash
($target_ref_id))
64
{
65
return
$this->
__raiseError
(
"Parent with ID $target_ref_id has been deleted."
,
66
'CLIENT_TARGET_DELETED'
);
67
}
68
69
if
(!
ilObjDataCollectionAccess::hasReadAccess
($target_ref_id))
70
{
71
return
$this->
__raiseError
(
'Check access failed. No permission to read DataCollection'
,
72
"CLIENT_PERMISSION_ISSUE"
);
73
}
74
75
try
{
76
require_once
"Modules/DataCollection/classes/Content/class.ilDclContentExporter.php"
;
77
$exporter =
new
ilDclContentExporter
($target_ref_id, $table_id);
78
return
$exporter->export($format, $filepath);
79
}
80
catch
(
ilException
$exception) {
81
return
$this->
__raiseError
($exception->getMessage(), $exception->getCode());
82
}
83
}
84
85
}
86
?>
ilException
Base class for ILIAS Exception handling.
Definition:
class.ilException.php:34
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:272
ilSoapAdministration
Definition:
class.ilSoapAdministration.php:41
ilObject\_isInTrash
static _isInTrash($a_ref_id)
checks wether object is in trash
Definition:
class.ilObject.php:1190
ilSoapAdministration\__getMessage
__getMessage()
Definition:
class.ilSoapAdministration.php:156
ilSoapAdministration\__raiseError
__raiseError($a_message, $a_code)
Definition:
class.ilSoapAdministration.php:213
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:171
ilSoapAdministration\initAuth
initAuth($sid)
Init authentication.
Definition:
class.ilSoapAdministration.php:180
ilDclContentExporter
Hook-Class for exporting data-collections (used in SOAP-Class) This Class avoids duplicated code by r...
Definition:
class.ilDclContentExporter.php:20
php
ilSoapAdministration\initIlias
initIlias()
Definition:
class.ilSoapAdministration.php:188
ilObjDataCollection
Class ilObjDataCollection.
Definition:
class.ilObjDataCollection.php:19
webservice
soap
classes
class.ilSoapDataCollectionAdministration.php
Generated on Fri Jan 24 2025 19:01:19 for ILIAS by
1.8.13 (using
Doxyfile
)