ILIAS  release_8 Revision v8.19-1-g4e8f2f9140c
All Data Structures Namespaces Files Functions Variables Modules Pages
ilObjSession Class Reference
+ Inheritance diagram for ilObjSession:
+ Collaboration diagram for ilObjSession:

Public Member Functions

 __construct (int $a_id=0, bool $a_call_by_reference=true)
 
 getPresentationTitle ()
 
 getPresentationTitleAppointmentPeriod ()
 
 initDefaultRoles ()
 Create local session participant role. More...
 
 getEventId ()
 
 setLocation (string $a_location)
 
 getLocation ()
 
 setName (string $a_name)
 
 getName ()
 
 setPhone (string $a_phone)
 
 getPhone ()
 
 setEmail (string $a_email)
 
 getEmail ()
 
 hasTutorSettings ()
 
 setDetails (string $a_details)
 
 getDetails ()
 
 setRegistrationType (int $a_type)
 
 getRegistrationType ()
 
 isRegistrationUserLimitEnabled ()
 
 enableRegistrationUserLimit (int $a_limit)
 
 getRegistrationMinUsers ()
 
 setRegistrationMinUsers (int $a_users)
 
 getRegistrationMaxUsers ()
 
 setRegistrationMaxUsers (int $a_users)
 
 isRegistrationWaitingListEnabled ()
 
 enableRegistrationWaitingList (bool $a_stat)
 
 setWaitingListAutoFill (bool $a_value)
 
 hasWaitingListAutoFill ()
 
 setShowMembers (bool $a_status)
 
 getShowMembers ()
 
 isRegistrationNotificationEnabled ()
 
 setRegistrationNotificationEnabled (bool $value)
 
 getRegistrationNotificationOption ()
 
 setRegistrationNotificationOption (string $value)
 
 enabledRegistration ()
 
 enabledRegistrationForUsers ()
 
 isCannotParticipateOptionEnabled ()
 
 enableCannotParticipateOption (bool $status)
 
 getAppointments ()
 
 addAppointment (ilSessionAppointment $appointment)
 
 setAppointments (array $appointments)
 
 getFirstAppointment ()
 
 getFiles ()
 
 setMailToMembersType (int $a_type)
 
 getMailToMembersType ()
 
 validate ()
 
 cloneSettings (ilObjSession $new_obj)
 
 cloneDependencies ($a_target_id, $a_copy_id)
 
 create (bool $a_skip_meta_data=false)
 
 update (bool $a_skip_meta_update=false)
 
 delete ()
 
 read ()
 
 initFiles ()
 
 prepareCalendarAppointments (string $a_mode='create')
 
 handleAutoFill ()
 
 getMembersObject ()
 
 getEnableMap ()
 
- Public Member Functions inherited from ilObject
 __construct (int $id=0, bool $reference=true)
 
 withReferences ()
 determines whether objects are referenced or not (got ref ids or not) More...
 
 processAutoRating ()
 
 read ()
 
 getId ()
 
 setId (int $id)
 
 setRefId (int $ref_id)
 
 getRefId ()
 
 getType ()
 
 setType (string $type)
 
 getPresentationTitle ()
 get presentation title Normally same as title Overwritten for sessions More...
 
 getTitle ()
 
 getUntranslatedTitle ()
 Get untranslated object title WebDAV needs to access the untranslated title of an object. More...
 
 setTitle (string $title)
 
 getDescription ()
 
 setDescription (string $desc)
 
 getLongDescription ()
 get object long description (stored in object_description) More...
 
 getImportId ()
 
 setImportId (string $import_id)
 
 setOfflineStatus (bool $status)
 
 getOfflineStatus ()
 
 supportsOfflineHandling ()
 
 getOwner ()
 
 getOwnerName ()
 get full name of object owner More...
 
 setOwner (int $usr_id)
 
 getCreateDate ()
 Get create date in YYYY-MM-DD HH-MM-SS format. More...
 
 getLastUpdateDate ()
 Get last update date in YYYY-MM-DD HH-MM-SS format. More...
 
 create ()
 note: title, description and type should be set when this function is called More...
 
 update ()
 
 MDUpdateListener (string $element)
 Metadata update listener. More...
 
 createMetaData ()
 
 updateMetaData ()
 
 deleteMetaData ()
 
 updateOwner ()
 update owner of object in db More...
 
 putInTree (int $parent_ref_id)
 maybe this method should be in tree object!? More...
 
 setPermissions (int $parent_ref_id)
 
 setParentRolePermissions (int $parent_ref_id)
 Initialize the permissions of parent roles (local roles of categories, global roles...) This method is overwritten in e.g. More...
 
 createReference ()
 creates reference for object More...
 
 countReferences ()
 
 delete ()
 delete object or referenced object (in the case of a referenced object, object data is only deleted if last reference is deleted) This function removes an object entirely from system!! More...
 
 initDefaultRoles ()
 init default roles settings Purpose of this function is to create a local role folder and local roles, that are needed depending on the object type. More...
 
 applyDidacticTemplate (int $tpl_id)
 
 getXMLZip ()
 
 getHTMLDirectory ()
 
 appendCopyInfo (int $target_id, int $copy_id)
 Prepend Copy info if object with same name exists in that container. More...
 
 cloneDependencies (int $target_id, int $copy_id)
 Clone object dependencies. More...
 
 cloneMetaData (ilObject $target_obj)
 Copy meta data. More...
 
 selfOrParentWithRatingEnabled ()
 
 getPossibleSubObjects (bool $filter=true)
 get all possible sub objects of this type the object can decide which types of sub objects are possible jut in time overwrite if the decision distinguish from standard model More...
 

Static Public Member Functions

static _lookupRegistrationEnabled (int $a_obj_id)
 
static lookupSession (int $a_obj_id)
 
- Static Public Member Functions inherited from ilObject
static _lookupObjIdByImportId (string $import_id)
 Get (latest) object id for an import id. More...
 
static _lookupImportId (int $obj_id)
 
static _lookupOwnerName (int $owner_id)
 Lookup owner name for owner id. More...
 
static _getIdForImportId (string $import_id)
 
static _getAllReferences (int $id)
 get all reference ids for object ID More...
 
static _lookupTitle (int $obj_id)
 
static lookupOfflineStatus (int $obj_id)
 Lookup offline status using objectDataCache. More...
 
static _lookupOwner (int $obj_id)
 Lookup owner user ID for object ID. More...
 
static _getIdsForTitle (string $title, string $type='', bool $partial_match=false)
 
static _lookupDescription (int $obj_id)
 
static _lookupLastUpdate (int $obj_id, bool $formatted=false)
 
static _getLastUpdateOfObjects (array $obj_ids)
 
static _lookupObjId (int $ref_id)
 
static _setDeletedDate (int $ref_id, int $deleted_by)
 
static setDeletedDates (array $ref_ids, int $user_id)
 
static _resetDeletedDate (int $ref_id)
 
static _lookupDeletedDate (int $ref_id)
 
static _writeTitle (int $obj_id, string $title)
 write title to db (static) More...
 
static _writeDescription (int $obj_id, string $desc)
 write description to db (static) More...
 
static _writeImportId (int $obj_id, string $import_id)
 write import id to db (static) More...
 
