ILIAS
release_5-4 Revision v5.4.26-12-gabc799a52e6
◀ ilDoc Overview
class.ilECSNodeMappingAssignment.php
Go to the documentation of this file.
1
<?
php
2
/* Copyright (c) 1998-2009 ILIAS open source, Extended GPL, see docs/LICENSE */
3
10
class
ilECSNodeMappingAssignment
11
{
12
private
$server_id
;
13
private
$mid
;
14
private
$cs_root
;
15
private
$cs_id
;
16
private
$ref_id
;
17
private
$obj_id
;
18
19
private
$title_update
=
false
;
20
private
$position_update
=
false
;
21
private
$tree_update
=
false
;
22
23
private
$mapped
=
false
;
24
28
public
function
__construct
($a_server_id,
$mid
,
$cs_root
,
$cs_id
)
29
{
30
$this->server_id = $a_server_id;
31
$this->mid =
$mid
;
32
$this->cs_root =
$cs_root
;
33
$this->cs_id =
$cs_id
;
34
35
$this->
read
();
36
}
37
38
public
function
isMapped
()
39
{
40
return
$this->mapped
;
41
}
42
43
public
function
getServerId
()
44
{
45
return
$this->server_id
;
46
}
47
48
public
function
setServerId
($a_id)
49
{
50
$this->server_id = $a_id;
51
}
52
53
public
function
setMemberId
($a_member_id)
54
{
55
$this->mid = $a_member_id;
56
}
57
58
public
function
getMemberId
()
59
{
60
return
$this->mid
;
61
}
62
63
public
function
getTreeId
()
64
{
65
return
$this->cs_root
;
66
}
67
68
public
function
setTreeId
(
$root
)
69
{
70
$this->cs_root =
$root
;
71
}
72
73
public
function
getCSId
()
74
{
75
return
$this->cs_id
;
76
}
77
78
public
function
setCSId
(
$id
)
79
{
80
$this->cs_id =
$id
;
81
}
82
83
public
function
getRefId
()
84
{
85
return
$this->ref_id
;
86
}
87
88
public
function
setRefId
($a_id)
89
{
90
$this->ref_id = $a_id;
91
}
92
93
public
function
getObjId
()
94
{
95
return
$this->obj_id
;
96
}
97
98
public
function
setObjId
(
$id
)
99
{
100
$this->obj_id =
$id
;
101
}
102
103
public
function
isTitleUpdateEnabled
()
104
{
105
return
$this->title_update
;
106
}
107
108
public
function
enableTitleUpdate
($enabled)
109
{
110
$this->title_update = $enabled;
111
}
112
113
public
function
isPositionUpdateEnabled
()
114
{
115
return
$this->position_update
;
116
}
117
118
public
function
enablePositionUpdate
($enabled)
119
{
120
$this->position_update = $enabled;
121
}
122
123
public
function
isTreeUpdateEnabled
()
124
{
125
return
$this->tree_update
;
126
}
127
128
public
function
enableTreeUpdate
($enabled)
129
{
130
$this->tree_update = $enabled;
131
}
132
136
public
function
update
()
137
{
138
global
$DIC
;
139
140
$ilDB
= $DIC[
'ilDB'
];
141
142
$this->
delete
();
143
$this->
create
();
144
}
145
146
public
function
create
()
147
{
148
global
$DIC
;
149
150
$ilDB
= $DIC[
'ilDB'
];
151
152
$query
=
'INSERT INTO ecs_node_mapping_a (server_id,mid,cs_root,cs_id,ref_id,obj_id,title_update,position_update,tree_update) '
.
153
'VALUES( '
.
154
$ilDB
->quote($this->
getServerId
(),
'integer'
) .
', '
.
155
$ilDB
->quote($this->
getMemberId
(),
'integer'
) .
', '
.
156
$ilDB
->quote($this->
getTreeId
(),
'integer'
) .
', '
.
157
$ilDB
->quote($this->
getCSId
(),
'integer'
) .
', '
.
158
$ilDB
->quote($this->
getRefId
(),
'integer'
) .
', '
.
159
$ilDB
->quote($this->
getObjId
(),
'integer'
) .
', '
.
160
$ilDB
->quote($this->
isTitleUpdateEnabled
(),
'integer'
) .
', '
.
161
$ilDB
->quote($this->
isPositionUpdateEnabled
(),
'integer'
) .
', '
.
162
$ilDB
->quote($this->
isTreeUpdateEnabled
(),
'integer'
) .
' '
.
163
')'
;
164
$ilDB
->manipulate(
$query
);
165
return
true
;
166
}
167
168
173
public
function
delete
()
174
{
175
global
$DIC
;
176
177
$ilDB
= $DIC[
'ilDB'
];
178
179
$query
=
'DELETE FROM ecs_node_mapping_a '
.
180
'WHERE server_id = '
.
$ilDB
->quote($this->
getServerId
(),
'integer'
) .
' '
.
181
'AND mid = '
.
$ilDB
->quote($this->
getMemberId
(),
'integer'
) .
' '
.
182
'AND cs_root = '
.
$ilDB
->quote($this->
getTreeId
(),
'integer'
) .
' '
.
183
'AND cs_id = '
.
$ilDB
->quote($this->
getCSId
(),
'integer'
);
184
$ilDB
->manipulate(
$query
);
185
}
186
187
188
193
protected
function
read
()
194
{
195
global
$DIC
;
196
197
$ilDB
= $DIC[
'ilDB'
];
198
199
$query
=
'SELECT * FROM ecs_node_mapping_a '
.
200
'WHERE server_id = '
.
$ilDB
->quote($this->
getServerId
(),
'integer'
) .
' '
.
201
'AND mid = '
.
$ilDB
->quote($this->
getMemberId
(),
'integer'
) .
' '
.
202
'AND cs_root = '
.
$ilDB
->quote($this->
getTreeId
(),
'integer'
) .
' '
.
203
'AND cs_id = '
.
$ilDB
->quote($this->
getCSId
(),
'integer'
) .
' '
;
204
$res
=
$ilDB
->query(
$query
);
205
206
#$GLOBALS['DIC']['ilLog']->write(__METHOD__.': '.$query);
207
208
while
(
$row
=
$res
->fetchRow(
ilDBConstants::FETCHMODE_OBJECT
)) {
209
$this->
setObjId
(
$row
->obj_id);
210
$this->
setRefId
(
$row
->ref_id);
211
$this->
enableTitleUpdate
(
$row
->title_update);
212
$this->
enablePositionUpdate
(
$row
->position_update);
213
$this->
enableTreeUpdate
(
$row
->tree_update);
214
$this->mapped =
true
;
215
}
216
}
217
218
public
static
function
deleteByServerId
($a_server_id)
219
{
220
global
$DIC
;
221
222
$ilDB
= $DIC[
'ilDB'
];
223
224
$query
=
'DELETE FROM ecs_node_mapping_a'
.
225
' WHERE server_id = '
.
$ilDB
->quote($a_server_id,
'integer'
);
226
$ilDB
->manipulate(
$query
);
227
return
true
;
228
}
229
}
ilECSNodeMappingAssignment\$position_update
$position_update
Definition:
class.ilECSNodeMappingAssignment.php:20
ilECSNodeMappingAssignment\$tree_update
$tree_update
Definition:
class.ilECSNodeMappingAssignment.php:21
ilECSNodeMappingAssignment\setTreeId
setTreeId($root)
Definition:
class.ilECSNodeMappingAssignment.php:68
ilECSNodeMappingAssignment\enableTitleUpdate
enableTitleUpdate($enabled)
Definition:
class.ilECSNodeMappingAssignment.php:108
ilECSNodeMappingAssignment\setMemberId
setMemberId($a_member_id)
Definition:
class.ilECSNodeMappingAssignment.php:53
ilECSNodeMappingAssignment\update
update()
Update node mapping.
Definition:
class.ilECSNodeMappingAssignment.php:136
$DIC
global $DIC
Definition:
saml.php:7
ilECSNodeMappingAssignment\getCSId
getCSId()
Definition:
class.ilECSNodeMappingAssignment.php:73
ilECSNodeMappingAssignment\$cs_id
$cs_id
Definition:
class.ilECSNodeMappingAssignment.php:15
$id
if(!array_key_exists('StateId', $_REQUEST)) $id
Definition:
expirywarning.php:14
ilECSNodeMappingAssignment\$mapped
$mapped
Definition:
class.ilECSNodeMappingAssignment.php:23
ilECSNodeMappingAssignment\$mid
$mid
Definition:
class.ilECSNodeMappingAssignment.php:13
ilECSNodeMappingAssignment\isPositionUpdateEnabled
isPositionUpdateEnabled()
Definition:
class.ilECSNodeMappingAssignment.php:113
ilECSNodeMappingAssignment\getServerId
getServerId()
Definition:
class.ilECSNodeMappingAssignment.php:43
ilECSNodeMappingAssignment\setObjId
setObjId($id)
Definition:
class.ilECSNodeMappingAssignment.php:98
ilECSNodeMappingAssignment\setCSId
setCSId($id)
Definition:
class.ilECSNodeMappingAssignment.php:78
ilECSNodeMappingAssignment\$server_id
$server_id
Definition:
class.ilECSNodeMappingAssignment.php:12
ilECSNodeMappingAssignment\isMapped
isMapped()
Definition:
class.ilECSNodeMappingAssignment.php:38
ilECSNodeMappingAssignment\setServerId
setServerId($a_id)
Definition:
class.ilECSNodeMappingAssignment.php:48
ilECSNodeMappingAssignment\$obj_id
$obj_id
Definition:
class.ilECSNodeMappingAssignment.php:17
$res
foreach($_POST as $key=> $value) $res
Definition:
save_question_post_data.php:15
ilECSNodeMappingAssignment
Definition:
class.ilECSNodeMappingAssignment.php:10
ilECSNodeMappingAssignment\$ref_id
$ref_id
Definition:
class.ilECSNodeMappingAssignment.php:16
ilECSNodeMappingAssignment\deleteByServerId
static deleteByServerId($a_server_id)
Definition:
class.ilECSNodeMappingAssignment.php:218
ilECSNodeMappingAssignment\read
read()
read settings ilDB $ilDB
Definition:
class.ilECSNodeMappingAssignment.php:193
ilECSNodeMappingAssignment\enablePositionUpdate
enablePositionUpdate($enabled)
Definition:
class.ilECSNodeMappingAssignment.php:118
ilECSNodeMappingAssignment\enableTreeUpdate
enableTreeUpdate($enabled)
Definition:
class.ilECSNodeMappingAssignment.php:128
ilECSNodeMappingAssignment\$title_update
$title_update
Definition:
class.ilECSNodeMappingAssignment.php:19
$query
$query
Definition:
proxy_ylocal.php:13
$root
$root
Definition:
sabredav.php:45
ilECSNodeMappingAssignment\getTreeId
getTreeId()
Definition:
class.ilECSNodeMappingAssignment.php:63
ilECSNodeMappingAssignment\create
create()
Definition:
class.ilECSNodeMappingAssignment.php:146
$row
$row
Definition:
migrateto20.php:360
ilECSNodeMappingAssignment\getObjId
getObjId()
Definition:
class.ilECSNodeMappingAssignment.php:93
ilECSNodeMappingAssignment\__construct
__construct($a_server_id, $mid, $cs_root, $cs_id)
Constructor.
Definition:
class.ilECSNodeMappingAssignment.php:28
ilECSNodeMappingAssignment\isTitleUpdateEnabled
isTitleUpdateEnabled()
Definition:
class.ilECSNodeMappingAssignment.php:103
$ilDB
global $ilDB
Definition:
storeScorm2004.php:16
ilECSNodeMappingAssignment\getMemberId
getMemberId()
Definition:
class.ilECSNodeMappingAssignment.php:58
ilECSNodeMappingAssignment\$cs_root
$cs_root
Definition:
class.ilECSNodeMappingAssignment.php:14
php
ilDBConstants\FETCHMODE_OBJECT
const FETCHMODE_OBJECT
Definition:
class.ilDBConstants.php:13
ilECSNodeMappingAssignment\isTreeUpdateEnabled
isTreeUpdateEnabled()
Definition:
class.ilECSNodeMappingAssignment.php:123
ilECSNodeMappingAssignment\setRefId
setRefId($a_id)
Definition:
class.ilECSNodeMappingAssignment.php:88
ilECSNodeMappingAssignment\getRefId
getRefId()
Definition:
class.ilECSNodeMappingAssignment.php:83
Services
WebServices
ECS
classes
Mapping
class.ilECSNodeMappingAssignment.php
Generated on Thu Jan 16 2025 19:02:35 for ILIAS by
1.8.13 (using
Doxyfile
)