ILIAS
release_5-4 Revision v5.4.26-12-gabc799a52e6
◀ ilDoc Overview
class.ilSCGroup.php
Go to the documentation of this file.
1
<?
php
2
3
include_once
'./Services/Calendar/classes/class.ilDateTime.php'
;
4
5
/* Copyright (c) 1998-2009 ILIAS open source, Extended GPL, see docs/LICENSE */
6
12
class
ilSCGroup
13
{
14
private
$id
= 0;
15
private
$component_id
=
''
;
16
private
$component_type
=
''
;
17
private
$last_update
= null;
18
private
$status
= 0;
19
20
25
public
function
__construct
($a_id = 0)
26
{
27
$this->
id
= $a_id;
28
$this->
read
();
29
}
30
37
public
static
function
lookupComponent
($a_id)
38
{
39
global
$DIC
;
40
41
$ilDB
= $DIC[
'ilDB'
];
42
43
$query
=
'SELECT component FROM sysc_groups '
.
44
'WHERE id = '
.
$ilDB
->quote($a_id,
'integer'
);
45
$res
=
$ilDB
->query(
$query
);
46
while
(
$row
=
$res
->fetchRow(
ilDBConstants::FETCHMODE_OBJECT
)) {
47
return
(
string
)
$row
->component;
48
}
49
return
''
;
50
}
51
52
public
function
getId
()
53
{
54
return
$this->id
;
55
}
56
57
58
public
function
setComponentId
($a_comp)
59
{
60
$this->component_id = $a_comp;
61
}
62
67
public
function
getComponentId
()
68
{
69
return
$this->component_id
;
70
}
71
72
73
public
function
setLastUpdate
(
ilDateTime
$a_update)
74
{
75
$this->last_update = $a_update;
76
}
77
82
public
function
getLastUpdate
()
83
{
84
if
(!$this->last_update) {
85
return
$this->last_update =
new
ilDateTime
();
86
}
87
return
$this->last_update
;
88
}
89
90
public
function
setStatus
($a_status)
91
{
92
$this->status = $a_status;
93
}
94
99
public
function
getStatus
()
100
{
101
return
$this->status
;
102
}
103
107
public
function
read
()
108
{
109
global
$DIC
;
110
111
$ilDB
= $DIC[
'ilDB'
];
112
113
if
(!$this->
getId
()) {
114
return
false
;
115
}
116
117
$query
=
'SELECT * FROM sysc_groups '
.
118
'WHERE id = '
.
$ilDB
->quote($this->
getId
(),
'integer'
);
119
$res
=
$ilDB
->query(
$query
);
120
while
(
$row
=
$res
->fetchRow(
ilDBConstants::FETCHMODE_OBJECT
)) {
121
$this->
setComponentId
(
$row
->component);
122
$this->
setLastUpdate
(
new
ilDateTime
(
$row
->last_update,
IL_CAL_DATETIME
,
ilTimeZone::UTC
));
123
$this->
setStatus
(
$row
->status);
124
}
125
return
true
;
126
}
127
131
public
function
create
()
132
{
133
global
$DIC
;
134
135
$ilDB
= $DIC[
'ilDB'
];
136
137
$this->
id
=
$ilDB
->nextId(
'sysc_groups'
);
138
139
$query
=
'INSERT INTO sysc_groups (id,component,status) '
.
140
'VALUES ( '
.
141
$ilDB
->quote($this->
getId
(),
'integer'
) .
', '
.
142
$ilDB
->quote($this->
getComponentId
(),
'text'
) .
', '
.
143
$ilDB
->quote($this->
getStatus
(),
'integer'
) .
' '
.
144
')'
;
145
$ilDB
->manipulate(
$query
);
146
return
$this->
getId
();
147
}
148
}
IL_CAL_DATETIME
const IL_CAL_DATETIME
Definition:
class.ilDateTime.php:9
ilSCGroup\getComponentId
getComponentId()
Get component.
Definition:
class.ilSCGroup.php:67
$DIC
global $DIC
Definition:
saml.php:7
ilTimeZone\UTC
const UTC
Definition:
class.ilTimeZone.php:45
ilSCGroup\getLastUpdate
getLastUpdate()
Get last update date.
Definition:
class.ilSCGroup.php:82
ilSCGroup\getStatus
getStatus()
Get status.
Definition:
class.ilSCGroup.php:99
ilSCGroup\getId
getId()
Definition:
class.ilSCGroup.php:52
ilSCGroup\create
create()
Create new group.
Definition:
class.ilSCGroup.php:131
ilSCGroup\lookupComponent
static lookupComponent($a_id)
lookup component by id type $ilDB
Definition:
class.ilSCGroup.php:37
ilSCGroup\$component_id
$component_id
Definition:
class.ilSCGroup.php:15
$res
foreach($_POST as $key=> $value) $res
Definition:
save_question_post_data.php:15
ilSCGroup\$status
$status
Definition:
class.ilSCGroup.php:18
ilSCGroup\setLastUpdate
setLastUpdate(ilDateTime $a_update)
Definition:
class.ilSCGroup.php:73
ilSCGroup\$id
$id
Definition:
class.ilSCGroup.php:14
ilDateTime
Date and time handling
Definition:
class.ilDateTime.php:33
$query
$query
Definition:
proxy_ylocal.php:13
$row
$row
Definition:
migrateto20.php:360
ilSCGroup\$component_type
$component_type
Definition:
class.ilSCGroup.php:16
$ilDB
global $ilDB
Definition:
storeScorm2004.php:16
ilSCGroup\read
read()
Read group.
Definition:
class.ilSCGroup.php:107
ilSCGroup\setStatus
setStatus($a_status)
Definition:
class.ilSCGroup.php:90
php
ilSCGroup\__construct
__construct($a_id=0)
Constructor.
Definition:
class.ilSCGroup.php:25
ilSCGroup\setComponentId
setComponentId($a_comp)
Definition:
class.ilSCGroup.php:58
ilDBConstants\FETCHMODE_OBJECT
const FETCHMODE_OBJECT
Definition:
class.ilDBConstants.php:13
ilSCGroup
Defines a system check group including different tasks of a component.
Definition:
class.ilSCGroup.php:12
ilSCGroup\$last_update
$last_update
Definition:
class.ilSCGroup.php:17
Services
SystemCheck
classes
class.ilSCGroup.php
Generated on Thu Jan 16 2025 19:02:31 for ILIAS by
1.8.13 (using
Doxyfile
)