static _lookupType (int $id, bool $reference=false)
 
static _isInTrash (int $ref_id)
 
static _hasUntrashedReference (int $obj_id)
 checks whether an object has at least one reference that is not in trash More...
 
static _lookupObjectId (int $ref_id)
 
static _getObjectsDataForType (string $type, bool $omit_trash=false)
 get all objects of a certain type More...
 
static _exists (int $id, bool $reference=false, ?string $type=null)
 checks if an object exists in object_data More...
 
static _getObjectsByType (string $obj_type="", int $owner=null)
 
static _prepareCloneSelection (array $ref_ids, string $new_type, bool $show_path=true)
 Prepare copy wizard object selection. More...
 
static _getIcon (int $obj_id=0, string $size="big", string $type="", bool $offline=false)
 Get icon for repository item. More...
 
static collectDeletionDependencies (array &$deps, int $ref_id, int $obj_id, string $type, int $depth=0)
 Collect deletion dependencies. More...
 
static getDeletionDependencies (int $obj_id)
 Get deletion dependencies. More...
 
static getLongDescriptions (array $obj_ids)
 
static getAllOwnedRepositoryObjects (int $user_id)
 
static fixMissingTitles ($type, array &$obj_title_map)
 Try to fix missing object titles. More...
 
static _lookupCreationDate (int $obj_id)
 
static _getObjectTypeIdByTitle (string $type, \ilDBInterface $ilDB=null)
 

Data Fields

const MAIL_ALLOWED_ALL = 1
 
const MAIL_ALLOWED_ADMIN = 2
 
const LOCAL_ROLE_PARTICIPANT_PREFIX = 'il_sess_participant'
 
const CAL_REG_START = 1
 
- Data Fields inherited from ilObject
const TITLE_LENGTH = 255
 
const DESC_LENGTH = 128
 
const LONG_DESC_LENGTH = 4000
 
const TABLE_OBJECT_DATA = "object_data"
 
array $objectList
 
string $untranslatedTitle
 

Protected Member Functions

 initAppointments ()
 
 initParticipants ()
 
- Protected Member Functions inherited from ilObject
 doMDUpdateListener (string $a_element)
 
 beforeMDUpdateListener (string $a_element)
 
 doCreateMetaData ()
 
 beforeCreateMetaData ()
 
 doUpdateMetaData ()
 
 beforeUpdateMetaData ()
 
 doDeleteMetaData ()
 
 beforeDeleteMetaData ()
 
 handleAutoRating ()
 
 hasAutoRating ()
 

Protected Attributes

ilLogger $session_logger
 
ilObjectDataCache $obj_data_cache
 
ilAppEventHandler $event_handler
 
string $location = ""
 
string $name = ""
 
string $phone = ""
 
string $email = ""
 
string $details = ""
 
int $event_id = 0
 
int $reg_type = ilMembershipRegistrationSettings::TYPE_NONE
 
int $reg_limited = 0
 
int $reg_min_users = 0
 
int $reg_limited_users = 0
 
bool $reg_waiting_list = false
 
bool $reg_waiting_list_autofill = false
 
bool $show_members = false
 
bool $show_cannot_participate_option = true
 
int $mail_members = self::MAIL_ALLOWED_ADMIN
 
array $appointments = []
 
array $files = []
 
ilSessionParticipants $members_obj = null
 
bool $registrationNotificationEnabled = false
 
string $notificationOption = ilSessionConstants::NOTIFICATION_INHERIT_OPTION
 
- Protected Attributes inherited from ilObject
ilLogger $obj_log
 
ILIAS $ilias
 
ilObjectDefinition $obj_definition
 
ilDBInterface $db
 
ilLogger $log
 
ilErrorHandling $error
 
ilTree $tree
 
ilAppEventHandler $app_event_handler
 
ilRbacAdmin $rbac_admin
 
ilRbacReview $rbac_review
 
ilObjUser $user
 
ilLanguage $lng
 
int $id
 
bool $referenced
 
bool $call_by_reference
 
int $max_title = self::TITLE_LENGTH
 
int $max_desc = self::DESC_LENGTH
 
bool $add_dots = true
 
int $ref_id = null
 
string $type = ""
 
string $title = ""
 
bool $offline = false
 
string $desc = ""
 
string $long_desc = ""
 
int $owner = 0
 
string $create_date = ""
 
string $last_update = ""
 
string $import_id = ""
 
bool $register = false
 

Detailed Description

Definition at line 30 of file class.ilObjSession.php.

Constructor & Destructor Documentation

◆ __construct()

ilObjSession::__construct ( int  $a_id = 0,
bool  $a_call_by_reference = true 
)

Definition at line 61 of file class.ilObjSession.php.

References $DIC, and ILIAS\GlobalScreen\Provider\__construct().

62  {
63  global $DIC;
64 
65  $this->session_logger = $DIC->logger()->sess();
66  $this->obj_data_cache = $DIC['ilObjDataCache'];
67  $this->event_handler = $DIC->event();
68 
69  $this->type = "sess";
70  parent::__construct($a_id, $a_call_by_reference);
71  }
global $DIC
Definition: feed.php:28
__construct(Container $dic, ilPlugin $plugin)
+ Here is the call graph for this function:

Member Function Documentation

◆ _lookupRegistrationEnabled()

static ilObjSession::_lookupRegistrationEnabled ( int  $a_obj_id)
static

Definition at line 73 of file class.ilObjSession.php.

References $DIC, $ilDB, $query, $res, ilDBConstants\FETCHMODE_OBJECT, and ilMembershipRegistrationSettings\TYPE_NONE.

Referenced by ilLPStatusEvent\_getStatusInfo(), and ilLPStatusEvent\determineStatus().

73  : bool
74  {
75  global $DIC;
76 
77  $ilDB = $DIC->database();
78 
79  $query = "SELECT reg_type FROM event " .
80  "WHERE obj_id = " . $ilDB->quote($a_obj_id, 'integer') . " ";
81  $res = $ilDB->query($query);
82  while ($row = $res->fetchRow(ilDBConstants::FETCHMODE_OBJECT)) {
83  return (bool) $row->reg_type != ilMembershipRegistrationSettings::TYPE_NONE;
84  }
85  return false;
86  }
$res
Definition: ltiservices.php:69
global $DIC
Definition: feed.php:28
$query
+ Here is the caller graph for this function:

◆ addAppointment()

ilObjSession::addAppointment ( ilSessionAppointment  $appointment)

Definition at line 327 of file class.ilObjSession.php.

327  : void
328  {
329  $this->appointments[] = $appointment;
330  }

◆ cloneDependencies()

ilObjSession::cloneDependencies (   $a_target_id,
  $a_copy_id 
)

Definition at line 448 of file class.ilObjSession.php.

References $obj_data_cache, and ilObject\getId().

448  : bool
449  {
450  $ilObjDataCache = $this->obj_data_cache;
451 
452  parent::cloneDependencies($a_target_id, $a_copy_id);
453 
454  $target_obj_id = $ilObjDataCache->lookupObjId($a_target_id);
455 
456  $session_materials = new ilEventItems($target_obj_id);
457  $session_materials->cloneItems($this->getId(), $a_copy_id);
458 
459  return true;
460  }
ilObjectDataCache $obj_data_cache
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
+ Here is the call graph for this function:

