ILIAS
Release_4_3_x_branch Revision 61807
◀ ilDoc Overview
Main Page
Related Pages
Modules
Namespaces
Data Structures
Files
Examples
File List
Globals
ILIAS
Todo List
Deprecated List
Modules
Namespaces
Data Structures
Files
File List
cron
include
Modules
Services
AccessControl
Accessibility
Accordion
Administration
AdvancedEditing
AdvancedMetaData
AuthApache
Authentication
AuthShibboleth
Block
Booking
Bookmarks
Cache
Calendar
Captcha
CAS
Certificate
Chart
Clipboard
Component
Contact
Container
ContainerReference
Context
COPage
CopyWizard
Database
DataSet
DidacticTemplate
Dom
EventHandling
Excel
Exceptions
Export
Feedback
Feeds
FileSystem
Form
Frameset
GoogleMaps
Help
History
Html
Http
Imprint
InfoScreen
Init
jQuery
JSON
Language
LDAP
License
Link
LinkChecker
LoadTest
Locator
Logging
Mail
MainMenu
Math
MediaObjects
Membership
MetaData
Migration
Navigation
News
Notes
Notification
Notifications
Object
OpenId
OrgUnit
Payment
PEAR
PermanentLink
PersonalDesktop
PersonalWorkspace
PHPUnit
Portfolio
PrivacySecurity
QTI
Radius
Rating
Registration
Repository
RTE
Search
Skill
SOAPAuth
Style
Survey
Table
Tagging
Taxonomy
Tracking
Transformation
Tree
UIComponent
UICore
User
Utilities
Verification
VirusScanner
WebAccessChecker
WebDAV
WebServices
Curl
ECS
classes
Course
Mapping
Tree
class.ilAuthContainerECS.php
class.ilAuthECS.php
class.ilECSAppEventListener.php
class.ilECSAuth.php
class.ilECSCategoryMapping.php
class.ilECSCategoryMappingRule.php
class.ilECSCategoryMappingTableGUI.php
class.ilECSCommunitiesCache.php
class.ilECSCommunity.php
class.ilECSCommunityCache.php
class.ilECSCommunityReader.php
class.ilECSCommunityTableGUI.php
class.ilECSConnector.php
class.ilECSConnectorException.php
class.ilECSDataMappingSetting.php
class.ilECSDataMappingSettings.php
class.ilECSEContentDetails.php
class.ilECSEvent.php
class.ilECSEventQueueReader.php
class.ilECSExport.php
class.ilECSImport.php
class.ilECSImportedContentTableGUI.php
class.ilECSObjectSettings.php
class.ilECSOrganisation.php
class.ilECSParticipant.php
class.ilECSParticipantSetting.php
class.ilECSParticipantSettings.php
class.ilECSReaderException.php
class.ilECSReleasedContentTableGUI.php
class.ilECSResult.php
class.ilECSServerSettings.php
class.ilECSServerTableGUI.php
class.ilECSSetting.php
class.ilECSSettingsGUI.php
class.ilECSTaskScheduler.php
class.ilECSTimePlace.php
class.ilECSUriList.php
class.ilECSUser.php
class.ilECSUtils.php
class.ilObjECSSettings.php
class.ilObjECSSettingsAccess.php
class.ilObjECSSettingsGUI.php
class.ilRemoteObjectBase.php
class.ilRemoteObjectBaseGUI.php
interfaces
FileManager
Rest
RPC
SOAP
Workflow
XHTMLPage
XHTMLValidator
Xml
YUI
setup
sso
webservice
calendar.php
confirmReg.php
error.php
feed.php
goto.php
ilias.php
index.php
login.php
logout.php
payment.php
privfeed.php
pwassist.php
register.php
rootindex.php
sessioncheck.php
shib_login.php
shib_logout.php
start.php
studip_referrer.php
webdav.php
Globals
Examples
•
All
Data Structures
Namespaces
Files
Functions
Variables
Groups
Pages
class.ilECSDataMappingSetting.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
32
class
ilECSDataMappingSetting
33
{
34
35
const
MAPPING_EXPORT
= 1;
36
const
MAPPING_IMPORT_CRS
= 2;
37
const
MAPPING_IMPORT_RCRS
= 3;
38
39
private
$server_id
= 0;
40
private
$mapping_type
= 0;
41
private
$ecs_field
= 0;
42
private
$advmd_id
= 0;
43
44
50
public
function
__construct
($a_server_id = 0,
$mapping_type
= 0,
$ecs_field
=
''
)
51
{
52
$this->
setServerId
($a_server_id);
53
$this->
setMappingType
(
$mapping_type
);
54
$this->
setECSField
(
$ecs_field
);
55
}
56
61
public
function
setServerId
($a_server_id)
62
{
63
$this->server_id = $a_server_id;
64
}
65
69
public
function
getServerId
()
70
{
71
return
$this->server_id
;
72
}
73
78
public
function
setECSField
(
$ecs_field
)
79
{
80
$this->ecs_field =
$ecs_field
;
81
}
82
86
public
function
getECSField
()
87
{
88
return
$this->ecs_field
;
89
}
90
95
public
function
setMappingType
(
$mapping_type
)
96
{
97
$this->mapping_type =
$mapping_type
;
98
}
99
103
public
function
getMappingType
()
104
{
105
return
$this->mapping_type
;
106
}
107
108
113
public
function
getAdvMDId
()
114
{
115
return
$this->advmd_id
;
116
}
117
118
public
function
setAdvMDId
($a_id)
119
{
120
$this->advmd_id = $a_id;
121
}
122
128
public
function
save
()
129
{
130
global $ilDB;
131
132
$query
=
'SELECT * FROM ecs_data_mapping '
.
133
'WHERE sid = '
.$ilDB->quote($this->
getServerId
(),
'integer'
).
' '
.
134
'AND mapping_type = '
.$ilDB->quote($this->
getMappingType
(),
'integer'
).
' '
.
135
'AND ecs_field = '
.$ilDB->quote($this->
getECSField
(),
'text'
);
136
$res
= $ilDB->query(
$query
);
137
if
(
$res
->numRows())
138
{
139
$this->
update
();
140
}
141
else
142
{
143
$this->
create
();
144
}
145
}
146
151
protected
function
update
()
152
{
153
global $ilDB;
154
155
$query
=
'UPDATE ecs_data_mapping '
.
156
'SET advmd_id = '
.$ilDB->db->quote($this->
getAdvMDId
(),
'integer'
).
' '
.
157
'WHERE sid = '
.$ilDB->quote($this->
getServerId
(),
'integer'
).
' '
.
158
'AND mapping_type = '
.$ilDB->quote($this->
getMappingType
(),
'integer'
).
' '
.
159
'AND ecs_field = '
.$ilDB->quote($this->
getECSField
(),
'text'
);
160
$ilDB->manipulate(
$query
);
161
}
162
163
protected
function
create
()
164
{
165
global $ilDB;
166
167
$query
=
'INSERT INTO ecs_data_mapping (sid,mapping_type,ecs_field,advmd_id) '
.
168
'VALUES('
.
169
$ilDB->quote($this->
getServerId
(),
'integer'
) .
', '
.
170
$ilDB->quote($this->
getMappingType
(),
'integer'
).
', '
.
171
$ilDB->quote($this->
getECSField
(),
'text'
).
', '
.
172
$ilDB->quote($this->
getAdvMDId
(),
'integer'
).
' ) '
;
173
$res
= $ilDB->manipulate(
$query
);
174
return
true
;
175
}
176
177
184
private
function
read
()
185
{
186
global $ilDB;
187
188
if
($this->
getServerId
() and $this->
getMappingType
() and $this->
getECSField
())
189
{
190
$query
=
'SELECT * FROM ecs_data_mapping '
.
191
'WHERE sid = '
.$ilDB->quote($this->
getServerId
(),
'integer'
).
' '
.
192
'AND mapping_type = '
.$ilDB->quote($this->
getMappingType
(),
'integer'
).
' '
.
193
'AND ecs_field = '
.$ilDB->quote($this->
getECSField
(),
'text'
);
194
$res
= $ilDB->query(
$query
);
195
while
(
$row
=
$res
->fetchRow(
DB_FETCHMODE_OBJECT
))
196
{
197
$this->
setAdvMDId
(
$row
->advmd_id);
198
}
199
}
200
}
201
202
public
static
function
deleteByServerId
($a_server_id)
203
{
204
global $ilDB;
205
206
$query
=
'DELETE FROM ecs_data_mapping'
.
207
' WHERE sid = '
.$ilDB->quote($a_server_id,
'integer'
);
208
$ilDB->manipulate(
$query
);
209
return
true
;
210
}
211
}
212
?>
Services
WebServices
ECS
classes
class.ilECSDataMappingSetting.php
Generated on Sat Apr 23 2016 19:02:35 for ILIAS by
1.8.1.2 (using
Doxyfile
)