5 include_once(
'./Modules/Session/classes/class.ilSessionAppointment.php');
6 include_once
'./Services/Membership/classes/class.ilMembershipRegistrationSettings.php';
48 public function __construct($a_id = 0,$a_call_by_reference =
true)
54 parent::__construct($a_id,$a_call_by_reference);
69 $query =
"SELECT reg_type FROM event ".
70 "WHERE obj_id = ".$ilDB->quote($a_obj_id ,
'integer').
" ";
88 $query =
"SELECT * FROM event ".
89 "WHERE obj_id = ".$ilDB->quote($a_obj_id);
144 $this->location = $a_location;
166 $this->name = $a_name;
188 $this->phone = $a_phone;
211 $this->email = $a_email;
246 $this->details = $a_details;
277 $this->reg_limited = $a_limit;
287 $this->reg_min_users = $a_users;
297 $this->reg_limited_users = $a_users;
307 $this->reg_waiting_list = $a_stat;
312 $this->reg_waiting_list_autofill = (bool)$a_value;
339 return $this->appointments ? $this->appointments :
array();
351 $this->appointments[] = $appointment;
374 return is_object($this->appointments[0]) ? $this->appointments[0] : ($this->appointments[0] =
new ilSessionAppointment());
404 $ilErr->appendMessage($this->lng->txt(
"sess_max_members_needed"));
419 public function cloneObject($a_target_id,$a_copy_id = 0, $a_omit_tree =
false)
423 $new_obj = parent::cloneObject($a_target_id,$a_copy_id, $a_omit_tree);
432 $new_obj->setAppointments(
array($new_app));
438 $file->cloneFiles($new_obj->getEventId());
446 include_once(
'Services/Tracking/classes/class.ilLPObjSettings.php');
448 $obj_settings->cloneSettings($new_obj->getId());
449 unset($obj_settings);
491 global $ilObjDataCache;
493 parent::cloneDependencies($a_target_id,$a_copy_id);
495 $target_obj_id = $ilObjDataCache->lookupObjId($a_target_id);
497 include_once(
'./Modules/Session/classes/class.ilEventItems.php');
499 $session_materials->cloneItems($this->
getId(),$a_copy_id);
514 global $ilAppEventHandler;
518 $next_id = $ilDB->nextId(
'event');
519 $query =
"INSERT INTO event (event_id,obj_id,location,tutor_name,tutor_phone,tutor_email,details,registration, ".
520 'reg_type, reg_limit_users, reg_limited, reg_waiting_list, reg_min_users, reg_auto_wait) '.
522 $ilDB->quote($next_id,
'integer').
", ".
523 $this->db->quote($this->
getId() ,
'integer').
", ".
524 $this->db->quote($this->
getLocation() ,
'text').
",".
525 $this->db->quote($this->
getName() ,
'text').
", ".
526 $this->db->quote($this->
getPhone() ,
'text').
", ".
527 $this->db->quote($this->
getEmail() ,
'text').
", ".
528 $this->db->quote($this->
getDetails() ,
'text').
",".
538 $this->event_id = $next_id;
540 $ilAppEventHandler->raise(
'Modules/Session',
542 array(
'object' => $this,
543 'obj_id' => $this->
getId(),
546 return $this->
getId();
559 global $ilAppEventHandler;
561 if(!parent::update())
565 $query =
"UPDATE event SET ".
566 "location = ".$this->db->quote($this->
getLocation() ,
'text').
",".
567 "tutor_name = ".$this->db->quote($this->
getName() ,
'text').
", ".
568 "tutor_phone = ".$this->db->quote($this->
getPhone() ,
'text').
", ".
569 "tutor_email = ".$this->db->quote($this->
getEmail() ,
'text').
", ".
570 "details = ".$this->db->quote($this->
getDetails() ,
'text').
", ".
578 "WHERE obj_id = ".$this->db->quote($this->
getId() ,
'integer').
" ";
581 $ilAppEventHandler->raise(
'Modules/Session',
583 array(
'object' => $this,
584 'obj_id' => $this->
getId(),
595 public function delete()
598 global $ilAppEventHandler;
600 if(!parent::delete())
604 $query =
"DELETE FROM event ".
605 "WHERE obj_id = ".$this->db->quote($this->
getId() ,
'integer').
" ";
608 include_once(
'./Modules/Session/classes/class.ilSessionAppointment.php');
611 include_once(
'./Modules/Session/classes/class.ilEventItems.php');
614 include_once(
'./Modules/Session/classes/class.ilEventParticipants.php');
622 $ilAppEventHandler->raise(
'Modules/Session',
624 array(
'object' => $this,
625 'obj_id' => $this->
getId(),
643 $query =
"SELECT * FROM event WHERE ".
644 "obj_id = ".$this->db->quote($this->
getId() ,
'integer').
" ";
660 $this->event_id =
$row->event_id;
677 include_once(
'./Modules/Session/classes/class.ilSessionAppointment.php');
690 include_once(
'./Modules/Session/classes/class.ilSessionFile.php');
704 include_once(
'./Services/Calendar/classes/class.ilCalendarAppointmentTemplate.php');
713 $app->setTitle($this->
getTitle() ? $this->
getTitle() : $this->lng->txt(
'obj_sess'));
717 $app->setFullday($sess_app->isFullday());
718 $app->setStart($sess_app->getStart());
719 $app->setEnd($sess_app->getEnd());
737 include_once
'./Modules/Session/classes/class.ilEventParticipants.php';
739 $all_reg = $part_obj->getRegistered();
740 $now =
sizeof($all_reg);
744 include_once(
'./Modules/Session/classes/class.ilSessionWaitingList.php');
747 foreach($waiting_list->getUserIds() as $user_id)
753 if(in_array($user_id, $all_reg))
759 $waiting_list->removeFromList($user_id);
getPresentationTitle()
get title (overwritten from base class)
enabledRegistration()
is registration enabled
enableRegistrationUserLimit($a_limit)
addAppointment($appointment)
add appointment
const IL_CAL_TRANSLATION_NONE
getEventId()
sget event id
getLocation()
get location
setLocation($a_location)
set location
cloneSettings(ilObjSession $new_obj)
clone settings
__construct($a_id=0, $a_call_by_reference=true)
Constructor public.
setPhone($a_phone)
set phone
Class ilObject Basic functions for all objects.
initAppointments()
init appointments
cloneObject($a_target_id, $a_copy_id=0, $a_omit_tree=false)
Clone course (no member data)
setWaitingListAutoFill($a_value)
setEmail($a_email)
set email
Apointment templates are used for automatic generated apointments.
getRegistrationMinUsers()
isRegistrationWaitingListEnabled()
getAppointments()
get appointments
static lookupSession($a_obj_id)
Get session data.
static _deleteBySession($a_event_id)
cloneDependencies($a_target_id, $a_copy_id)
Clone dependencies.
setRegistrationMinUsers($a_users)
getRegistrationMaxUsers()
getId()
get object id public
isRegistrationUserLimitEnabled()
static _lookupRegistrationEnabled($a_obj_id)
lookup registration enabled
setRegistrationType($a_type)
hasTutorSettings()
check if there any tutor settings
prepareCalendarAppointments($a_mode='create')
Prepare calendar appointments.
static formatDate(ilDateTime $date)
Format a date public.
getTitle()
get object title public
static _register($a_usr_id, $a_event_id)
static _deleteByEvent($a_event_id)
static getInstanceByObjId($a_obj_id, $stop_on_error=true)
get an instance of an Ilias object by object id
Create styles array
The data for the language used.
setAppointments($appointments)
set appointments
setDetails($a_details)
set details
getLongDescription()
get object long description (stored in object_description)
static _readAppointmentsBySession($a_event_id)
setRegistrationMaxUsers($a_users)
if(!file_exists("$old.txt")) if($old===$new) if(file_exists("$new.txt")) $file
create()
create new session
static _readFilesByEvent($a_event_id)
enableRegistrationWaitingList($a_stat)
class ilSessionAppointment
$reg_waiting_list_autofill
static _delete($a_event_id)
getFirstAppointment()
get first appointment