◆ cloneSettings()

ilObjSession::cloneSettings ( ilObjSession  $new_obj)

Definition at line 413 of file class.ilObjSession.php.

References ilContainer\_lookupContainerSetting(), ilContainer\_writeContainerSetting(), ilObjectServiceSettingsGUI\CUSTOM_METADATA, enableCannotParticipateOption(), enableRegistrationUserLimit(), enableRegistrationWaitingList(), getDetails(), getEmail(), ilObject\getId(), getLocation(), getMailToMembersType(), getName(), getPhone(), getRegistrationMaxUsers(), getRegistrationMinUsers(), getRegistrationNotificationOption(), getRegistrationType(), getShowMembers(), hasWaitingListAutoFill(), isCannotParticipateOptionEnabled(), isRegistrationNotificationEnabled(), isRegistrationUserLimitEnabled(), isRegistrationWaitingListEnabled(), setDetails(), setEmail(), setLocation(), setMailToMembersType(), setName(), setPhone(), setRegistrationMaxUsers(), setRegistrationMinUsers(), setRegistrationNotificationEnabled(), setRegistrationNotificationOption(), setRegistrationType(), setShowMembers(), setWaitingListAutoFill(), and update().

Referenced by validate().

413  : bool
414  {
416  $new_obj->getId(),
419  $this->getId(),
421  )
422  );
423 
424  $new_obj->setLocation($this->getLocation());
425  $new_obj->setName($this->getName());
426  $new_obj->setPhone($this->getPhone());
427  $new_obj->setEmail($this->getEmail());
428  $new_obj->setDetails($this->getDetails());
429 
430  $new_obj->setRegistrationType($this->getRegistrationType());
436  $new_obj->setShowMembers($this->getShowMembers());
437  $new_obj->setMailToMembersType($this->getMailToMembersType());
438 
442 
443  $new_obj->update(true);
444 
445  return true;
446  }
setRegistrationMaxUsers(int $a_users)
setShowMembers(bool $a_status)
setWaitingListAutoFill(bool $a_value)
setRegistrationType(int $a_type)
setMailToMembersType(int $a_type)
static _lookupContainerSetting(int $a_id, string $a_keyword, string $a_default_value=null)
update(bool $a_skip_meta_update=false)
enableCannotParticipateOption(bool $status)
setRegistrationNotificationEnabled(bool $value)
setPhone(string $a_phone)
static _writeContainerSetting(int $a_id, string $a_keyword, string $a_value)
setRegistrationMinUsers(int $a_users)
setEmail(string $a_email)
setRegistrationNotificationOption(string $value)
setDetails(string $a_details)
setLocation(string $a_location)
enableRegistrationUserLimit(int $a_limit)
setName(string $a_name)
enableRegistrationWaitingList(bool $a_stat)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ create()

ilObjSession::create ( bool  $a_skip_meta_data = false)

Definition at line 462 of file class.ilObjSession.php.

References ilObject\$db, $event_handler, $ilDB, $query, $res, ilObject\createMetaData(), enabledRegistrationForUsers(), getDetails(), getEmail(), ilObject\getId(), getLocation(), getMailToMembersType(), getName(), getPhone(), getRegistrationMaxUsers(), getRegistrationMinUsers(), getRegistrationNotificationOption(), getRegistrationType(), getShowMembers(), hasWaitingListAutoFill(), isCannotParticipateOptionEnabled(), isRegistrationNotificationEnabled(), isRegistrationUserLimitEnabled(), isRegistrationWaitingListEnabled(), prepareCalendarAppointments(), and ilDBConstants\T_INTEGER.

462  : int
463  {
464  $ilDB = $this->db;
465  $ilAppEventHandler = $this->event_handler;
466 
467  parent::create();
468 
469  if (!$a_skip_meta_data) {
470  $this->createMetaData();
471  }
472 
473  $next_id = $ilDB->nextId('event');
474  $query = "INSERT INTO event (event_id,obj_id,location,tutor_name,tutor_phone,tutor_email,details,registration, " .
475  'reg_type, reg_limit_users, reg_limited, reg_waiting_list, reg_min_users, reg_auto_wait,show_members,mail_members,
476  reg_notification, notification_opt, show_cannot_part) ' .
477  "VALUES( " .
478  $ilDB->quote($next_id, 'integer') . ", " .
479  $this->db->quote($this->getId(), 'integer') . ", " .
480  $this->db->quote($this->getLocation(), 'text') . "," .
481  $this->db->quote($this->getName(), 'text') . ", " .
482  $this->db->quote($this->getPhone(), 'text') . ", " .
483  $this->db->quote($this->getEmail(), 'text') . ", " .
484  $this->db->quote($this->getDetails(), 'text') . "," .
485  $this->db->quote((int) $this->enabledRegistrationForUsers(), 'integer') . ", " .
486  $this->db->quote($this->getRegistrationType(), 'integer') . ', ' .
487  $this->db->quote($this->getRegistrationMaxUsers(), 'integer') . ', ' .
488  $this->db->quote($this->isRegistrationUserLimitEnabled(), 'integer') . ', ' .
489  $this->db->quote((int) $this->isRegistrationWaitingListEnabled(), 'integer') . ', ' .
490  $this->db->quote($this->getRegistrationMinUsers(), 'integer') . ', ' .
491  $this->db->quote((int) $this->hasWaitingListAutoFill(), 'integer') . ', ' .
492  $this->db->quote((int) $this->getShowMembers(), 'integer') . ', ' .
493  $this->db->quote($this->getMailToMembersType(), 'integer') . ',' .
494  $this->db->quote((int) $this->isRegistrationNotificationEnabled(), 'integer') . ', ' .
495  $this->db->quote($this->getRegistrationNotificationOption(), 'text') . ', ' .
496  $this->db->quote((int) $this->isCannotParticipateOptionEnabled(), ilDBConstants::T_INTEGER) . ' ' .
497  ")";
498  $res = $ilDB->manipulate($query);
499  $this->event_id = $next_id;
500 
501  $ilAppEventHandler->raise(
502  'Modules/Session',
503  'create',
504  array('object' => $this,
505  'obj_id' => $this->getId(),
506  'appointments' => $this->prepareCalendarAppointments('create'))
507  );
508 
509  return $this->getId();
510  }
$res
Definition: ltiservices.php:69
prepareCalendarAppointments(string $a_mode='create')
ilDBInterface $db
$query
ilAppEventHandler $event_handler
+ Here is the call graph for this function:

◆ delete()

ilObjSession::delete ( )

Definition at line 556 of file class.ilObjSession.php.

References ilObject\$db, $event_handler, $ilDB, $query, $res, ilEventItems\_delete(), ilEventParticipants\_deleteByEvent(), ilSessionAppointment\_deleteBySession(), ilObject\deleteMetaData(), getFiles(), ilObject\getId(), and prepareCalendarAppointments().

