ILIAS
release_5-4 Revision v5.4.26-12-gabc799a52e6
◀ ilDoc Overview
class.ilLearningSequenceExporter.php
Go to the documentation of this file.
1
<?
php
2
3
declare(strict_types=1);
4
8
class
ilLearningSequenceExporter
extends
ilXmlExporter
9
{
10
public
function
init
()
11
{
12
global
$DIC
;
13
14
$this->
settings
= $DIC[
"ilSetting"
];
15
$this->rbac_review = $DIC[
"rbacreview"
];
16
}
17
18
public
function
getXmlRepresentation
($entity, $target_release, $obj_id)
19
{
20
$writer = $this->
getWriter
((
int
) $obj_id);
21
$writer->start();
22
23
return
$writer->getXml();
24
}
25
26
protected
function
getWriter
(
int
$obj_id) :
ilLearningSequenceXMLWriter
27
{
28
if
(
$type
=
ilObject::_lookupType
($obj_id) !=
"lso"
) {
29
throw
new
Exception
(
"Wrong type "
.
$type
.
" for lso export."
);
30
}
31
32
$ls_ref_id = end(
ilObject::_getAllReferences
($obj_id));
33
$ls_object =
ilObjectFactory::getInstanceByRefId
($ls_ref_id,
false
);
34
$lp_settings =
new
ilLPObjSettings
($obj_id);
35
36
return
new
ilLearningSequenceXMLWriter
(
37
$ls_object,
38
$this->
settings
,
39
$lp_settings,
40
$this->rbac_review
41
);
42
}
43
44
public
function
getValidSchemaVersions
($entity)
45
{
46
return
array(
47
"5.4.0"
=> array(
48
"namespace"
=>
"http://www.ilias.de/Modules/LearningSequence/lso/5_4"
,
49
"xsd_file"
=>
"ilias_lso_5_4.xsd"
,
50
"uses_dataset"
=>
false
,
51
"min"
=>
"5.4.0"
,
52
"max"
=>
""
53
)
54
);
55
}
56
57
public
function
getXmlExportHeadDependencies
($entity, $target_release, $ids)
58
{
59
return
array(
60
array(
61
'component'
=>
'Services/Container'
,
62
'entity'
=>
'struct'
,
63
'ids'
=> $ids
64
)
65
);
66
}
67
71
public
function
getXmlExportTailDependencies
($a_entity, $a_target_release, $a_ids)
72
{
73
$res
= [];
74
75
if
($a_entity ==
"lso"
) {
76
// service settings
77
$res
[] = array(
78
"component"
=>
"Services/Object"
,
79
"entity"
=>
"common"
,
80
"ids"
=> $a_ids
81
);
82
}
83
84
return
$res
;
85
}
86
87
}
settings
settings()
Definition:
settings.php:2
$type
$type
Definition:
proxy_ylocal.php:10
$DIC
global $DIC
Definition:
saml.php:7
ilLearningSequenceXMLWriter
Definition:
class.ilLearningSequenceXMLWriter.php:8
ilObject\_getAllReferences
static _getAllReferences($a_id)
get all reference ids of object
Definition:
class.ilObject.php:965
ilXmlExporter
Xml Exporter class.
Definition:
class.ilXmlExporter.php:11
$res
foreach($_POST as $key=> $value) $res
Definition:
save_question_post_data.php:15
ilLearningSequenceExporter\getWriter
getWriter(int $obj_id)
Definition:
class.ilLearningSequenceExporter.php:26
ilLearningSequenceExporter
Definition:
class.ilLearningSequenceExporter.php:8
ilLearningSequenceExporter\getValidSchemaVersions
getValidSchemaVersions($entity)
Definition:
class.ilLearningSequenceExporter.php:44
ilLearningSequenceExporter\getXmlRepresentation
getXmlRepresentation($entity, $target_release, $obj_id)
Definition:
class.ilLearningSequenceExporter.php:18
ilLearningSequenceExporter\getXmlExportHeadDependencies
getXmlExportHeadDependencies($entity, $target_release, $ids)
Definition:
class.ilLearningSequenceExporter.php:57
ilObject\_lookupType
static _lookupType($a_id, $a_reference=false)
lookup object type
Definition:
class.ilObject.php:1275
ilLPObjSettings
Definition:
class.ilLPObjSettings.php:14
ilObjectFactory\getInstanceByRefId
static getInstanceByRefId($a_ref_id, $stop_on_error=true)
get an instance of an Ilias object by reference id
Definition:
class.ilObjectFactory.php:141
php
ilLearningSequenceExporter\init
init()
Definition:
class.ilLearningSequenceExporter.php:10
ilLearningSequenceExporter\getXmlExportTailDependencies
getXmlExportTailDependencies($a_entity, $a_target_release, $a_ids)
Definition:
class.ilLearningSequenceExporter.php:71
Exception
Modules
LearningSequence
classes
class.ilLearningSequenceExporter.php
Generated on Thu Jan 16 2025 19:02:05 for ILIAS by
1.8.13 (using
Doxyfile
)