ILIAS
release_5-4 Revision v5.4.26-12-gabc799a52e6
◀ ilDoc Overview
class.ilSCGroups.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
5
include_once
'./Services/SystemCheck/classes/class.ilSCGroup.php'
;
6
12
class
ilSCGroups
13
{
14
18
private
static
$instance
= null;
19
20
private
$groups
= array();
21
25
private
function
__construct
()
26
{
27
$this->
read
();
28
}
29
34
public
static
function
getInstance
()
35
{
36
if
(self::$instance == null) {
37
return
self::$instance =
new
self
();
38
}
39
return
self::$instance;
40
}
41
46
public
function
updateFromComponentDefinition
($a_component_id)
47
{
48
foreach
($this->
getGroups
() as $group) {
49
if
($group->getComponentId() == $a_component_id) {
50
return
$group->getId();
51
}
52
}
53
54
$component_group =
new
ilSCGroup
();
55
$component_group->setComponentId($a_component_id);
56
$component_group->create();
57
58
return
$component_group->getId();
59
}
60
64
public
function
lookupGroupByComponentId
($a_component_id)
65
{
66
global
$DIC
;
67
68
$ilDB
= $DIC[
'ilDB'
];
69
70
$query
=
'SELECT id FROM sysc_groups '
.
71
'WHERE component = '
.
$ilDB
->quote($a_component_id,
'text'
);
72
$res
=
$ilDB
->query(
$query
);
73
while
(
$row
=
$res
->fetchRow(
ilDBConstants::FETCHMODE_OBJECT
)) {
74
return
$row
->id;
75
}
76
return
0;
77
}
78
79
84
public
function
getGroups
()
85
{
86
return
(array)
$this->groups
;
87
}
88
92
protected
function
read
()
93
{
94
global
$DIC
;
95
96
$ilDB
= $DIC[
'ilDB'
];
97
98
$query
=
'SELECT id FROM sysc_groups '
.
99
'ORDER BY id '
;
100
$res
=
$ilDB
->query(
$query
);
101
102
$this->groups = array();
103
while
(
$row
=
$res
->fetchRow(
ilDBConstants::FETCHMODE_OBJECT
)) {
104
$this->groups[] =
new
ilSCGroup
(
$row
->id);
105
}
106
}
107
}
ilSCGroups\lookupGroupByComponentId
lookupGroupByComponentId($a_component_id)
Definition:
class.ilSCGroups.php:64
ilSCGroups\getGroups
getGroups()
Get groups.
Definition:
class.ilSCGroups.php:84
$DIC
global $DIC
Definition:
saml.php:7
ilSCGroups
Description of class.
Definition:
class.ilSCGroups.php:12
$res
foreach($_POST as $key=> $value) $res
Definition:
save_question_post_data.php:15
ilSCGroups\__construct
__construct()
Singleton constructor.
Definition:
class.ilSCGroups.php:25
ilSCGroups\$instance
static $instance
Definition:
class.ilSCGroups.php:18
ilSCGroups\getInstance
static getInstance()
Get singleton instance.
Definition:
class.ilSCGroups.php:34
ilSCGroups\read
read()
read groups
Definition:
class.ilSCGroups.php:92
$query
$query
Definition:
proxy_ylocal.php:13
$row
$row
Definition:
migrateto20.php:360
ilSCGroups\updateFromComponentDefinition
updateFromComponentDefinition($a_component_id)
Update from component definition reader.
Definition:
class.ilSCGroups.php:46
$ilDB
global $ilDB
Definition:
storeScorm2004.php:16
php
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
ilSCGroups\$groups
$groups
Definition:
class.ilSCGroups.php:20
Services
SystemCheck
classes
class.ilSCGroups.php
Generated on Thu Jan 16 2025 19:02:31 for ILIAS by
1.8.13 (using
Doxyfile
)