556  : bool
557  {
558  $ilDB = $this->db;
559  $ilAppEventHandler = $this->event_handler;
560 
561  if (!parent::delete()) {
562  return false;
563  }
564 
565  // delete meta data
566  $this->deleteMetaData();
567 
568  $query = "DELETE FROM event " .
569  "WHERE obj_id = " . $this->db->quote($this->getId(), 'integer') . " ";
570  $res = $ilDB->manipulate($query);
571 
573  ilEventItems::_delete($this->getId());
575 
576  foreach ($this->getFiles() as $file) {
577  $file->delete();
578  }
579 
580  $ilAppEventHandler->raise(
581  'Modules/Session',
582  'delete',
583  array('object' => $this,
584  'obj_id' => $this->getId(),
585  'appointments' => $this->prepareCalendarAppointments('delete'))
586  );
587 
588  return true;
589  }
$res
Definition: ltiservices.php:69
static _deleteBySession(int $a_event_id)
prepareCalendarAppointments(string $a_mode='create')
static _delete(int $a_event_id)
ilDBInterface $db
static _deleteByEvent(int $a_event_id)
$query
ilAppEventHandler $event_handler
+ Here is the call graph for this function:

◆ enableCannotParticipateOption()

ilObjSession::enableCannotParticipateOption ( bool  $status)

Definition at line 317 of file class.ilObjSession.php.

Referenced by cloneSettings(), and read().

317  : void
318  {
319  $this->show_cannot_participate_option = $status;
320  }
+ Here is the caller graph for this function:

◆ enabledRegistration()

ilObjSession::enabledRegistration ( )

Definition at line 300 of file class.ilObjSession.php.

References ilMembershipRegistrationSettings\TYPE_NONE.

300  : bool
301  {
302  return $this->reg_type != ilMembershipRegistrationSettings::TYPE_NONE;
303  }

◆ enabledRegistrationForUsers()

ilObjSession::enabledRegistrationForUsers ( )

Definition at line 305 of file class.ilObjSession.php.

References ilMembershipRegistrationSettings\TYPE_NONE, and ilMembershipRegistrationSettings\TYPE_TUTOR.

Referenced by create(), handleAutoFill(), and update().

+ Here is the caller graph for this function:

◆ enableRegistrationUserLimit()

ilObjSession::enableRegistrationUserLimit ( int  $a_limit)

Definition at line 225 of file class.ilObjSession.php.

Referenced by cloneSettings(), and read().

225  : void
226  {
227  $this->reg_limited = $a_limit;
228  }
+ Here is the caller graph for this function:

◆ enableRegistrationWaitingList()

ilObjSession::enableRegistrationWaitingList ( bool  $a_stat)

Definition at line 255 of file class.ilObjSession.php.

Referenced by cloneSettings(), and read().

255  : void
256  {
257  $this->reg_waiting_list = $a_stat;
258  }
+ Here is the caller graph for this function:

◆ getAppointments()

ilObjSession::getAppointments ( )

Definition at line 322 of file class.ilObjSession.php.

References $appointments.

322  : array
323  {
324  return $this->appointments;
325  }

◆ getDetails()

ilObjSession::getDetails ( )

Definition at line 205 of file class.ilObjSession.php.

References $details.

Referenced by cloneSettings(), create(), and update().

205  : string
206  {
207  return $this->details;
208  }
+ Here is the caller graph for this function:

◆ getEmail()

ilObjSession::getEmail ( )

Definition at line 188 of file class.ilObjSession.php.

References $email.

Referenced by cloneSettings(), create(), hasTutorSettings(), and update().

188  : string
189  {
190  return $this->email;
191  }
+ Here is the caller graph for this function:

◆ getEnableMap()

ilObjSession::getEnableMap ( )

Definition at line 750 of file class.ilObjSession.php.

750  : bool
751  {
752  return false;
753  }

◆ getEventId()

ilObjSession::getEventId ( )

Definition at line 148 of file class.ilObjSession.php.

References $event_id.

148  : int
149  {
150  return $this->event_id;
151  }

◆ getFiles()

ilObjSession::getFiles ( )

Definition at line 346 of file class.ilObjSession.php.

References $files.

Referenced by delete().

346  : array
347  {
348  return $this->files;
349  }
+ Here is the caller graph for this function:

◆ getFirstAppointment()

ilObjSession::getFirstAppointment ( )

Definition at line 340 of file class.ilObjSession.php.

References $app.

Referenced by getPresentationTitle(), getPresentationTitleAppointmentPeriod(), prepareCalendarAppointments(), and validate().

341  {
342  $app = $this->appointments[0] ?? null;
343  return is_object($app) ? $app : ($this->appointments[0] = new ilSessionAppointment());
344  }
$app
Definition: cli.php:39
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
+ Here is the caller graph for this function:

◆ getLocation()

ilObjSession::getLocation ( )

Definition at line 158 of file class.ilObjSession.php.

References $location.

Referenced by cloneSettings(), create(), prepareCalendarAppointments(), and update().

158  : string
159  {
160  return $this->location;
161  }
+ Here is the caller graph for this function:

◆ getMailToMembersType()

ilObjSession::getMailToMembersType ( )

Definition at line 356 of file class.ilObjSession.php.

References $mail_members.

Referenced by cloneSettings(), create(), and update().

356  : int
357  {
358  return $this->mail_members;
359  }
+ Here is the caller graph for this function:

◆ getMembersObject()

ilObjSession::getMembersObject ( )

Definition at line 742 of file class.ilObjSession.php.

References $members_obj, and initParticipants().

743  {
744  if (!$this->members_obj instanceof ilSessionParticipants) {
745  $this->initParticipants();
746  }
747  return $this->members_obj;
748  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
ilSessionParticipants $members_obj
+ Here is the call graph for this function:

◆ getName()

ilObjSession::getName ( )

Definition at line 168 of file class.ilObjSession.php.

References $name.

Referenced by cloneSettings(), create(), hasTutorSettings(), and update().

168  : string
169  {
170  return $this->name;
171  }
+ Here is the caller graph for this function:

◆ getPhone()

ilObjSession::getPhone ( )

Definition at line 178 of file class.ilObjSession.php.

References $phone.

Referenced by cloneSettings(), create(), hasTutorSettings(), and update().

178  : string
179  {
180  return $this->phone;
181  }
+ Here is the caller graph for this function:

◆ getPresentationTitle()

ilObjSession::getPresentationTitle ( )

Definition at line 108 of file class.ilObjSession.php.

References ilDatePresentation\formatDate(), getFirstAppointment(), ilObject\getTitle(), and IL_CAL_UNIX.

108  : string
109  {
110  $date = new ilDate($this->getFirstAppointment()->getStart()->getUnixTime(), IL_CAL_UNIX);
111  if ($this->getTitle()) {
112  return ilDatePresentation::formatDate($this->getFirstAppointment()->getStart()) . ': ' . $this->getTitle();
113  } else {
114  return ilDatePresentation::formatDate($date);
115  }
116  }
static formatDate(ilDateTime $date, bool $a_skip_day=false, bool $a_include_wd=false, bool $include_seconds=false)
const IL_CAL_UNIX
+ Here is the call graph for this function:

◆ getPresentationTitleAppointmentPeriod()

ilObjSession::getPresentationTitleAppointmentPeriod ( )

Definition at line 118 of file class.ilObjSession.php.

References ilObject\$title, ilDatePresentation\formatPeriod(), getFirstAppointment(), and ilObject\getTitle().

118  : string
119  {
120  $title = '';
121  if ($this->getTitle()) {
122  $title = ': ' . $this->getTitle();
123  }
125  $this->getFirstAppointment()->getStart(),
126  $this->getFirstAppointment()->getEnd()
127  ) . $title;
128  }
string $title
static formatPeriod(ilDateTime $start, ilDateTime $end, bool $a_skip_starting_day=false)
Format a period of two dates Shows: 14.
+ Here is the call graph for this function:

