ILIAS
release_5-4 Revision v5.4.26-12-gabc799a52e6
◀ ilDoc Overview
class.ilECSCourseAttribute.php
Go to the documentation of this file.
1
<?
php
2
3
/* Copyright (c) 1998-2009 ILIAS open source, Extended GPL, see docs/LICENSE */
4
10
class
ilECSCourseAttribute
11
{
12
private
$id
= 0;
13
private
$server_id
= 0;
14
private
$mid
= 0;
15
private
$name
=
''
;
16
21
public
function
__construct
($a_id = 0)
22
{
23
$this->
id
= $a_id;
24
25
$this->
read
();
26
}
27
32
public
function
getId
()
33
{
34
return
$this->id
;
35
}
36
37
public
function
setServerId
($a_server_id)
38
{
39
$this->server_id = $a_server_id;
40
}
41
42
public
function
getServerId
()
43
{
44
return
$this->server_id
;
45
}
46
47
public
function
setMid
($a_mid)
48
{
49
$this->mid = $a_mid;
50
}
51
52
public
function
getMid
()
53
{
54
return
$this->mid
;
55
}
56
57
58
public
function
setName
($a_name)
59
{
60
$this->name = $a_name;
61
}
62
67
public
function
getName
()
68
{
69
return
$this->name
;
70
}
71
77
public
function
delete
()
78
{
79
global
$DIC
;
80
81
$ilDB
= $DIC[
'ilDB'
];
82
83
$query
=
"DELETE FROM ecs_crs_mapping_atts "
.
84
'WHERE id = '
.
$ilDB
->quote($this->
getId
(),
'integer'
);
85
$ilDB
->manipulate(
$query
);
86
return
true
;
87
}
88
94
public
function
save
()
95
{
96
global
$DIC
;
97
98
$ilDB
= $DIC[
'ilDB'
];
99
100
$this->
id
=
$ilDB
->nextId(
'ecs_crs_mapping_atts'
);
101
102
$query
=
'INSERT INTO ecs_crs_mapping_atts (id,sid,mid,name) '
.
103
'VALUES ( '
.
104
$ilDB
->quote($this->
getId
(),
'integer'
) .
', '
.
105
$ilDB
->quote($this->
getServerId
(),
'integer'
) .
', '
.
106
$ilDB
->quote($this->
getMid
(),
'integer'
) .
', '
.
107
$ilDB
->quote($this->
getName
(),
'text'
) .
' '
.
108
') '
;
109
$ilDB
->manipulate(
$query
);
110
return
true
;
111
}
112
113
114
118
protected
function
read
()
119
{
120
global
$DIC
;
121
122
$ilDB
= $DIC[
'ilDB'
];
123
124
if
(!$this->
getId
()) {
125
return
true
;
126
}
127
128
129
$query
=
'SELECT * FROM ecs_crs_mapping_atts '
.
130
'WHERE id = '
.
$ilDB
->quote($this->
getId
(),
'integer'
);
131
$res
=
$ilDB
->query(
$query
);
132
while
(
$row
=
$res
->fetchRow(
ilDBConstants::FETCHMODE_OBJECT
)) {
133
$this->
setName
(
$row
->name);
134
}
135
return
true
;
136
}
137
}
ilECSCourseAttribute\save
save()
Save a new entry type $ilDB.
Definition:
class.ilECSCourseAttribute.php:94
ilECSCourseAttribute\getId
getId()
Get id.
Definition:
class.ilECSCourseAttribute.php:32
ilECSCourseAttribute\read
read()
read active attributes
Definition:
class.ilECSCourseAttribute.php:118
$DIC
global $DIC
Definition:
saml.php:7
ilECSCourseAttribute\setMid
setMid($a_mid)
Definition:
class.ilECSCourseAttribute.php:47
ilECSCourseAttribute\setServerId
setServerId($a_server_id)
Definition:
class.ilECSCourseAttribute.php:37
ilECSCourseAttribute\__construct
__construct($a_id=0)
Constructor.
Definition:
class.ilECSCourseAttribute.php:21
ilECSCourseAttribute\$name
$name
Definition:
class.ilECSCourseAttribute.php:15
ilECSCourseAttribute\getName
getName()
Get name.
Definition:
class.ilECSCourseAttribute.php:67
ilECSCourseAttribute\getMid
getMid()
Definition:
class.ilECSCourseAttribute.php:52
ilECSCourseAttribute\$mid
$mid
Definition:
class.ilECSCourseAttribute.php:14
ilECSCourseAttribute\$server_id
$server_id
Definition:
class.ilECSCourseAttribute.php:13
$res
foreach($_POST as $key=> $value) $res
Definition:
save_question_post_data.php:15
ilECSCourseAttribute\getServerId
getServerId()
Definition:
class.ilECSCourseAttribute.php:42
ilECSCourseAttribute
Storage of course attributes for assignment rules.
Definition:
class.ilECSCourseAttribute.php:10
ilECSCourseAttribute\setName
setName($a_name)
Definition:
class.ilECSCourseAttribute.php:58
$query
$query
Definition:
proxy_ylocal.php:13
$row
$row
Definition:
migrateto20.php:360
$ilDB
global $ilDB
Definition:
storeScorm2004.php:16
php
ilDBConstants\FETCHMODE_OBJECT
const FETCHMODE_OBJECT
Definition:
class.ilDBConstants.php:13
ilECSCourseAttribute\$id
$id
Definition:
class.ilECSCourseAttribute.php:12
Services
WebServices
ECS
classes
Course
class.ilECSCourseAttribute.php
Generated on Thu Jan 30 2025 19:02:09 for ILIAS by
1.8.13 (using
Doxyfile
)