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