◆ getRegistrationMaxUsers()

ilObjSession::getRegistrationMaxUsers ( )

Definition at line 240 of file class.ilObjSession.php.

References $reg_limited_users.

Referenced by cloneSettings(), create(), handleAutoFill(), update(), and validate().

240  : int
241  {
243  }
+ Here is the caller graph for this function:

◆ getRegistrationMinUsers()

ilObjSession::getRegistrationMinUsers ( )

Definition at line 230 of file class.ilObjSession.php.

References $reg_min_users.

Referenced by cloneSettings(), create(), and update().

230  : int
231  {
232  return $this->reg_min_users;
233  }
+ Here is the caller graph for this function:

◆ getRegistrationNotificationOption()

ilObjSession::getRegistrationNotificationOption ( )

Definition at line 290 of file class.ilObjSession.php.

References $notificationOption.

Referenced by cloneSettings(), create(), and update().

290  : string
291  {
293  }
string $notificationOption
+ Here is the caller graph for this function:

◆ getRegistrationType()

ilObjSession::getRegistrationType ( )

Definition at line 215 of file class.ilObjSession.php.

References $reg_type.

Referenced by cloneSettings(), create(), and update().

215  : int
216  {
217  return $this->reg_type;
218  }
+ Here is the caller graph for this function:

◆ getShowMembers()

ilObjSession::getShowMembers ( )

Definition at line 275 of file class.ilObjSession.php.

References $show_members.

Referenced by cloneSettings(), create(), and update().

275  : bool
276  {
277  return $this->show_members;
278  }
+ Here is the caller graph for this function:

◆ handleAutoFill()

ilObjSession::handleAutoFill ( )

Definition at line 673 of file class.ilObjSession.php.

References $parts, ilObject\$ref_id, ilObject\$user, ilObject\_getAllReferences(), ilSessionParticipants\_getInstanceByObjId(), enabledRegistrationForUsers(), ilObject\getId(), ilObjectFactory\getInstanceByObjId(), getRegistrationMaxUsers(), hasWaitingListAutoFill(), isRegistrationWaitingListEnabled(), ilParticipants\lookupNumberOfMembers(), and ilSessionMembershipMailNotification\TYPE_ACCEPTED_SUBSCRIPTION_MEMBER.

673  : bool
674  {
675  if (
677  !$this->hasWaitingListAutoFill()
678  ) {
679  $this->session_logger->debug('Waiting list or auto fill is disabled.');
680  return true;
681  }
682 
684  $current = $parts->getCountParticipants();
685 
686  $refs = ilObject::_getAllReferences($this->getId());
687  $ref_id = current($refs);
688  if ($ref_id === false) {
689  $this->session_logger->warning('No ref_id found for obj_id: ' . $this->getId());
690  return true;
691  }
693  $max = $this->getRegistrationMaxUsers();
694 
695  if ($max <= $current) {
696  $this->session_logger->debug('Maximum number of participants not reached.');
697  $this->session_logger->debug('Maximum number of members: ' . $max);
698  $this->session_logger->debug('Current number of members: ' . $current);
699  return true;
700  }
701 
702  $session_waiting_list = new ilSessionWaitingList($this->getId());
703  foreach ($session_waiting_list->getUserIds() as $user_id) {
705  if (!$user instanceof ilObjUser) {
706  $this->session_logger->warning('Found invalid user id on waiting list: ' . $user_id);
707  continue;
708  }
709  if (in_array($user_id, $parts->getParticipants())) {
710  $this->session_logger->notice('User on waiting list already session member: ' . $user_id);
711  continue;
712  }
713 
714  if ($this->enabledRegistrationForUsers()) {
715  $this->session_logger->debug('Registration enabled: register user');
716  $parts->register($user_id);
717  } else {
718  $this->session_logger->debug('Registration disabled: set user status to participated.');
719  $parts->getEventParticipants()->updateParticipation($user_id, true);
720  }
721  $parts->sendNotification(
723  $user_id
724  );
725 
726  $session_waiting_list->removeFromList($user_id);
727 
728  $current++;
729  if ($current >= $max) {
730  break;
731  }
732  }
733 
734  return true;
735  }
if($clientAssertionType !='urn:ietf:params:oauth:client-assertion-type:jwt-bearer'|| $grantType !='client_credentials') $parts
Definition: ltitoken.php:64
static _getAllReferences(int $id)
get all reference ids for object ID
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static getInstanceByObjId(?int $obj_id, bool $stop_on_error=true)
get an instance of an Ilias object by object id
static lookupNumberOfMembers(int $a_ref_id)
Lookup number of members.
static _getInstanceByObjId(int $a_obj_id)
ilObjUser $user
+ Here is the call graph for this function:

◆ hasTutorSettings()

ilObjSession::hasTutorSettings ( )

Definition at line 193 of file class.ilObjSession.php.

References getEmail(), getName(), and getPhone().

193  : bool
194  {
195  return strlen($this->getName()) ||
196  strlen($this->getEmail()) ||
197  strlen($this->getPhone());
198  }
+ Here is the call graph for this function:

◆ hasWaitingListAutoFill()

ilObjSession::hasWaitingListAutoFill ( )

Definition at line 265 of file class.ilObjSession.php.

References $reg_waiting_list_autofill.

Referenced by cloneSettings(), create(), handleAutoFill(), and update().

265  : bool
266  {
268  }
bool $reg_waiting_list_autofill
+ Here is the caller graph for this function:

◆ initAppointments()

ilObjSession::initAppointments ( )
protected

Definition at line 623 of file class.ilObjSession.php.

References ilSessionAppointment\_readAppointmentsBySession(), and ilObject\getId().

Referenced by read().

623  : void
624  {
625  // get assigned appointments
626  $this->appointments = ilSessionAppointment::_readAppointmentsBySession($this->getId());
627  }
static _readAppointmentsBySession(int $a_event_id)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initDefaultRoles()

ilObjSession::initDefaultRoles ( )

Create local session participant role.

Definition at line 133 of file class.ilObjSession.php.

References ilObjRole\createDefaultRole(), ilObject\getId(), ilObject\getRefId(), and ilLogLevel\WARNING.

133  : void
134  {
136  self::LOCAL_ROLE_PARTICIPANT_PREFIX . '_' . $this->getRefId(),
137  'Participant of session obj_no.' . $this->getId(),
138  self::LOCAL_ROLE_PARTICIPANT_PREFIX,
139  $this->getRefId()
140  );
141 
142  if (!$role instanceof ilObjRole) {
143  $this->session_logger->warning('Could not create default session role.');
144  $this->session_logger->logStack(ilLogLevel::WARNING);
145  }
146  }
Class ilObjRole.
static createDefaultRole(string $a_title, string $a_description, string $a_tpl_name, int $a_ref_id)
+ Here is the call graph for this function:

◆ initFiles()

