5 include_once(
'./Modules/Session/classes/class.ilSessionAppointment.php');
 
   39         public function __construct($a_id = 0,$a_call_by_reference = 
true)
 
   60                 $query = 
"SELECT registration FROM event ".
 
   61                         "WHERE obj_id = ".$ilDB->quote($a_obj_id ,
'integer').
" ";
 
   65                         return (
bool) 
$row->registration;
 
   79                 $query = 
"SELECT * FROM event ".
 
   80                         "WHERE obj_id = ".$ilDB->quote($a_obj_id);
 
  135                 $this->location = $a_location;
 
  157                 $this->name = $a_name;
 
  179                 $this->phone = $a_phone;
 
  202                 $this->email = $a_email;
 
  223                 return strlen($this->
getName()) or 
 
  237                 $this->details = $a_details;
 
  260                 $this->registration = (bool) $a_registration;
 
  282                 return $this->appointments ? $this->appointments : array();
 
  294                 $this->appointments[] = $appointment;
 
  317                 return is_object($this->appointments[0]) ? $this->appointments[0] : ($this->appointments[0] = 
new ilSessionAppointment());
 
  329                 return $this->files ? $this->files : array();
 
  354                 global 
$ilDB,$ilUser,$ilAppEventHandler;
 
  365                 $new_obj->setAppointments(array($new_app));
 
  369                 foreach($this->files as 
$file)
 
  371                         $file->cloneFiles($new_obj->getEventId());
 
  379                 include_once(
'Services/Tracking/classes/class.ilLPObjSettings.php');
 
  381                 $obj_settings->cloneSettings($new_obj->getId());
 
  382                 unset($obj_settings);
 
  397                 $new_obj->setName($this->
getName());
 
  398                 $new_obj->setPhone($this->
getPhone());
 
  399                 $new_obj->setEmail($this->
getEmail());
 
  416                 global $ilObjDataCache;
 
  420                 $target_obj_id = $ilObjDataCache->lookupObjId($a_target_id);
 
  422                 include_once(
'./Modules/Session/classes/class.ilEventItems.php');
 
  424                 $session_materials->cloneItems($this->
getId(),$a_copy_id);
 
  439                 global $ilAppEventHandler;
 
  443                 $next_id = $ilDB->nextId(
'event');
 
  444                 $query = 
"INSERT INTO event (event_id,obj_id,location,tutor_name,tutor_phone,tutor_email,details,registration) ".
 
  446                         $ilDB->quote($next_id,
'integer').
", ".
 
  447                         $this->db->quote($this->
getId() ,
'integer').
", ".
 
  448                         $this->db->quote($this->
getLocation() ,
'text').
",".
 
  449                         $this->db->quote($this->
getName() ,
'text').
", ".
 
  450                         $this->db->quote($this->
getPhone() ,
'text').
", ".
 
  451                         $this->db->quote($this->
getEmail() ,
'text').
", ".
 
  452                         $this->db->quote($this->
getDetails() ,
'text').
",".
 
  456                 $this->event_id = $next_id;
 
  458                 $ilAppEventHandler->raise(
'Modules/Session',
 
  460                         array(
'object' => $this,
 
  461                                 'obj_id' => $this->
getId(),
 
  464                 return $this->
getId();
 
  477                 global $ilAppEventHandler;
 
  479                 if(!parent::update())
 
  483                 $query = 
"UPDATE event SET ".
 
  484                         "location = ".$this->db->quote($this->
getLocation() ,
'text').
",".
 
  485                         "tutor_name = ".$this->db->quote($this->
getName() ,
'text').
", ".
 
  486                         "tutor_phone = ".$this->db->quote($this->
getPhone() ,
'text').
", ".
 
  487                         "tutor_email = ".$this->db->quote($this->
getEmail() ,
'text').
", ".
 
  488                         "details = ".$this->db->quote($this->
getDetails() ,
'text').
", ".
 
  490                         "WHERE obj_id = ".$this->db->quote($this->
getId() ,
'integer').
" ";
 
  493                 $ilAppEventHandler->raise(
'Modules/Session',
 
  495                         array(
'object' => $this,
 
  496                                 'obj_id' => $this->
getId(),
 
  508         public function delete()
 
  511                 global $ilAppEventHandler;
 
  513                 if(!parent::delete())
 
  517                 $query = 
"DELETE FROM event ".
 
  518                         "WHERE obj_id = ".$this->db->quote($this->
getId() ,
'integer').
" ";
 
  521                 include_once(
'./Modules/Session/classes/class.ilSessionAppointment.php');
 
  524                 include_once(
'./Modules/Session/classes/class.ilEventItems.php');
 
  527                 include_once(
'./Modules/Session/classes/class.ilEventParticipants.php');
 
  535                 $ilAppEventHandler->raise(
'Modules/Session',
 
  537                         array(
'object' => $this,
 
  538                                 'obj_id' => $this->
getId(),
 
  556                 $query = 
"SELECT * FROM event WHERE ".
 
  557                         "obj_id = ".$this->db->quote($this->
getId() ,
'integer').
" ";
 
  568                         $this->event_id = 
$row->event_id;
 
  585                 include_once(
'./Modules/Session/classes/class.ilSessionAppointment.php');
 
  598                 include_once(
'./Modules/Session/classes/class.ilSessionFile.php');
 
  612                 include_once(
'./Services/Calendar/classes/class.ilCalendarAppointmentTemplate.php');
 
  621                                 $app->setTitle($this->
getTitle() ? $this->
getTitle() : $this->lng->txt(
'obj_sess'));
 
  625                                 $app->setFullday($sess_app->isFullday());
 
  626                                 $app->setStart($sess_app->getStart());
 
  627                                 $app->setEnd($sess_app->getEnd());