ILIAS
release_6 Revision v6.24-5-g0c8bfefb3b8
◀ ilDoc Overview
Main Page
Related Pages
Modules
+
Namespaces
Namespace List
+
Namespace Members
+
All
$
_
a
b
c
d
e
f
g
h
i
j
l
m
p
s
t
w
+
Functions
_
a
b
c
f
g
h
i
s
t
w
+
Variables
$
c
d
e
f
g
h
j
l
m
p
s
t
+
Data Structures
Data Structures
Data Structure Index
Class Hierarchy
+
Data Fields
+
All
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Variables
$
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Files
File List
+
Globals
+
All
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
+
Functions
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
x
+
Variables
$
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Examples
•
All
Data Structures
Namespaces
Files
Functions
Variables
Modules
Pages
class.ilConsultationHourGroups.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
ilConsultationHourGroups
11
{
12
18
public
static
function
getGroupsOfUser
($a_user_id)
19
{
20
global
$DIC
;
21
22
$ilDB
= $DIC[
'ilDB'
];
23
24
$query
=
'SELECT grp_id FROM cal_ch_group '
.
25
'WHERE usr_id = '
.
$ilDB
->quote($a_user_id,
'integer'
);
26
$res
=
$ilDB
->query(
$query
);
27
$groups = array();
28
while
($row =
$res
->fetchRow(
ilDBConstants::FETCHMODE_OBJECT
)) {
29
include_once
'./Services/Calendar/classes/ConsultationHours/class.ilConsultationHourGroup.php'
;
30
$groups[] =
new
ilConsultationHourGroup
($row->grp_id);
31
}
32
return
$groups;
33
}
34
41
public
static
function
getCountGroupsOfUser
($a_user_id)
42
{
43
global
$DIC
;
44
45
$ilDB
= $DIC[
'ilDB'
];
46
47
$query
=
'SELECT COUNT(grp_id) num FROM cal_ch_group '
.
48
'WHERE usr_id = '
.
$ilDB
->quote($a_user_id,
'integer'
) .
' '
.
49
'GROUP BY grp_id'
;
50
51
$res
=
$ilDB
->query(
$query
);
52
$row =
$res
->fetchRow(
ilDBConstants::FETCHMODE_OBJECT
);
53
return
(
int
) $row->num;
54
}
55
59
public
static
function
lookupAssignedAppointments
()
60
{
61
global
$DIC
;
62
63
$ilDB
= $DIC[
'ilDB'
];
64
65
//@todo
66
}
67
71
public
static
function
lookupTitle
($a_group_id)
72
{
73
global
$DIC
;
74
75
$ilDB
= $DIC[
'ilDB'
];
76
77
$query
=
'SELECT title from cal_ch_group '
.
78
'WHERE grp_id = '
.
$ilDB
->quote($a_group_id,
'integer'
);
79
$res
=
$ilDB
->query(
$query
);
80
while
($row =
$res
->fetchRow(
ilDBConstants::FETCHMODE_OBJECT
)) {
81
return
$row->title;
82
}
83
return
''
;
84
}
85
92
public
static
function
lookupMaxBookings
($a_group_id)
93
{
94
global
$DIC
;
95
96
$ilDB
= $DIC[
'ilDB'
];
97
98
$query
=
'SELECT multiple_assignments from cal_ch_group '
.
99
'WHERE grp_id = '
.
$ilDB
->quote($a_group_id,
'integer'
);
100
$res
=
$ilDB
->query(
$query
);
101
while
($row =
$res
->fetchRow(
ilDBConstants::FETCHMODE_OBJECT
)) {
102
return
$row->multiple_assignments;
103
}
104
return
0;
105
}
106
107
112
public
static
function
getGroupSelectOptions
($a_user_id)
113
{
114
global
$DIC
;
115
116
$lng
= $DIC[
'lng'
];
117
118
$groups = self::getGroupsOfUser($a_user_id);
119
if
(!count($groups)) {
120
return
array();
121
}
122
$options = array();
123
foreach
($groups as $group) {
124
$options[(string) $group->getGroupId()] = $group->getTitle();
125
}
126
asort($options, SORT_STRING);
127
$sorted_options = array();
128
$sorted_options[0] =
$lng
->txt(
'cal_ch_grp_no_assignment'
);
129
foreach
($options as $key => $opt) {
130
$sorted_options[$key] = $opt;
131
}
132
return
$sorted_options;
133
}
134
}
ilConsultationHourGroups
Description of class.
Definition:
class.ilConsultationHourGroups.php:10
ilConsultationHourGroups\lookupTitle
static lookupTitle($a_group_id)
Lookup group title.
Definition:
class.ilConsultationHourGroups.php:71
ilConsultationHourGroups\getGroupSelectOptions
static getGroupSelectOptions($a_user_id)
Get group selection options.
Definition:
class.ilConsultationHourGroups.php:112
ilConsultationHourGroups\getGroupsOfUser
static getGroupsOfUser($a_user_id)
Get a all groups of an user.
Definition:
class.ilConsultationHourGroups.php:18
$res
foreach($_POST as $key=> $value) $res
Definition:
save_question_post_data.php:15
$lng
$lng
Definition:
save_question_post_data.php:23
ilConsultationHourGroup
Description of class.
Definition:
class.ilConsultationHourGroup.php:10
$query
$query
Definition:
proxy_ylocal.php:13
ilConsultationHourGroups\lookupAssignedAppointments
static lookupAssignedAppointments()
Lookup number of assigned appointments.
Definition:
class.ilConsultationHourGroups.php:59
ilConsultationHourGroups\lookupMaxBookings
static lookupMaxBookings($a_group_id)
Lookup max number of bookings for group type $ilDB.
Definition:
class.ilConsultationHourGroups.php:92
$ilDB
global $ilDB
Definition:
storeScorm2004.php:16
$DIC
$DIC
Definition:
xapitoken.php:46
ilConsultationHourGroups\getCountGroupsOfUser
static getCountGroupsOfUser($a_user_id)
Get number of consultation hour groups type $ilDB.
Definition:
class.ilConsultationHourGroups.php:41
ilDBConstants\FETCHMODE_OBJECT
const FETCHMODE_OBJECT
Definition:
class.ilDBConstants.php:11
Services
Calendar
classes
ConsultationHours
class.ilConsultationHourGroups.php
Generated on Sun Apr 6 2025 20:01:18 for ILIAS by
1.8.13 (using
Doxyfile
)