ILIAS
release_6 Revision v6.24-5-g0c8bfefb3b8
◀ ilDoc Overview
class.ilExcMemberRepository.php
Go to the documentation of this file.
1
<?
php
2
3
/* Copyright (c) 1998-2019 ILIAS open source, Extended GPL, see docs/LICENSE */
4
11
class
ilExcMemberRepository
12
{
13
17
protected
$db
;
18
24
public
function
__construct
(\
ilDBInterface
$db
=
null
)
25
{
26
global
$DIC
;
27
28
$this->db = (is_null(
$db
))
29
?
$DIC
->database()
30
:
$db
;
31
}
32
39
public
function
getExerciseIdsOfUser
(
int
$user_id) : array
40
{
41
$db
=
$this->db
;
42
43
$set =
$db
->queryF(
44
"SELECT DISTINCT obj_id FROM exc_members "
.
45
" WHERE usr_id = %s "
,
46
array(
"integer"
),
47
array($user_id)
48
);
49
$ids = [];
50
while
($rec =
$db
->fetchAssoc($set)) {
51
$ids[] = $rec[
"obj_id"
];
52
}
53
54
return
$ids;
55
}
56
}
php
An exception for terminatinating execution or to throw for unit testing.
ilExcMemberRepository
This should hold all accesses to exc_members table in the future.
Definition:
class.ilExcMemberRepository.php:12
ilExcMemberRepository\__construct
__construct(\ilDBInterface $db=null)
Constructor.
Definition:
class.ilExcMemberRepository.php:24
ilExcMemberRepository\getExerciseIdsOfUser
getExerciseIdsOfUser(int $user_id)
Get all exercise IDs of a user.
Definition:
class.ilExcMemberRepository.php:39
ilExcMemberRepository\$db
$db
Definition:
class.ilExcMemberRepository.php:17
ilDBInterface
Interface ilDBInterface.
Definition:
interface.ilDBInterface.php:10
$DIC
$DIC
Definition:
xapitoken.php:46
Modules
Exercise
Members
classes
class.ilExcMemberRepository.php
Generated on Fri Oct 3 2025 20:00:50 for ILIAS by
1.9.4 (using
Doxyfile
)