5 include_once(
'./Modules/Session/classes/class.ilSessionAppointment.php');
6 include_once
'./Services/Membership/classes/class.ilMembershipRegistrationSettings.php';
47 public function __construct($a_id = 0,$a_call_by_reference =
true)
68 $query =
"SELECT reg_type FROM event ".
69 "WHERE obj_id = ".$ilDB->quote($a_obj_id ,
'integer').
" ";
87 $query =
"SELECT * FROM event ".
88 "WHERE obj_id = ".$ilDB->quote($a_obj_id);
92 $data[
'location'] =
$row->location ?
$row->location :
'';
93 $data[
'details'] =
$row->details ?
$row->details :
'';
94 $data[
'name'] =
$row->tutor_name ?
$row->tutor_name :
'';
95 $data[
'email'] =
$row->tutor_email ?
$row->tutor_email :
'';
96 $data[
'phone'] =
$row->tutor_phone ?
$row->tutor_phone :
'';
143 $this->location = $a_location;
165 $this->name = $a_name;
187 $this->phone = $a_phone;
210 $this->email = $a_email;
231 return strlen($this->
getName()) or
245 $this->details = $a_details;
261 $this->reg_type = $a_type;
276 $this->reg_limited = $a_limit;
286 $this->reg_limited_users = $a_users;
296 $this->reg_waiting_list = $a_stat;
320 return $this->appointments ? $this->appointments : array();
332 $this->appointments[] = $appointment;
355 return is_object($this->appointments[0]) ? $this->appointments[0] : ($this->appointments[0] =
new ilSessionAppointment());
367 return $this->files ? $this->files : array();
403 $new_obj->setAppointments(array($new_app));
407 foreach($this->files as
$file)
409 $file->cloneFiles($new_obj->getEventId());
417 include_once(
'Services/Tracking/classes/class.ilLPObjSettings.php');
419 $obj_settings->cloneSettings($new_obj->getId());
420 unset($obj_settings);
460 global $ilObjDataCache;
464 $target_obj_id = $ilObjDataCache->lookupObjId($a_target_id);
466 include_once(
'./Modules/Session/classes/class.ilEventItems.php');
468 $session_materials->cloneItems($this->
getId(),$a_copy_id);
483 global $ilAppEventHandler;
487 $next_id = $ilDB->nextId(
'event');
488 $query =
"INSERT INTO event (event_id,obj_id,location,tutor_name,tutor_phone,tutor_email,details,registration, ".
489 'reg_type, reg_limit_users, reg_limited,reg_waiting_list) '.
491 $ilDB->quote($next_id,
'integer').
", ".
492 $this->db->quote($this->
getId() ,
'integer').
", ".
493 $this->db->quote($this->
getLocation() ,
'text').
",".
494 $this->db->quote($this->
getName() ,
'text').
", ".
495 $this->db->quote($this->
getPhone() ,
'text').
", ".
496 $this->db->quote($this->
getEmail() ,
'text').
", ".
497 $this->db->quote($this->
getDetails() ,
'text').
",".
505 $this->event_id = $next_id;
507 $ilAppEventHandler->raise(
'Modules/Session',
509 array(
'object' => $this,
510 'obj_id' => $this->
getId(),
513 return $this->
getId();
526 global $ilAppEventHandler;
528 if(!parent::update())
532 $query =
"UPDATE event SET ".
533 "location = ".$this->db->quote($this->
getLocation() ,
'text').
",".
534 "tutor_name = ".$this->db->quote($this->
getName() ,
'text').
", ".
535 "tutor_phone = ".$this->db->quote($this->
getPhone() ,
'text').
", ".
536 "tutor_email = ".$this->db->quote($this->
getEmail() ,
'text').
", ".
537 "details = ".$this->db->quote($this->
getDetails() ,
'text').
", ".
543 "WHERE obj_id = ".$this->db->quote($this->
getId() ,
'integer').
" ";
546 $ilAppEventHandler->raise(
'Modules/Session',
548 array(
'object' => $this,
549 'obj_id' => $this->
getId(),
560 public function delete()
563 global $ilAppEventHandler;
565 if(!parent::delete())
569 $query =
"DELETE FROM event ".
570 "WHERE obj_id = ".$this->db->quote($this->
getId() ,
'integer').
" ";
573 include_once(
'./Modules/Session/classes/class.ilSessionAppointment.php');
576 include_once(
'./Modules/Session/classes/class.ilEventItems.php');
579 include_once(
'./Modules/Session/classes/class.ilEventParticipants.php');
587 $ilAppEventHandler->raise(
'Modules/Session',
589 array(
'object' => $this,
590 'obj_id' => $this->
getId(),
608 $query =
"SELECT * FROM event WHERE ".
609 "obj_id = ".$this->db->quote($this->
getId() ,
'integer').
" ";
623 $this->event_id =
$row->event_id;
640 include_once(
'./Modules/Session/classes/class.ilSessionAppointment.php');
653 include_once(
'./Modules/Session/classes/class.ilSessionFile.php');
667 include_once(
'./Services/Calendar/classes/class.ilCalendarAppointmentTemplate.php');
676 $app->setTitle($this->
getTitle() ? $this->
getTitle() : $this->lng->txt(
'obj_sess'));
680 $app->setFullday($sess_app->isFullday());
681 $app->setStart($sess_app->getStart());
682 $app->setEnd($sess_app->getEnd());