4include_once 
'./Services/Calendar/classes/class.ilCalendarEntry.php';
 
   31            include_once 
'./Services/Calendar/classes/class.ilCalendarCategory.php';
 
   36            $owner = 
" AND be.obj_id = " . 
$ilDB->quote($a_user_id, 
'integer');
 
   39        $query = 
"SELECT ce.cal_id FROM cal_entries ce" .
 
   40            " JOIN cal_cat_assignments cca ON ce.cal_id = cca.cal_id" .
 
   41            " JOIN cal_categories cc ON cca.cat_id = cc.cat_id" .
 
   42            " JOIN booking_entry be ON ce.context_id  = be.booking_id" .
 
   43            " WHERE cc.obj_id = " . 
$ilDB->quote($a_user_id, 
'integer') .
 
   55        $query .= (
' ORDER BY ce.starta ASC');
 
   60            $entries[] = 
$row->cal_id;
 
   78        include_once 
'./Services/Calendar/classes/class.ilCalendarCategory.php';
 
   83            $start_limit = 
'AND ce.starta >= ' . 
$ilDB->quote($start->get(
IL_CAL_DATETIME, 
'', 
'UTC'), 
'timestamp');
 
   86        $query = 
'SELECT ce.cal_id FROM cal_entries ce ' .
 
   87                'JOIN cal_cat_assignments ca ON ce.cal_id = ca.cal_id ' .
 
   88                'JOIN cal_categories cc ON ca.cat_id = cc.cat_id ' .
 
   89                'JOIN booking_entry be ON ce.context_id = be.booking_id ' .
 
   90                'WHERE cc.obj_id = ' . 
$ilDB->quote($a_user_id, 
'integer') . 
' ' .
 
   91                'AND cc.type = ' . 
$ilDB->quote(
$type, 
'integer') . 
' ' .
 
   92                'AND be.booking_group = ' . 
$ilDB->quote($a_ch_group_id, 
'integer') . 
' ' .
 
   94                'ORDER BY ce.starta ';
 
   98            $app_ids[] = 
$row->cal_id;
 
  110        foreach (self::getAppointmentIds($a_user_id) as $app_id) {
 
  123    public static function getManager($a_as_name = 
false, $a_full_name = 
false, $a_user_id = 
null)
 
  130            $user_id = $a_user_id;
 
  133        $set = 
$ilDB->query(
'SELECT admin_id FROM cal_ch_settings' .
 
  134            ' WHERE user_id = ' . 
$ilDB->quote($user_id, 
'integer'));
 
  137            if ($a_as_name && $a_full_name) {
 
  139            } elseif ($a_as_name) {
 
  142            return (
int) 
$row[
'admin_id'];
 
  163        $ilDB->manipulate(
'DELETE FROM cal_ch_settings' .
 
  164                ' WHERE user_id = ' . 
$ilDB->quote(
$ilUser->getId(), 
'integer'));
 
  166        if ($user_id && $user_id != 
$ilUser->getId()) {
 
  167            $ilDB->manipulate(
'INSERT INTO cal_ch_settings (user_id, admin_id)' .
 
  168                    ' VALUES (' . 
$ilDB->quote(
$ilUser->getId(), 
'integer') . 
',' .
 
  169                    $ilDB->quote($user_id, 
'integer') . 
')');
 
  184        $set = 
$ilDB->query(
'SELECT user_id FROM cal_ch_settings' .
 
  185            ' WHERE admin_id = ' . 
$ilDB->quote(
$ilUser->getId(), 
'integer'));
 
An exception for terminatinating execution or to throw for unit testing.
Model for a calendar entry.
Consultation hour appointments.
static getAppointmentIds($a_user_id, $a_context_id=null, $a_start=null, $a_type=null, $a_check_owner=true)
Get all appointment ids.
static getAppointmentIdsByGroup($a_user_id, $a_ch_group_id, ilDateTime $start=null)
Get appointment ids by consultation hour group.
static getManager($a_as_name=false, $a_full_name=false, $a_user_id=null)
Get consultation hour manager for current user or specific user.
static getAppointments($a_user_id)
Get all appointments.
static getManagedUsers()
Get all managed consultation hours users for current users.
static setManager($a_user_name)
Set consultation hour manager for current user.
@classDescription Date and time handling
static _lookupLogin($a_user_id)
lookup login
static _lookupFullname($a_user_id)
Lookup Full Name.
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...
foreach($_POST as $key=> $value) $res