ilObjSession::initFiles ( )

BT 31608: ilSessionFile is an unused remnant of a previous refactoring. It will be removed in R9, and as a minimally invasive performance fix disabled in R7 and R8.

Definition at line 629 of file class.ilObjSession.php.

Referenced by read().

629  : void
630  {
631  include_once('./Modules/Session/classes/class.ilSessionFile.php');
637  //$this->files = ilSessionFile::_readFilesByEvent($this->getEventId());
638  }
+ Here is the caller graph for this function:

◆ initParticipants()

ilObjSession::initParticipants ( )
protected

Definition at line 737 of file class.ilObjSession.php.

References ilSessionParticipants\_getInstanceByObjId(), and ilObject\getId().

Referenced by getMembersObject().

737  : void
738  {
739  $this->members_obj = ilSessionParticipants::_getInstanceByObjId($this->getId());
740  }
static _getInstanceByObjId(int $a_obj_id)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isCannotParticipateOptionEnabled()

ilObjSession::isCannotParticipateOptionEnabled ( )

Definition at line 312 of file class.ilObjSession.php.

References $show_cannot_participate_option.

Referenced by cloneSettings(), create(), and update().

312  : bool
313  {
315  }
bool $show_cannot_participate_option
+ Here is the caller graph for this function:

◆ isRegistrationNotificationEnabled()

ilObjSession::isRegistrationNotificationEnabled ( )

Definition at line 280 of file class.ilObjSession.php.

References $registrationNotificationEnabled.

Referenced by cloneSettings(), create(), and update().

280  : bool
281  {
283  }
bool $registrationNotificationEnabled
+ Here is the caller graph for this function:

◆ isRegistrationUserLimitEnabled()

ilObjSession::isRegistrationUserLimitEnabled ( )

Definition at line 220 of file class.ilObjSession.php.

References $reg_limited.

Referenced by cloneSettings(), create(), update(), and validate().

220  : int
221  {
222  return $this->reg_limited;
223  }
+ Here is the caller graph for this function:

◆ isRegistrationWaitingListEnabled()

ilObjSession::isRegistrationWaitingListEnabled ( )

Definition at line 250 of file class.ilObjSession.php.

References $reg_waiting_list.

Referenced by cloneSettings(), create(), handleAutoFill(), and update().

250  : bool
251  {
253  }
+ Here is the caller graph for this function:

◆ lookupSession()

static ilObjSession::lookupSession ( int  $a_obj_id)
static

Definition at line 88 of file class.ilObjSession.php.

References $data, $DIC, $ilDB, $query, $res, and ilDBConstants\FETCHMODE_OBJECT.

Referenced by ilObjSessionListGUI\getProperties(), and ilSessionMailTemplateParticipantContext\resolveSpecificPlaceholder().

88  : array
89  {
90  global $DIC;
91 
92  $ilDB = $DIC->database();
93 
94  $query = "SELECT * FROM event " .
95  "WHERE obj_id = " . $ilDB->quote($a_obj_id, 'integer');
96  $res = $ilDB->query($query);
97  $data = [];
98  while ($row = $res->fetchRow(ilDBConstants::FETCHMODE_OBJECT)) {
99  $data['location'] = $row->location ?: '';
100  $data['details'] = $row->details ?: '';
101  $data['name'] = $row->tutor_name ?: '';
102  $data['email'] = $row->tutor_email ?: '';
103  $data['phone'] = $row->tutor_phone ?: '';
104  }
105  return $data;
106  }
$res
Definition: ltiservices.php:69
global $DIC
Definition: feed.php:28
$query
+ Here is the caller graph for this function:

◆ prepareCalendarAppointments()

ilObjSession::prepareCalendarAppointments ( string  $a_mode = 'create')
Parameters
string$a_modeUPDATE|CREATE|DELETE
Returns
ilCalendarAppointmentTemplate[]|array

Definition at line 645 of file class.ilObjSession.php.

References $app, getFirstAppointment(), getLocation(), ilObject\getLongDescription(), ilObject\getTitle(), ILIAS\Repository\lng(), and ilCalendarEntry\TRANSLATION_NONE.

Referenced by create(), delete(), and update().

645  : array
646  {
647  switch ($a_mode) {
648  case 'create':
649  case 'update':
650 
651  $app = new ilCalendarAppointmentTemplate(self::CAL_REG_START);
652  $app->setTranslationType(ilCalendarEntry::TRANSLATION_NONE);
653  $app->setTitle($this->getTitle() ? $this->getTitle() : $this->lng->txt('obj_sess'));
654  $app->setDescription($this->getLongDescription());
655  $app->setLocation($this->getLocation());
656 
657  $sess_app = $this->getFirstAppointment();
658  $app->setFullday($sess_app->isFullday());
659  $app->setStart($sess_app->getStart());
660  $app->setEnd($sess_app->getEnd());
661  $apps[] = $app;
662 
663  return $apps;
664 
665  case 'delete':
666  // Nothing to do: The category and all assigned appointments will be deleted.
667  return [];
668  }
669 
670  return [];
671  }
$app
Definition: cli.php:39
Apointment templates are used for automatic generated apointments.
getLongDescription()
get object long description (stored in object_description)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ read()

ilObjSession::read ( )

Definition at line 591 of file class.ilObjSession.php.

References $query, $res, enableCannotParticipateOption(), enableRegistrationUserLimit(), enableRegistrationWaitingList(), ilDBConstants\FETCHMODE_OBJECT, ilObject\getId(), initAppointments(), initFiles(), ILIAS\Repository\int(), setDetails(), setEmail(), setLocation(), setMailToMembersType(), setName(), setPhone(), setRegistrationMaxUsers(), setRegistrationMinUsers(), setRegistrationNotificationEnabled(), setRegistrationNotificationOption(), setRegistrationType(), setShowMembers(), and setWaitingListAutoFill().

Referenced by validate().

591  : void
592  {
593  parent::read();
594 
595  $query = "SELECT * FROM event WHERE " .
596  "obj_id = " . $this->db->quote($this->getId(), 'integer') . " ";
597  $res = $this->db->query($query);
598 
599  while ($row = $res->fetchRow(ilDBConstants::FETCHMODE_OBJECT)) {
600  $this->setLocation((string) $row->location);
601  $this->setName((string) $row->tutor_name);
602  $this->setPhone((string) $row->tutor_phone);
603  $this->setEmail((string) $row->tutor_email);
604  $this->setDetails((string) $row->details);
605  $this->setRegistrationType((int) $row->reg_type);
606  $this->enableRegistrationUserLimit((int) $row->reg_limited);
607  $this->enableRegistrationWaitingList((bool) $row->reg_waiting_list);
608  $this->setWaitingListAutoFill((bool) $row->reg_auto_wait);
609  $this->setRegistrationMaxUsers((int) $row->reg_limit_users);
610  $this->setRegistrationMinUsers((int) $row->reg_min_users);
611  $this->setShowMembers((bool) $row->show_members);
612  $this->setMailToMembersType((int) $row->mail_members);
613  $this->setRegistrationNotificationEnabled((bool) $row->reg_notification);
614  $this->setRegistrationNotificationOption((string) $row->notification_opt);
615  $this->enableCannotParticipateOption((bool) $row->show_cannot_part);
616  $this->event_id = (int) $row->event_id;
617  }
618 
619  $this->initAppointments();
620  $this->initFiles();
621  }
setRegistrationMaxUsers(int $a_users)
$res
Definition: ltiservices.php:69
setShowMembers(bool $a_status)
setWaitingListAutoFill(bool $a_value)
setRegistrationType(int $a_type)
setMailToMembersType(int $a_type)
enableCannotParticipateOption(bool $status)
setRegistrationNotificationEnabled(bool $value)
setPhone(string $a_phone)
$query
setRegistrationMinUsers(int $a_users)
setEmail(string $a_email)
setRegistrationNotificationOption(string $value)
setDetails(string $a_details)
setLocation(string $a_location)
enableRegistrationUserLimit(int $a_limit)
setName(string $a_name)
enableRegistrationWaitingList(bool $a_stat)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setAppointments()

