ILIAS  release_7 Revision v7.30-3-g800a261c036
All Data Structures Namespaces Files Functions Variables Modules Pages
class.ilObjSession.php
Go to the documentation of this file.
1 <?php
2 
3 /* Copyright (c) 1998-2010 ILIAS open source, Extended GPL, see docs/LICENSE */
4 
5 include_once('./Modules/Session/classes/class.ilSessionAppointment.php');
6 include_once './Services/Membership/classes/class.ilMembershipRegistrationSettings.php';
7 
16 class ilObjSession extends ilObject
17 {
18  const MAIL_ALLOWED_ALL = 1;
19  const MAIL_ALLOWED_ADMIN = 2;
20 
21  const LOCAL_ROLE_PARTICIPANT_PREFIX = 'il_sess_participant';
22 
23  const CAL_REG_START = 1;
24 
25  protected $db;
26 
27  protected $location;
28  protected $name;
29  protected $phone;
30  protected $email;
31  protected $details;
32  protected $registration;
33  protected $event_id;
34 
36  protected $reg_limited = 0;
37  protected $reg_min_users = 0;
38  protected $reg_limited_users = 0;
39  protected $reg_waiting_list = 0;
40  protected $reg_waiting_list_autofill; // [bool]
41 
45  protected $show_members = false;
46 
51 
55  protected $mail_members = self::MAIL_ALLOWED_ADMIN;
56 
57  protected $appointments;
58  protected $files = array();
59 
63  protected $session_logger = null;
64 
68  protected $members_obj;
69 
72 
79  public function __construct($a_id = 0, $a_call_by_reference = true)
80  {
81  global $DIC;
82 
83  $ilDB = $DIC['ilDB'];
84 
85  $this->session_logger = $GLOBALS['DIC']->logger()->sess();
86 
87  $this->db = $ilDB;
88  $this->type = "sess";
89  parent::__construct($a_id, $a_call_by_reference);
90  }
91 
100  public static function _lookupRegistrationEnabled($a_obj_id)
101  {
102  global $DIC;
103 
104  $ilDB = $DIC['ilDB'];
105 
106  $query = "SELECT reg_type FROM event " .
107  "WHERE obj_id = " . $ilDB->quote($a_obj_id, 'integer') . " ";
108  $res = $ilDB->query($query);
109  while ($row = $res->fetchRow(ilDBConstants::FETCHMODE_OBJECT)) {
110  return (bool) $row->reg_type != ilMembershipRegistrationSettings::TYPE_NONE;
111  }
112  return false;
113  }
114 
120  public static function lookupSession($a_obj_id)
121  {
122  global $DIC;
123 
124  $ilDB = $DIC['ilDB'];
125 
126  $query = "SELECT * FROM event " .
127  "WHERE obj_id = " . $ilDB->quote($a_obj_id);
128  $res = $ilDB->query($query);
129  while ($row = $res->fetchRow(ilDBConstants::FETCHMODE_OBJECT)) {
130  $data['location'] = $row->location ? $row->location : '';
131  $data['details'] = $row->details ? $row->details : '';
132  $data['name'] = $row->tutor_name ? $row->tutor_name : '';
133  $data['email'] = $row->tutor_email ? $row->tutor_email : '';
134  $data['phone'] = $row->tutor_phone ? $row->tutor_phone : '';
135  }
136  return (array) $data;
137  }
138 
146  public function getPresentationTitle()
147  {
148  $date = new ilDate($this->getFirstAppointment()->getStart()->getUnixTime(), IL_CAL_UNIX);
149  if ($this->getTitle()) {
150  return ilDatePresentation::formatDate($this->getFirstAppointment()->getStart()) . ': ' . $this->getTitle();
151  } else {
152  return ilDatePresentation::formatDate($date);
153  }
154  }
155 
160  {
161  $title = '';
162  if ($this->getTitle()) {
163  $title = ': ' . $this->getTitle();
164  }
166  $this->getFirstAppointment()->getStart(),
167  $this->getFirstAppointment()->getEnd()
168  ) . $title;
169  }
170 
174  public function initDefaultRoles()
175  {
176  include_once './Services/AccessControl/classes/class.ilObjRole.php';
178  self::LOCAL_ROLE_PARTICIPANT_PREFIX . '_' . $this->getRefId(),
179  'Participant of session obj_no.' . $this->getId(),
180  self::LOCAL_ROLE_PARTICIPANT_PREFIX,
181  $this->getRefId()
182  );
183 
184  if (!$role instanceof ilObjRole) {
185  $this->session_logger->warning('Could not create default session role.');
186  $this->session_logger->logStack(ilLogLevel::WARNING);
187  }
188  return array();
189  }
190 
197  public function getEventId()
198  {
199  return $this->event_id;
200  }
201 
208  public function setLocation($a_location)
209  {
210  $this->location = $a_location;
211  }
212 
219  public function getLocation()
220  {
221  return $this->location;
222  }
223 
230  public function setName($a_name)
231  {
232  $this->name = $a_name;
233  }
234 
241  public function getName()
242  {
243  return $this->name;
244  }
245 
252  public function setPhone($a_phone)
253  {
254  $this->phone = $a_phone;
255  }
256 
263  public function getPhone()
264  {
265  return $this->phone;
266  }
267 
275  public function setEmail($a_email)
276  {
277  $this->email = $a_email;
278  }
279 
286  public function getEmail()
287  {
288  return $this->email;
289  }
290 
296  public function hasTutorSettings()
297  {
298  return strlen($this->getName()) or
299  strlen($this->getEmail()) or
300  strlen($this->getPhone());
301  }
302 
303 
310  public function setDetails($a_details)
311  {
312  $this->details = $a_details;
313  }
314 
321  public function getDetails()
322  {
323  return $this->details;
324  }
325 
326  public function setRegistrationType($a_type)
327  {
328  $this->reg_type = $a_type;
329  }
330 
331  public function getRegistrationType()
332  {
333  return $this->reg_type;
334  }
335 
337  {
338  return $this->reg_limited;
339  }
340 
341  public function enableRegistrationUserLimit($a_limit)
342  {
343  $this->reg_limited = $a_limit;
344  }
345 
346  public function getRegistrationMinUsers()
347  {
348  return $this->reg_min_users;
349  }
350 
351  public function setRegistrationMinUsers($a_users)
352  {
353  $this->reg_min_users = $a_users;
354  }
355 
356  public function getRegistrationMaxUsers()
357  {
359  }
360 
361  public function setRegistrationMaxUsers($a_users)
362  {
363  $this->reg_limited_users = $a_users;
364  }
365 
367  {
369  }
370 
371  public function enableRegistrationWaitingList($a_stat)
372  {
373  $this->reg_waiting_list = $a_stat;
374  }
375 
376  public function setWaitingListAutoFill($a_value)
377  {
378  $this->reg_waiting_list_autofill = (bool) $a_value;
379  }
380 
381  public function hasWaitingListAutoFill()
382  {
383  return (bool) $this->reg_waiting_list_autofill;
384  }
385 
390  public function setShowMembers($a_status)
391  {
392  $this->show_members = (bool) $a_status;
393  }
394 
399  public function getShowMembers()
400  {
401  return (bool) $this->show_members;
402  }
403 
408  {
410  }
411 
416  public function setRegistrationNotificationEnabled($value)
417  {
418  return $this->registrationNotificationEnabled = $value;
419  }
420 
425  {
427  }
428 
432  public function setRegistrationNotificationOption($value)
433  {
434  $this->notificationOption = $value;
435  }
436 
443  public function enabledRegistration()
444  {
445  return $this->reg_type != ilMembershipRegistrationSettings::TYPE_NONE;
446  }
447 
451  public function enabledRegistrationForUsers() : bool
452  {
453  return
454  $this->reg_type != ilMembershipRegistrationSettings::TYPE_NONE &&
456  }
457 
458  public function isCannotParticipateOptionEnabled() : bool
459  {
461  }
462 
466  public function enableCannotParticipateOption(bool $status) : void
467  {
468  $this->show_cannot_participate_option = $status;
469  }
470 
477  public function getAppointments()
478  {
479  return $this->appointments ? $this->appointments : array();
480  }
481 
489  public function addAppointment($appointment)
490  {
491  $this->appointments[] = $appointment;
492  }
493 
502  {
503  $this->appointments = $appointments;
504  }
505 
512  public function getFirstAppointment()
513  {
514  return is_object($this->appointments[0]) ? $this->appointments[0] : ($this->appointments[0] = new ilSessionAppointment());
515  }
516 
524  public function getFiles()
525  {
526  return $this->files ? $this->files : array();
527  }
528 
529 
534  public function setMailToMembersType($a_type)
535  {
536  $this->mail_members = $a_type;
537  }
538 
543  public function getMailToMembersType()
544  {
545  return $this->mail_members;
546  }
547 
548 
556  public function validate()
557  {
558  global $DIC;
559 
560  $ilErr = $DIC['ilErr'];
561 
562  // #17114
563  if ($this->isRegistrationUserLimitEnabled() &&
564  !$this->getRegistrationMaxUsers()) {
565  $ilErr->appendMessage($this->lng->txt("sess_max_members_needed"));
566  return false;
567  }
568 
569  return true;
570  }
571 
580  public function cloneObject($a_target_id, $a_copy_id = 0, $a_omit_tree = false)
581  {
585  $new_obj = parent::cloneObject($a_target_id, $a_copy_id, $a_omit_tree);
586 
588  $new_obj->applyDidacticTemplate($dtpl);
589 
590  $this->read();
591 
592  $this->cloneSettings($new_obj);
593  $this->cloneMetaData($new_obj);
594 
595 
596  // Clone appointment
597  $new_app = $this->getFirstAppointment()->cloneObject($new_obj->getId());
598  $new_obj->setAppointments(array($new_app));
599  $new_obj->update(true);
600 
601  // Clone session files
602  foreach ($this->files as $file) {
603  $file->cloneFiles($new_obj->getEventId());
604  }
605 
606  // Raise update forn new appointments
607 
608 
609 
610  // Copy learning progress settings
611  include_once('Services/Tracking/classes/class.ilLPObjSettings.php');
612  $obj_settings = new ilLPObjSettings($this->getId());
613  $obj_settings->cloneSettings($new_obj->getId());
614  unset($obj_settings);
615 
616  return $new_obj;
617  }
618 
626  public function cloneSettings(ilObjSession $new_obj)
627  {
629  $new_obj->getId(),
632  $this->getId(),
634  )
635  );
636 
637  // @var ilObjSession $new_obj
638  $new_obj->setLocation($this->getLocation());
639  $new_obj->setName($this->getName());
640  $new_obj->setPhone($this->getPhone());
641  $new_obj->setEmail($this->getEmail());
642  $new_obj->setDetails($this->getDetails());
643 
644  $new_obj->setRegistrationType($this->getRegistrationType());
650  $new_obj->setShowMembers($this->getShowMembers());
651  $new_obj->setMailToMembersType($this->getMailToMembersType());
652 
656 
657  $new_obj->update(true);
658 
659  return true;
660  }
661 
669  public function cloneDependencies($a_target_id, $a_copy_id)
670  {
671  global $DIC;
672 
673  $ilObjDataCache = $DIC['ilObjDataCache'];
674 
675  parent::cloneDependencies($a_target_id, $a_copy_id);
676 
677  $target_obj_id = $ilObjDataCache->lookupObjId($a_target_id);
678 
679  include_once('./Modules/Session/classes/class.ilEventItems.php');
680  $session_materials = new ilEventItems($target_obj_id);
681  $session_materials->cloneItems($this->getId(), $a_copy_id);
682 
683  return true;
684  }
685 
686 
687 
693  public function create($a_skip_meta_data = false)
694  {
695  global $DIC;
696 
697  $ilDB = $DIC['ilDB'];
698  global $DIC;
699 
700  $ilAppEventHandler = $DIC['ilAppEventHandler'];
701 
702  parent::create();
703 
704  if (!$a_skip_meta_data) {
705  $this->createMetaData();
706  }
707 
708  $next_id = $ilDB->nextId('event');
709  $query = "INSERT INTO event (event_id,obj_id,location,tutor_name,tutor_phone,tutor_email,details,registration, " .
710  'reg_type, reg_limit_users, reg_limited, reg_waiting_list, reg_min_users, reg_auto_wait,show_members,mail_members,
711  reg_notification, notification_opt, show_cannot_part) ' .
712  "VALUES( " .
713  $ilDB->quote($next_id, 'integer') . ", " .
714  $this->db->quote($this->getId(), 'integer') . ", " .
715  $this->db->quote($this->getLocation(), 'text') . "," .
716  $this->db->quote($this->getName(), 'text') . ", " .
717  $this->db->quote($this->getPhone(), 'text') . ", " .
718  $this->db->quote($this->getEmail(), 'text') . ", " .
719  $this->db->quote($this->getDetails(), 'text') . "," .
720  $this->db->quote($this->enabledRegistrationForUsers(), 'integer') . ", " .
721  $this->db->quote($this->getRegistrationType(), 'integer') . ', ' .
722  $this->db->quote($this->getRegistrationMaxUsers(), 'integer') . ', ' .
723  $this->db->quote($this->isRegistrationUserLimitEnabled(), 'integer') . ', ' .
724  $this->db->quote($this->isRegistrationWaitingListEnabled(), 'integer') . ', ' .
725  $this->db->quote($this->getRegistrationMinUsers(), 'integer') . ', ' .
726  $this->db->quote($this->hasWaitingListAutoFill(), 'integer') . ', ' .
727  $this->db->quote($this->getShowMembers(), 'integer') . ', ' .
728  $this->db->quote($this->getMailToMembersType(), 'integer') . ',' .
729  $this->db->quote($this->isRegistrationNotificationEnabled(), 'integer') . ', ' .
730  $this->db->quote($this->getRegistrationNotificationOption(), 'text') . ', ' .
731  $this->db->quote($this->isCannotParticipateOptionEnabled(), ilDBConstants::T_INTEGER) . ' ' .
732  ")";
733  $res = $ilDB->manipulate($query);
734  $this->event_id = $next_id;
735 
736  $ilAppEventHandler->raise(
737  'Modules/Session',
738  'create',
739  array('object' => $this,
740  'obj_id' => $this->getId(),
741  'appointments' => $this->prepareCalendarAppointments('create'))
742  );
743 
744  return $this->getId();
745  }
746 
754  public function update($a_skip_meta_update = false)
755  {
756  global $DIC;
757 
758  $ilDB = $DIC['ilDB'];
759  global $DIC;
760 
761  $ilAppEventHandler = $DIC['ilAppEventHandler'];
762 
763  if (!parent::update()) {
764  return false;
765  }
766  if (!$a_skip_meta_update) {
767  $this->updateMetaData();
768  }
769 
770  $query = "UPDATE event SET " .
771  "location = " . $this->db->quote($this->getLocation(), 'text') . "," .
772  "tutor_name = " . $this->db->quote($this->getName(), 'text') . ", " .
773  "tutor_phone = " . $this->db->quote($this->getPhone(), 'text') . ", " .
774  "tutor_email = " . $this->db->quote($this->getEmail(), 'text') . ", " .
775  "details = " . $this->db->quote($this->getDetails(), 'text') . ", " .
776  "registration = " . $this->db->quote($this->enabledRegistrationForUsers(), 'integer') . ", " .
777  "reg_type = " . $this->db->quote($this->getRegistrationType(), 'integer') . ", " .
778  "reg_limited = " . $this->db->quote($this->isRegistrationUserLimitEnabled(), 'integer') . ", " .
779  "reg_limit_users = " . $this->db->quote($this->getRegistrationMaxUsers(), 'integer') . ", " .
780  "reg_min_users = " . $this->db->quote($this->getRegistrationMinUsers(), 'integer') . ", " .
781  "reg_waiting_list = " . $this->db->quote($this->isRegistrationWaitingListEnabled(), 'integer') . ", " .
782  "reg_auto_wait = " . $this->db->quote($this->hasWaitingListAutoFill(), 'integer') . ", " .
783  'show_members = ' . $this->db->quote($this->getShowMembers(), 'integer') . ', ' .
784  'mail_members = ' . $this->db->quote($this->getMailToMembersType(), 'integer') . ', ' .
785  "reg_auto_wait = " . $this->db->quote($this->hasWaitingListAutoFill(), 'integer') . ", " .
786  "reg_notification = " . $this->db->quote($this->isRegistrationNotificationEnabled(), 'integer') . ", " .
787  "notification_opt = " . $this->db->quote($this->getRegistrationNotificationOption(), 'text') . ", " .
788  'show_cannot_part = ' . $this->db->quote($this->isCannotParticipateOptionEnabled(), ilDBConstants::T_INTEGER) . ' ' .
789  "WHERE obj_id = " . $this->db->quote($this->getId(), 'integer') . " ";
790  $res = $ilDB->manipulate($query);
791 
792  $ilAppEventHandler->raise(
793  'Modules/Session',
794  'update',
795  array('object' => $this,
796  'obj_id' => $this->getId(),
797  'appointments' => $this->prepareCalendarAppointments('update'))
798  );
799  return true;
800  }
801 
808  public function delete()
809  {
810  global $DIC;
811 
812  $ilDB = $DIC['ilDB'];
813  global $DIC;
814 
815  $ilAppEventHandler = $DIC['ilAppEventHandler'];
816 
817  if (!parent::delete()) {
818  return false;
819  }
820 
821  // delete meta data
822  $this->deleteMetaData();
823 
824  $query = "DELETE FROM event " .
825  "WHERE obj_id = " . $this->db->quote($this->getId(), 'integer') . " ";
826  $res = $ilDB->manipulate($query);
827 
828  include_once('./Modules/Session/classes/class.ilSessionAppointment.php');
830 
831  include_once('./Modules/Session/classes/class.ilEventItems.php');
832  ilEventItems::_delete($this->getId());
833 
834  include_once('./Modules/Session/classes/class.ilEventParticipants.php');
836 
837  foreach ($this->getFiles() as $file) {
838  $file->delete();
839  }
840 
841  $ilAppEventHandler->raise(
842  'Modules/Session',
843  'delete',
844  array('object' => $this,
845  'obj_id' => $this->getId(),
846  'appointments' => $this->prepareCalendarAppointments('delete'))
847  );
848 
849 
850  return true;
851  }
852 
860  public function read()
861  {
862  parent::read();
863 
864  $query = "SELECT * FROM event WHERE " .
865  "obj_id = " . $this->db->quote($this->getId(), 'integer') . " ";
866  $res = $this->db->query($query);
867 
868  while ($row = $res->fetchRow(ilDBConstants::FETCHMODE_OBJECT)) {
869  $this->setLocation($row->location);
870  $this->setName($row->tutor_name);
871  $this->setPhone($row->tutor_phone);
872  $this->setEmail($row->tutor_email);
873  $this->setDetails($row->details);
874  $this->setRegistrationType($row->reg_type);
875  $this->enableRegistrationUserLimit($row->reg_limited);
876  $this->enableRegistrationWaitingList($row->reg_waiting_list);
877  $this->setWaitingListAutoFill($row->reg_auto_wait);
878  $this->setRegistrationMaxUsers($row->reg_limit_users);
879  $this->setRegistrationMinUsers($row->reg_min_users);
880  $this->setShowMembers((bool) $row->show_members);
881  $this->setMailToMembersType((int) $row->mail_members);
882  $this->setRegistrationNotificationEnabled($row->reg_notification);
883  $this->setRegistrationNotificationOption($row->notification_opt);
884  $this->enableCannotParticipateOption((bool) $row->show_cannot_part);
885  $this->event_id = $row->event_id;
886  }
887 
888  $this->initAppointments();
889  $this->initFiles();
890  }
891 
899  protected function initAppointments()
900  {
901  // get assigned appointments
902  include_once('./Modules/Session/classes/class.ilSessionAppointment.php');
903  $this->appointments = ilSessionAppointment::_readAppointmentsBySession($this->getId());
904  }
905 
913  public function initFiles()
914  {
915  include_once('./Modules/Session/classes/class.ilSessionFile.php');
921  //$this->files = ilSessionFile::_readFilesByEvent($this->getEventId());
922  }
923 
924 
932  public function prepareCalendarAppointments($a_mode = 'create')
933  {
934  include_once('./Services/Calendar/classes/class.ilCalendarAppointmentTemplate.php');
935 
936  switch ($a_mode) {
937  case 'create':
938  case 'update':
939 
940  $app = new ilCalendarAppointmentTemplate(self::CAL_REG_START);
941  $app->setTranslationType(IL_CAL_TRANSLATION_NONE);
942  $app->setTitle($this->getTitle() ? $this->getTitle() : $this->lng->txt('obj_sess'));
943  $app->setDescription($this->getLongDescription());
944  $app->setLocation($this->getLocation());
945 
946  $sess_app = $this->getFirstAppointment();
947  $app->setFullday($sess_app->isFullday());
948  $app->setStart($sess_app->getStart());
949  $app->setEnd($sess_app->getEnd());
950  $apps[] = $app;
951 
952  return $apps;
953 
954  case 'delete':
955  // Nothing to do: The category and all assigned appointments will be deleted.
956  return array();
957  }
958  }
959 
963  public function handleAutoFill()
964  {
965  if (
967  !$this->hasWaitingListAutoFill()
968  ) {
969  $this->session_logger->debug('Waiting list or auto fill is disabled.');
970  return true;
971  }
972 
974  $current = $parts->getCountParticipants();
975  $max = $this->getRegistrationMaxUsers();
976 
977  if ($max <= $current) {
978  $this->session_logger->debug('Maximum number of participants not reached.');
979  $this->session_logger->debug('Maximum number of members: ' . $max);
980  $this->session_logger->debug('Current number of members: ' . $current);
981  return true;
982  }
983 
984  $session_waiting_list = new ilSessionWaitingList($this->getId());
985  foreach ($session_waiting_list->getUserIds() as $user_id) {
986  $user = ilObjectFactory::getInstanceByObjId($user_id);
987  if (!$user instanceof ilObjUser) {
988  $this->session_logger->warning('Found invalid user id on waiting list: ' . $user_id);
989  continue;
990  }
991  if (in_array($user_id, $parts->getParticipants())) {
992  $this->session_logger->notice('User on waiting list already session member: ' . $user_id);
993  continue;
994  }
995 
996  if ($this->enabledRegistrationForUsers()) {
997  $this->session_logger->debug('Registration enabled: register user');
998  $parts->register($user_id);
999  $parts->sendNotification(
1001  $user_id
1002  );
1003  } else {
1004  $this->session_logger->debug('Registration disabled: set user status to participated.');
1005  $parts->getEventParticipants()->updateParticipation($user_id, true);
1006  $parts->sendNotification(
1008  $user_id
1009  );
1010  }
1011 
1012  $session_waiting_list->removeFromList($user_id);
1013 
1014  $current++;
1015  if ($current >= $max) {
1016  break;
1017  }
1018  }
1019  }
1020 
1021 
1029  protected function initParticipants()
1030  {
1031  $this->members_obj = ilSessionParticipants::_getInstanceByObjId($this->getId());
1032  }
1033 
1039  public function getMembersObject()
1040  {
1041  if (!$this->members_obj instanceof ilSessionParticipants) {
1042  $this->initParticipants();
1043  }
1044  return $this->members_obj;
1045  }
1046 
1051  public function getEnableMap()
1052  {
1053  return false;
1054  }
1055 }
create($a_skip_meta_data=false)
create new session
static lookupTemplateId($a_ref_id)
Lookup template id ilDB $ilDB.
getPresentationTitle()
get title (overwritten from base class)
$app
Definition: cli.php:38
Class ilObjRole.
enabledRegistration()
is registration enabled
enableRegistrationUserLimit($a_limit)
getMembersObject()
Get members objects.
initFiles()
init files
Session participation handling.
getEnableMap()
ALways disabled.
addAppointment($appointment)
add appointment
getEmail()
get email
$data
Definition: storeScorm.php:23
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.
updateMetaData()
update meta data entry
read()
read session data
setPhone($a_phone)
set phone
const LOCAL_ROLE_PARTICIPANT_PREFIX
initAppointments()
init appointments
createMetaData()
create meta data entry
setWaitingListAutoFill($a_value)
setName($a_name)
set name
setEmail($a_email)
set email
Apointment templates are used for automatic generated apointments.
const IL_CAL_UNIX
setMailToMembersType($a_type)
Set mail to members type.
static _getInstanceByObjId($a_obj_id)
Get instance.
static formatDate(ilDateTime $date, $a_skip_day=false, $a_include_wd=false, $include_seconds=false)
Format a date public.
getAppointments()
get appointments
$ilErr
Definition: raiseError.php:18
static createDefaultRole($a_title, $a_description, $a_tpl_name, $a_ref_id)
static lookupSession($a_obj_id)
Get session data.
static _deleteBySession($a_event_id)
cloneDependencies($a_target_id, $a_copy_id)
Clone dependencies.
enableCannotParticipateOption(bool $status)
setRegistrationMinUsers($a_users)
Class for single dates.
foreach($_POST as $key=> $value) $res
getId()
get object id public
handleAutoFill()
Handle auto fill for session members.
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.
global $DIC
Definition: goto.php:24
if(!defined('PATH_SEPARATOR')) $GLOBALS['_PEAR_default_error_mode']
Definition: PEAR.php:64
getTitle()
get object title public
cloneMetaData($target_obj)
Copy meta data.
getFiles()
get files
getPhone()
get phone
$query
getMailToMembersType()
Get mail to members type.
getShowMembers()
Member gallery enabled.
static _deleteByEvent($a_event_id)
static getInstanceByObjId($a_obj_id, $stop_on_error=true)
get an instance of an Ilias object by object id
initDefaultRoles()
Create local session participant role.
static formatPeriod(ilDateTime $start, ilDateTime $end, $a_skip_starting_day=false)
Format a period of two date Shows: 14.
setAppointments($appointments)
set appointments
setDetails($a_details)
set details
__construct(Container $dic, ilPlugin $plugin)
getDetails()
get details
global $ilDB
getLongDescription()
get object long description (stored in object_description)
getRefId()
get reference id public
static _readAppointmentsBySession($a_event_id)
setRegistrationNotificationOption($value)
setShowMembers($a_status)
Show members gallery.
static _writeContainerSetting($a_id, $a_keyword, $a_value)
setRegistrationMaxUsers($a_users)
deleteMetaData()
delete meta data entry
setRegistrationNotificationEnabled($value)
initParticipants()
init participants object
enableRegistrationWaitingList($a_stat)
update($a_skip_meta_update=false)
update object
getPresentationTitleAppointmentPeriod()
static _lookupContainerSetting($a_id, $a_keyword, $a_default_value=null)
Lookup a container setting.
class ilEvent
class ilSessionAppointment
static _delete($a_event_id)
getFirstAppointment()
get first appointment