5include_once(
'./Modules/Session/classes/class.ilSessionAppointment.php');
 
    6include_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;
 
  232                return strlen($this->
getName()) or 
 
  246                $this->details = $a_details;
 
  262                $this->reg_type = $a_type;
 
  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());
 
  386                return $this->files ? $this->files : array();
 
  404                        $ilErr->appendMessage($this->lng->txt(
"sess_max_members_needed"));
 
  423                $new_obj = parent::cloneObject($a_target_id,$a_copy_id);
 
  432                $new_obj->setAppointments(array($new_app));
 
  436                foreach($this->files as 
$file)
 
  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);
 
const IL_CAL_TRANSLATION_NONE
const DB_FETCHMODE_OBJECT
Apointment templates are used for automatic generated apointments.
static formatDate(ilDateTime $date)
Format a date @access public.
_register($a_usr_id, $a_event_id)
_deleteByEvent($a_event_id)
__construct($a_id=0, $a_call_by_reference=true)
Constructor @access public.
getFirstAppointment()
get first appointment
enabledRegistration()
is registration enabled
static _lookupRegistrationEnabled($a_obj_id)
lookup registration enabled
create()
create new session
setLocation($a_location)
set location
setEmail($a_email)
set email
getLocation()
get location
$reg_waiting_list_autofill
getEventId()
sget event id
setRegistrationType($a_type)
setRegistrationMinUsers($a_users)
initAppointments()
init appointments
setPhone($a_phone)
set phone
setDetails($a_details)
set details
getAppointments()
get appointments
prepareCalendarAppointments($a_mode='create')
Prepare calendar appointments.
setAppointments($appointments)
set appointments
setWaitingListAutoFill($a_value)
cloneDependencies($a_target_id, $a_copy_id)
Clone dependencies.
cloneObject($a_target_id, $a_copy_id=0)
Clone course (no member data)
getPresentationTitle()
get title (overwritten from base class)
getRegistrationMinUsers()
enableRegistrationUserLimit($a_limit)
cloneSettings(ilObjSession $new_obj)
clone settings
static lookupSession($a_obj_id)
Get session data.
isRegistrationUserLimitEnabled()
getRegistrationMaxUsers()
enableRegistrationWaitingList($a_stat)
addAppointment($appointment)
add appointment
hasTutorSettings()
check if there any tutor settings
isRegistrationWaitingListEnabled()
setRegistrationMaxUsers($a_users)
getInstanceByObjId($a_obj_id, $stop_on_error=true)
get an instance of an Ilias object by object id
Class ilObject Basic functions for all objects.
getLongDescription()
get object long description (stored in object_description)
getId()
get object id @access public
getTitle()
get object title @access public
class ilSessionAppointment
_readAppointmentsBySession($a_event_id)
_deleteBySession($a_event_id)
_readFilesByEvent($a_event_id)