ilObjSession::setAppointments ( array  $appointments)
Parameters
ilSessionAppointment[]

Definition at line 335 of file class.ilObjSession.php.

References $appointments.

335  : void
336  {
337  $this->appointments = $appointments;
338  }

◆ setDetails()

ilObjSession::setDetails ( string  $a_details)

Definition at line 200 of file class.ilObjSession.php.

Referenced by cloneSettings(), and read().

200  : void
201  {
202  $this->details = $a_details;
203  }
+ Here is the caller graph for this function:

◆ setEmail()

ilObjSession::setEmail ( string  $a_email)

Definition at line 183 of file class.ilObjSession.php.

Referenced by cloneSettings(), and read().

183  : void
184  {
185  $this->email = $a_email;
186  }
+ Here is the caller graph for this function:

◆ setLocation()

ilObjSession::setLocation ( string  $a_location)

Definition at line 153 of file class.ilObjSession.php.

Referenced by cloneSettings(), and read().

153  : void
154  {
155  $this->location = $a_location;
156  }
+ Here is the caller graph for this function:

◆ setMailToMembersType()

ilObjSession::setMailToMembersType ( int  $a_type)

Definition at line 351 of file class.ilObjSession.php.

Referenced by cloneSettings(), and read().

351  : void
352  {
353  $this->mail_members = $a_type;
354  }
+ Here is the caller graph for this function:

◆ setName()

ilObjSession::setName ( string  $a_name)

Definition at line 163 of file class.ilObjSession.php.

Referenced by cloneSettings(), and read().

163  : void
164  {
165  $this->name = $a_name;
166  }
+ Here is the caller graph for this function:

◆ setPhone()

ilObjSession::setPhone ( string  $a_phone)

Definition at line 173 of file class.ilObjSession.php.

Referenced by cloneSettings(), and read().

173  : void
174  {
175  $this->phone = $a_phone;
176  }
+ Here is the caller graph for this function:

◆ setRegistrationMaxUsers()

ilObjSession::setRegistrationMaxUsers ( int  $a_users)

Definition at line 245 of file class.ilObjSession.php.

Referenced by cloneSettings(), and read().

245  : void
246  {
247  $this->reg_limited_users = $a_users;
248  }
+ Here is the caller graph for this function:

◆ setRegistrationMinUsers()

ilObjSession::setRegistrationMinUsers ( int  $a_users)

Definition at line 235 of file class.ilObjSession.php.

Referenced by cloneSettings(), and read().

235  : void
236  {
237  $this->reg_min_users = $a_users;
238  }
+ Here is the caller graph for this function:

◆ setRegistrationNotificationEnabled()

ilObjSession::setRegistrationNotificationEnabled ( bool  $value)

Definition at line 285 of file class.ilObjSession.php.

Referenced by cloneSettings(), and read().

285  : void
286  {
287  $this->registrationNotificationEnabled = $value;
288  }
+ Here is the caller graph for this function:

◆ setRegistrationNotificationOption()

ilObjSession::setRegistrationNotificationOption ( string  $value)

Definition at line 295 of file class.ilObjSession.php.

Referenced by cloneSettings(), and read().

295  : void
296  {
297  $this->notificationOption = $value;
298  }
+ Here is the caller graph for this function:

◆ setRegistrationType()

ilObjSession::setRegistrationType ( int  $a_type)

Definition at line 210 of file class.ilObjSession.php.

Referenced by cloneSettings(), and read().

210  : void
211  {
212  $this->reg_type = $a_type;
213  }
+ Here is the caller graph for this function:

◆ setShowMembers()

ilObjSession::setShowMembers ( bool  $a_status)

Definition at line 270 of file class.ilObjSession.php.

Referenced by cloneSettings(), and read().

270  : void
271  {
272  $this->show_members = $a_status;
273  }
+ Here is the caller graph for this function:

◆ setWaitingListAutoFill()

ilObjSession::setWaitingListAutoFill ( bool  $a_value)

Definition at line 260 of file class.ilObjSession.php.

Referenced by cloneSettings(), and read().

260  : void
261  {
262  $this->reg_waiting_list_autofill = $a_value;
263  }
+ Here is the caller graph for this function:

◆ update()

ilObjSession::update ( bool  $a_skip_meta_update = false)

Definition at line 512 of file class.ilObjSession.php.

References ilObject\$db, $event_handler, $ilDB, $query, $res, enabledRegistrationForUsers(), getDetails(), getEmail(), ilObject\getId(), getLocation(), getMailToMembersType(), getName(), getPhone(), getRegistrationMaxUsers(), getRegistrationMinUsers(), getRegistrationNotificationOption(), getRegistrationType(), getShowMembers(), hasWaitingListAutoFill(), isCannotParticipateOptionEnabled(), isRegistrationNotificationEnabled(), isRegistrationUserLimitEnabled(), isRegistrationWaitingListEnabled(), prepareCalendarAppointments(), ilDBConstants\T_INTEGER, and ilObject\updateMetaData().

Referenced by cloneSettings().

