4 include_once
'./Services/Calendar/classes/class.ilCalendarEntry.php';
32 include_once
'./Services/Calendar/classes/class.ilCalendarCategory.php';
38 $owner =
" AND be.obj_id = ".$ilDB->quote($a_user_id,
'integer');
41 $query =
"SELECT ce.cal_id FROM cal_entries ce".
42 " JOIN cal_cat_assignments cca ON ce.cal_id = cca.cal_id".
43 " JOIN cal_categories cc ON cca.cat_id = cc.cat_id".
44 " JOIN booking_entry be ON ce.context_id = be.booking_id".
45 " WHERE cc.obj_id = ".$ilDB->quote($a_user_id,
'integer').
47 " AND cc.type = ".$ilDB->quote(
$a_type,
'integer');
59 $query .= (
' ORDER BY ce.starta ASC');
65 $entries[] =
$row->cal_id;
83 include_once
'./Services/Calendar/classes/class.ilCalendarCategory.php';
92 $query =
'SELECT ce.cal_id FROM cal_entries ce '.
93 'JOIN cal_cat_assignments ca ON ce.cal_id = ca.cal_id '.
94 'JOIN cal_categories cc ON ca.cat_id = cc.cat_id '.
95 'JOIN booking_entry be ON ce.context_id = be.booking_id '.
96 'WHERE cc.obj_id = '.$ilDB->quote($a_user_id,
'integer').
' '.
97 'AND cc.type = '.$ilDB->quote($type,
'integer').
' '.
98 'AND be.booking_group = '.$ilDB->quote($a_ch_group_id,
'integer').
' '.
100 'ORDER BY ce.starta ';
105 $app_ids[] =
$row->cal_id;
117 foreach(self::getAppointmentIds($a_user_id) as $app_id)
133 $set = $ilDB->query(
'SELECT admin_id FROM cal_ch_settings'.
134 ' WHERE user_id = '.$ilDB->quote($ilUser->getId(),
'integer'));
135 $row = $ilDB->fetchAssoc($set);
142 return (
int)
$row[
'admin_id'];
165 $ilDB->manipulate(
'DELETE FROM cal_ch_settings'.
166 ' WHERE user_id = '.$ilDB->quote($ilUser->getId(),
'integer'));
168 if($user_id && $user_id != $ilUser->getId())
170 $ilDB->manipulate(
'INSERT INTO cal_ch_settings (user_id, admin_id)'.
171 ' VALUES ('.$ilDB->quote($ilUser->getId(),
'integer').
','.
172 $ilDB->quote($user_id,
'integer').
')');
187 $set = $ilDB->query(
'SELECT user_id FROM cal_ch_settings'.
188 ' WHERE admin_id = '.$ilDB->quote($ilUser->getId(),
'integer'));
189 while(
$row = $ilDB->fetchAssoc($set))
static _lookupLogin($a_user_id)
lookup login
Model for a calendar entry.
static getManager($a_as_name=false)
Get consultation hour manager for current user.
static getAppointmentIds($a_user_id, $a_context_id=NULL, $a_start=NULL, $a_type=NULL, $a_check_owner=true)
Get all appointment ids.
Consultation hour appointments.
static setManager($a_user_name)
Set consultation hour manager for current user.
static _loginExists($a_login, $a_user_id=0)
check if a login name already exists You may exclude a user from the check by giving his user id as 2...
static getManagedUsers()
Get all managed consultation hours users for current users.
static getAppointments($a_user_id)
Get all appointments.
static getAppointmentIdsByGroup($a_user_id, $a_ch_group_id, ilDateTime $start=null)
Get appointment ids by consultation hour group.
Create styles array
The data for the language used.