18        $logger = 
$DIC->logger()->cal();
 
   22        $candidates = array_unique(array_merge(
 
   23            $participants->getAdmins(),
 
   24            $participants->getTutors()
 
   29        foreach ($users as $user_id) {
 
   33            foreach ($appointments as $entry) {
 
   39                if (!in_array($obj_id, $booking_entry->getTargetObjIds())) {
 
   42                if (!$booking_entry->isAppointmentBookableForUser($entry->getEntryId(), $current_user_id)) {
 
   49            $ctrl->setParameterByClass(end($ctrl_class_structure), 
'ch_user_id', $user_id);
 
   51                $ctrl->setParameterByClass(end($ctrl_class_structure), 
'seed', $next_entry->getStart()->get(
IL_CAL_DATE));
 
   54                'link' => $ctrl->getLinkTargetByClass($ctrl_class_structure, 
'selectCHCalendarOfUser'),
 
   57            $links[] = $current_link;
 
   60        $ctrl->setParameterByClass(end($ctrl_class_structure), 
'seed', 
'');
 
   61        $ctrl->setParameterByClass(end($ctrl_class_structure), 
'ch_user_id', 
'');
 
   78        $db = 
$DIC->database();
 
   80        $query = 
'select ce.cal_id from cal_entries ce ' .
 
   81            'join cal_cat_assignments cca on ce.cal_id = cca.cal_id ' .
 
   82            'join cal_categories cc on cca.cat_id = cc.cat_id '.
 
   83            'where context_id = ' . $db->quote($booking->
getId(), 
'integer') . 
' ' .
 
   89        $calendar_apppointments = [];
 
   91            $calendar_apppointments[] = $row->cal_id;
 
   93        return $calendar_apppointments;
 
  110        include_once 
'./Services/Language/classes/class.ilLanguageFactory.php';
 
  112        $cal_lang->loadLanguageModule(
'dateplaner');
 
  114        include_once 
'./Services/Calendar/classes/class.ilCalendarUtil.php';
 
  115        include_once 
'./Services/Calendar/classes/class.ilCalendarCategory.php';
 
  119            $cal_lang->txt(
'cal_ch_personal_ch'),
 
  124        include_once 
'./Services/Calendar/classes/class.ilCalendarEntry.php';
 
  126        $personal_app = clone 
$app;
 
  127        $personal_app->save();
 
  130        include_once 
'./Services/Calendar/classes/class.ilCalendarCategoryAssignments.php';
 
  132        $assignment->addAssignment($ch->getCategoryID());
 
  135        include_once 
'./Services/Booking/classes/class.ilBookingEntry.php';
 
  137        $booking->book(
$app->getEntryId(), $a_usr_id);
 
  147    public static function cancelBooking($a_usr_id, $a_app_id, $a_send_notification = 
true)
 
  150        include_once 
'./Services/Calendar/classes/class.ilCalendarEntry.php';
 
  153        include_once 
'./Services/Calendar/classes/ConsultationHours/class.ilConsultationHourAppointments.php';
 
  156            $app->getContextId(),
 
  161        foreach ($user_apps as $uapp_id) {
 
  165            include_once 
'./Services/Calendar/classes/class.ilCalendarCategoryAssignments.php';
 
  174        if ($a_send_notification) {
 
  175            $booking->cancelBooking($a_app_id, $a_usr_id);
 
  177            $booking->deleteBooking($a_app_id, $a_usr_id);
 
  192        $query = 
'SELECT user_id FROM cal_ch_settings ' .
 
  193                'WHERE admin_id = ' . 
$ilDB->quote($a_usr_id, 
'integer');
 
  198            $users[] = $row->user_id;
 
An exception for terminatinating execution or to throw for unit testing.
static lookupBookableUsersForObject($a_obj_id, $a_user_ids)
Consultation hours are offered if 1) consultation hour owner is admin or tutor and no object assignme...
static _deleteByAppointmentId($a_app_id)
Delete appointment assignment.
Model for a calendar entry.
static initDefaultCalendarByType($a_type_id, $a_usr_id, $a_title, $a_create=false)
Init the default calendar for given type and user.
static getAppointmentIds($a_user_id, $a_context_id=null, $a_start=null, $a_type=null, $a_check_owner=true)
Get all appointment ids.
static getAppointments($a_user_id)
Get all appointments.
static getConsultationHourLinksForRepositoryObject(int $ref_id, int $current_user_id, array $ctrl_class_structure)
static lookupManagedUsers($a_usr_id)
Lookup managed users.
static findCalendarAppointmentsForBooking(\ilBookingEntry $booking, \ilDateTime $start, \ilDateTime $end)
static cancelBooking($a_usr_id, $a_app_id, $a_send_notification=true)
Cancel a booking.
static bookAppointment($a_usr_id, $a_app_id)
Book an appointment.
@classDescription Date and time handling
get($a_format, $a_format_str='', $a_tz='')
get formatted date
static _before(ilDateTime $start, ilDateTime $end, $a_compare_field='', $a_tz='')
compare two dates and check start is before end This method does not consider tz offsets.
static _getLanguage($a_lang_key='')
Get langauge object.
static _lookupFullname($a_user_id)
Lookup Full Name.
static _lookupObjId($a_id)
static getInstance($a_ref_id)
Get instance by ref_id.
foreach($_POST as $key=> $value) $res