512  : bool
513  {
514  $ilDB = $this->db;
515  $ilAppEventHandler = $this->event_handler;
516 
517  if (!parent::update()) {
518  return false;
519  }
520  if (!$a_skip_meta_update) {
521  $this->updateMetaData();
522  }
523 
524  $query = "UPDATE event SET " .
525  "location = " . $this->db->quote($this->getLocation(), 'text') . "," .
526  "tutor_name = " . $this->db->quote($this->getName(), 'text') . ", " .
527  "tutor_phone = " . $this->db->quote($this->getPhone(), 'text') . ", " .
528  "tutor_email = " . $this->db->quote($this->getEmail(), 'text') . ", " .
529  "details = " . $this->db->quote($this->getDetails(), 'text') . ", " .
530  "registration = " . $this->db->quote((int) $this->enabledRegistrationForUsers(), 'integer') . ", " .
531  "reg_type = " . $this->db->quote($this->getRegistrationType(), 'integer') . ", " .
532  "reg_limited = " . $this->db->quote($this->isRegistrationUserLimitEnabled(), 'integer') . ", " .
533  "reg_limit_users = " . $this->db->quote($this->getRegistrationMaxUsers(), 'integer') . ", " .
534  "reg_min_users = " . $this->db->quote($this->getRegistrationMinUsers(), 'integer') . ", " .
535  "reg_waiting_list = " . $this->db->quote((int) $this->isRegistrationWaitingListEnabled(), 'integer') . ", " .
536  "reg_auto_wait = " . $this->db->quote((int) $this->hasWaitingListAutoFill(), 'integer') . ", " .
537  'show_members = ' . $this->db->quote((int) $this->getShowMembers(), 'integer') . ', ' .
538  'mail_members = ' . $this->db->quote($this->getMailToMembersType(), 'integer') . ', ' .
539  "reg_auto_wait = " . $this->db->quote((int) $this->hasWaitingListAutoFill(), 'integer') . ", " .
540  "reg_notification = " . $this->db->quote((int) $this->isRegistrationNotificationEnabled(), 'integer') . ", " .
541  "notification_opt = " . $this->db->quote($this->getRegistrationNotificationOption(), 'text') . ", " .
542  'show_cannot_part = ' . $this->db->quote((int) $this->isCannotParticipateOptionEnabled(), ilDBConstants::T_INTEGER) . ' ' .
543  "WHERE obj_id = " . $this->db->quote($this->getId(), 'integer') . " ";
544  $res = $ilDB->manipulate($query);
545 
546  $ilAppEventHandler->raise(
547  'Modules/Session',
548  'update',
549  array('object' => $this,
550  'obj_id' => $this->getId(),
551  'appointments' => $this->prepareCalendarAppointments('update'))
552  );
553  return true;
554  }
$res
Definition: ltiservices.php:69
prepareCalendarAppointments(string $a_mode='create')
ilDBInterface $db
$query
ilAppEventHandler $event_handler
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ validate()

ilObjSession::validate ( )

Definition at line 361 of file class.ilObjSession.php.

References ilObject\$error, $ilErr, ilObject\cloneMetaData(), cloneSettings(), getFirstAppointment(), ilObject\getId(), ilObject\getRefId(), getRegistrationMaxUsers(), isRegistrationUserLimitEnabled(), ILIAS\Repository\lng(), ilDidacticTemplateObjSettings\lookupTemplateId(), and read().

361  : bool
362  {
364 
365  // #17114
366  if ($this->isRegistrationUserLimitEnabled() &&
367  !$this->getRegistrationMaxUsers()) {
368  $ilErr->appendMessage($this->lng->txt("sess_max_members_needed"));
369  return false;
370  }
371 
372  return true;
373  }
$ilErr
Definition: raiseError.php:17
ilErrorHandling $error
+ Here is the call graph for this function:

Field Documentation

◆ $appointments

array ilObjSession::$appointments = []
protected

Definition at line 55 of file class.ilObjSession.php.

Referenced by getAppointments(), and setAppointments().

◆ $details

string ilObjSession::$details = ""
protected

Definition at line 44 of file class.ilObjSession.php.

Referenced by getDetails().

◆ $email

string ilObjSession::$email = ""
protected

Definition at line 43 of file class.ilObjSession.php.

Referenced by getEmail().

◆ $event_handler

ilAppEventHandler ilObjSession::$event_handler
protected

Definition at line 39 of file class.ilObjSession.php.

Referenced by create(), delete(), and update().

◆ $event_id

int ilObjSession::$event_id = 0
protected

Definition at line 45 of file class.ilObjSession.php.

Referenced by getEventId().

◆ $files

array ilObjSession::$files = []
protected

Definition at line 56 of file class.ilObjSession.php.

Referenced by getFiles().

◆ $location

string ilObjSession::$location = ""
protected

Definition at line 40 of file class.ilObjSession.php.

Referenced by getLocation().

◆ $mail_members

int ilObjSession::$mail_members = self::MAIL_ALLOWED_ADMIN
protected

Definition at line 54 of file class.ilObjSession.php.

Referenced by getMailToMembersType().

◆ $members_obj

ilSessionParticipants ilObjSession::$members_obj = null
protected

Definition at line 57 of file class.ilObjSession.php.

Referenced by getMembersObject().

◆ $name

string ilObjSession::$name = ""
protected

Definition at line 41 of file class.ilObjSession.php.

Referenced by getName().

◆ $notificationOption

string ilObjSession::$notificationOption = ilSessionConstants::NOTIFICATION_INHERIT_OPTION
protected

Definition at line 59 of file class.ilObjSession.php.

Referenced by getRegistrationNotificationOption().

◆ $obj_data_cache

ilObjectDataCache ilObjSession::$obj_data_cache
protected

Definition at line 38 of file class.ilObjSession.php.

Referenced by cloneDependencies().

◆ $phone

string ilObjSession::$phone = ""
protected

Definition at line 42 of file class.ilObjSession.php.

Referenced by getPhone().

◆ $reg_limited

int ilObjSession::$reg_limited = 0
protected

Definition at line 47 of file class.ilObjSession.php.

Referenced by isRegistrationUserLimitEnabled().

◆ $reg_limited_users

int ilObjSession::$reg_limited_users = 0
protected

Definition at line 49 of file class.ilObjSession.php.

Referenced by getRegistrationMaxUsers().

◆ $reg_min_users

int ilObjSession::$reg_min_users = 0
protected

Definition at line 48 of file class.ilObjSession.php.

Referenced by getRegistrationMinUsers().

◆ $reg_type

int ilObjSession::$reg_type = ilMembershipRegistrationSettings::TYPE_NONE
protected

Definition at line 46 of file class.ilObjSession.php.

Referenced by getRegistrationType().

◆ $reg_waiting_list

bool ilObjSession::$reg_waiting_list = false
protected

Definition at line 50 of file class.ilObjSession.php.

Referenced by isRegistrationWaitingListEnabled().

◆ $reg_waiting_list_autofill

bool ilObjSession::$reg_waiting_list_autofill = false
protected

Definition at line 51 of file class.ilObjSession.php.

Referenced by hasWaitingListAutoFill().

◆ $registrationNotificationEnabled

bool ilObjSession::$registrationNotificationEnabled = false
protected

Definition at line 58 of file class.ilObjSession.php.

Referenced by isRegistrationNotificationEnabled().

◆ $session_logger

ilLogger ilObjSession::$session_logger
protected

Definition at line 37 of file class.ilObjSession.php.

◆ $show_cannot_participate_option

bool ilObjSession::$show_cannot_participate_option = true
protected

Definition at line 53 of file class.ilObjSession.php.

Referenced by isCannotParticipateOptionEnabled().

◆ $show_members

bool ilObjSession::$show_members = false
protected

Definition at line 52 of file class.ilObjSession.php.

Referenced by getShowMembers().

◆ CAL_REG_START

const ilObjSession::CAL_REG_START = 1

Definition at line 35 of file class.ilObjSession.php.

◆ LOCAL_ROLE_PARTICIPANT_PREFIX

const ilObjSession::LOCAL_ROLE_PARTICIPANT_PREFIX = 'il_sess_participant'

Definition at line 34 of file class.ilObjSession.php.

◆ MAIL_ALLOWED_ADMIN

const ilObjSession::MAIL_ALLOWED_ADMIN = 2

Definition at line 33 of file class.ilObjSession.php.

Referenced by ilObjSessionGUI\initForm().

◆ MAIL_ALLOWED_ALL

const ilObjSession::MAIL_ALLOWED_ALL = 1

The documentation for this class was generated from the following file: