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.ilConsultationHourGroup.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
ilConsultationHourGroup
11
{
12
private
$group_id
= 0;
13
private
$usr_id
= 0;
14
private
$num_assignments
= 1;
15
private
$title
=
''
;
16
21
public
function
__construct
($a_group_id = 0)
22
{
23
$this->group_id = $a_group_id;
24
$this->
read
();
25
}
26
27
public
function
getGroupId
()
28
{
29
return
$this->group_id
;
30
}
31
32
public
function
setUserId
($a_id)
33
{
34
$this->usr_id = $a_id;
35
}
36
37
public
function
getUserId
()
38
{
39
return
$this->usr_id
;
40
}
41
42
public
function
setMaxAssignments
($a_num)
43
{
44
$this->num_assignments = $a_num;
45
}
46
47
public
function
getMaxAssignments
()
48
{
49
return
$this->num_assignments
;
50
}
51
52
53
public
function
setTitle
($a_title)
54
{
55
$this->title = $a_title;
56
}
57
58
public
function
getTitle
()
59
{
60
return
$this->title
;
61
}
62
68
public
function
save
()
69
{
70
global
$DIC
;
71
72
$ilDB
= $DIC[
'ilDB'
];
73
74
$this->group_id =
$ilDB
->nextId(
'cal_ch_group'
);
75
$query
=
'INSERT INTO cal_ch_group (grp_id,usr_id,multiple_assignments,title) '
.
76
'VALUES ( '
.
77
$ilDB
->quote($this->
getGroupId
(),
'integer'
) .
', '
.
78
$ilDB
->quote($this->
getUserId
(),
'integer'
) .
', '
.
79
$ilDB
->quote($this->
getMaxAssignments
(),
'integer'
) .
', '
.
80
$ilDB
->quote($this->
getTitle
(),
'text'
) .
81
')'
;
82
$ilDB
->manipulate(
$query
);
83
return
$this->
getGroupId
();
84
}
85
91
public
function
update
()
92
{
93
global
$DIC
;
94
95
$ilDB
= $DIC[
'ilDB'
];
96
97
$query
=
'UPDATE cal_ch_group SET '
.
98
'usr_id = '
.
$ilDB
->quote($this->
getUserId
(),
'integer'
) .
', '
.
99
'multiple_assignments = '
.
$ilDB
->quote($this->
getMaxAssignments
(),
'integer'
) .
', '
.
100
'title = '
.
$ilDB
->quote($this->
getTitle
(),
'text'
) .
' '
.
101
'WHERE grp_id = '
.
$ilDB
->quote($this->
getGroupId
(),
'integer'
);
102
$ilDB
->manipulate(
$query
);
103
return
true
;
104
}
105
106
public
function
delete
()
107
{
108
global
$DIC
;
109
110
$ilDB
= $DIC[
'ilDB'
];
111
112
$query
=
'DELETE FROM cal_ch_group '
.
113
'WHERE grp_id = '
.
$ilDB
->quote($this->
getGroupId
(),
'integer'
);
114
$ilDB
->manipulate(
$query
);
115
116
include_once
'./Services/Booking/classes/class.ilBookingEntry.php'
;
117
ilBookingEntry::resetGroup
($this->
getGroupId
());
118
}
119
120
126
protected
function
read
()
127
{
128
global
$DIC
;
129
130
$ilDB
= $DIC[
'ilDB'
];
131
132
if
(!$this->
getGroupId
()) {
133
return
false
;
134
}
135
$query
=
'SELECT * FROM cal_ch_group '
.
136
'WHERE grp_id = '
.
$ilDB
->quote($this->
getGroupId
(),
'integer'
);
137
$res
=
$ilDB
->query(
$query
);
138
while
($row =
$res
->fetchRow(
ilDBConstants::FETCHMODE_OBJECT
)) {
139
$this->
setUserId
($row->usr_id);
140
$this->
setTitle
($row->title);
141
$this->
setMaxAssignments
($row->multiple_assignments);
142
}
143
return
true
;
144
}
145
}
ilConsultationHourGroup\getMaxAssignments
getMaxAssignments()
Definition:
class.ilConsultationHourGroup.php:47
ilConsultationHourGroup\getGroupId
getGroupId()
Definition:
class.ilConsultationHourGroup.php:27
ilConsultationHourGroup\setTitle
setTitle($a_title)
Definition:
class.ilConsultationHourGroup.php:53
ilConsultationHourGroup\getUserId
getUserId()
Definition:
class.ilConsultationHourGroup.php:37
ilConsultationHourGroup\getTitle
getTitle()
Definition:
class.ilConsultationHourGroup.php:58
ilConsultationHourGroup\__construct
__construct($a_group_id=0)
Constructor.
Definition:
class.ilConsultationHourGroup.php:21
$res
foreach($_POST as $key=> $value) $res
Definition:
save_question_post_data.php:15
ilConsultationHourGroup
Description of class.
Definition:
class.ilConsultationHourGroup.php:10
ilConsultationHourGroup\setMaxAssignments
setMaxAssignments($a_num)
Definition:
class.ilConsultationHourGroup.php:42
$query
$query
Definition:
proxy_ylocal.php:13
ilConsultationHourGroup\$num_assignments
$num_assignments
Definition:
class.ilConsultationHourGroup.php:14
ilConsultationHourGroup\$usr_id
$usr_id
Definition:
class.ilConsultationHourGroup.php:13
ilConsultationHourGroup\save
save()
Save new group to db type $ilDB.
Definition:
class.ilConsultationHourGroup.php:68
ilConsultationHourGroup\$title
$title
Definition:
class.ilConsultationHourGroup.php:15
ilConsultationHourGroup\$group_id
$group_id
Definition:
class.ilConsultationHourGroup.php:12
ilConsultationHourGroup\update
update()
Update group information type $ilDB.
Definition:
class.ilConsultationHourGroup.php:91
ilConsultationHourGroup\setUserId
setUserId($a_id)
Definition:
class.ilConsultationHourGroup.php:32
$ilDB
global $ilDB
Definition:
storeScorm2004.php:16
$DIC
$DIC
Definition:
xapitoken.php:46
ilBookingEntry\resetGroup
static resetGroup($a_group_id)
Reset booking group (in case of deletion) type $ilDB.
Definition:
class.ilBookingEntry.php:55
ilDBConstants\FETCHMODE_OBJECT
const FETCHMODE_OBJECT
Definition:
class.ilDBConstants.php:11
ilConsultationHourGroup\read
read()
type $ilDB
Definition:
class.ilConsultationHourGroup.php:126
Services
Calendar
classes
ConsultationHours
class.ilConsultationHourGroup.php
Generated on Sun Apr 6 2025 20:01:18 for ILIAS by
1.8.13 (using
Doxyfile
)