ILIAS  release_9 Revision v9.13-25-g2c18ec4c24f
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 ()
 
 setMailToMembersType (int $a_type)
 
 getMailToMembersType ()
 
 validate ()
 
 cloneSettings (ilObjSession $new_obj)
 
 cloneDependencies ($target_id, $copy_id)
 
 create (bool $a_skip_meta_data=false)
 
 update (bool $a_skip_meta_update=false)
 
 delete ()
 
 read ()
 
 prepareCalendarAppointments (string $a_mode='create')
 
 handleAutoFill ()
 
 getMembersObject ()
 
 getEnableMap ()
 
- Public Member Functions inherited from ilObject
 getObjectProperties ()
 
 flushObjectProperties ()
 
 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 $description)
 
 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 = []
 
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
 
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 = ""
 
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 60 of file class.ilObjSession.php.

References $DIC, and ILIAS\MetaData\Repository\Validation\Data\__construct().

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

Member Function Documentation

◆ _lookupRegistrationEnabled()

static ilObjSession::_lookupRegistrationEnabled ( int  $a_obj_id)
static

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

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

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

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

◆ addAppointment()

ilObjSession::addAppointment ( ilSessionAppointment  $appointment)

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

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

◆ cloneDependencies()

ilObjSession::cloneDependencies (   $target_id,
  $copy_id 
)

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

References $obj_data_cache, and ilObject\getId().

437  : bool
438  {
439  $ilObjDataCache = $this->obj_data_cache;
440 
441  parent::cloneDependencies($target_id, $copy_id);
442 
443  $target_obj_id = $ilObjDataCache->lookupObjId($target_id);
444 
445  $session_materials = new ilEventItems($target_obj_id);
446  $session_materials->cloneItems($this->getId(), $copy_id);
447 
448  return true;
449  }
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 402 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().

402  : bool
403  {
405  $new_obj->getId(),
408  $this->getId(),
410  )
411  );
412 
413  $new_obj->setLocation($this->getLocation());
414  $new_obj->setName($this->getName());
415  $new_obj->setPhone($this->getPhone());
416  $new_obj->setEmail($this->getEmail());
417  $new_obj->setDetails($this->getDetails());
418 
419  $new_obj->setRegistrationType($this->getRegistrationType());
425  $new_obj->setShowMembers($this->getShowMembers());
426  $new_obj->setMailToMembersType($this->getMailToMembersType());
427 
431 
432  $new_obj->update(true);
433 
434  return true;
435  }
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 451 of file class.ilObjSession.php.

References ilObject\$db, $event_handler, $ilDB, $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.

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

◆ delete()

ilObjSession::delete ( )

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

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

545  : bool
546  {
547  $ilDB = $this->db;
548  $ilAppEventHandler = $this->event_handler;
549 
550  if (!parent::delete()) {
551  return false;
552  }
553 
554  // delete meta data
555  $this->deleteMetaData();
556 
557  $query = "DELETE FROM event " .
558  "WHERE obj_id = " . $this->db->quote($this->getId(), 'integer') . " ";
559  $res = $ilDB->manipulate($query);
560 
562  ilEventItems::_delete($this->getId());
564 
565  $ilAppEventHandler->raise(
566  'Modules/Session',
567  'delete',
568  array('object' => $this,
569  'obj_id' => $this->getId(),
570  'appointments' => $this->prepareCalendarAppointments('delete'))
571  );
572 
573  return true;
574  }
$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)
ilAppEventHandler $event_handler
+ Here is the call graph for this function:

◆ enableCannotParticipateOption()

ilObjSession::enableCannotParticipateOption ( bool  $status)

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

Referenced by cloneSettings(), and read().

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

◆ enabledRegistration()

ilObjSession::enabledRegistration ( )

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

References ilMembershipRegistrationSettings\TYPE_NONE.

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

◆ enabledRegistrationForUsers()

ilObjSession::enabledRegistrationForUsers ( )

Definition at line 304 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 224 of file class.ilObjSession.php.

Referenced by cloneSettings(), and read().

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

◆ enableRegistrationWaitingList()

ilObjSession::enableRegistrationWaitingList ( bool  $a_stat)

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

Referenced by cloneSettings(), and read().

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

◆ getAppointments()

ilObjSession::getAppointments ( )

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

References $appointments.

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

◆ getDetails()

ilObjSession::getDetails ( )

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

References $details.

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

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

◆ getEmail()

ilObjSession::getEmail ( )

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

References $email.

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

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

◆ getEnableMap()

ilObjSession::getEnableMap ( )

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

723  : bool
724  {
725  return false;
726  }

◆ getEventId()

ilObjSession::getEventId ( )

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

References $event_id.

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

◆ getFirstAppointment()

ilObjSession::getFirstAppointment ( )

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

References $app.

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

340  {
341  $app = $this->appointments[0] ?? null;
342  return is_object($app) ? $app : ($this->appointments[0] = new ilSessionAppointment());
343  }
$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 157 of file class.ilObjSession.php.

References $location.

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

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

◆ getMailToMembersType()

ilObjSession::getMailToMembersType ( )

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

References $mail_members.

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

350  : int
351  {
352  return $this->mail_members;
353  }
+ Here is the caller graph for this function:

◆ getMembersObject()

ilObjSession::getMembersObject ( )

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

References $members_obj, and initParticipants().

716  {
717  if (!$this->members_obj instanceof ilSessionParticipants) {
718  $this->initParticipants();
719  }
720  return $this->members_obj;
721  }
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 167 of file class.ilObjSession.php.

References $name.

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

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

◆ getPhone()

ilObjSession::getPhone ( )

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

References $phone.

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

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

◆ getPresentationTitle()

ilObjSession::getPresentationTitle ( )

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

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

107  : string
108  {
109  $date = new ilDate($this->getFirstAppointment()->getStart()->getUnixTime(), IL_CAL_UNIX);
110  if ($this->getTitle()) {
111  return ilDatePresentation::formatDate($this->getFirstAppointment()->getStart()) . ': ' . $this->getTitle();
112  } else {
113  return ilDatePresentation::formatDate($date);
114  }
115  }
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 117 of file class.ilObjSession.php.

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

117  : string
118  {
119  $title = '';
120  if ($this->getTitle()) {
121  $title = ': ' . $this->getTitle();
122  }
124  $this->getFirstAppointment()->getStart(),
125  $this->getFirstAppointment()->getEnd()
126  ) . $title;
127  }
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 239 of file class.ilObjSession.php.

References $reg_limited_users.

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

239  : int
240  {
242  }
+ Here is the caller graph for this function:

◆ getRegistrationMinUsers()

ilObjSession::getRegistrationMinUsers ( )

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

References $reg_min_users.

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

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

◆ getRegistrationNotificationOption()

ilObjSession::getRegistrationNotificationOption ( )

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

References $notificationOption.

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

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

◆ getRegistrationType()

ilObjSession::getRegistrationType ( )

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

References $reg_type.

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

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

◆ getShowMembers()

ilObjSession::getShowMembers ( )

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

References $show_members.

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

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

◆ handleAutoFill()

ilObjSession::handleAutoFill ( )

Definition at line 646 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.

646  : bool
647  {
648  if (
650  !$this->hasWaitingListAutoFill()
651  ) {
652  $this->session_logger->debug('Waiting list or auto fill is disabled.');
653  return true;
654  }
655 
657  $current = $parts->getCountParticipants();
658 
659  $refs = ilObject::_getAllReferences($this->getId());
660  $ref_id = current($refs);
661  if ($ref_id === false) {
662  $this->session_logger->warning('No ref_id found for obj_id: ' . $this->getId());
663  return true;
664  }
666  $max = $this->getRegistrationMaxUsers();
667 
668  if ($max <= $current) {
669  $this->session_logger->debug('Maximum number of participants not reached.');
670  $this->session_logger->debug('Maximum number of members: ' . $max);
671  $this->session_logger->debug('Current number of members: ' . $current);
672  return true;
673  }
674 
675  $session_waiting_list = new ilSessionWaitingList($this->getId());
676  foreach ($session_waiting_list->getUserIds() as $user_id) {
678  if (!$user instanceof ilObjUser) {
679  $this->session_logger->warning('Found invalid user id on waiting list: ' . $user_id);
680  continue;
681  }
682  if (in_array($user_id, $parts->getParticipants())) {
683  $this->session_logger->notice('User on waiting list already session member: ' . $user_id);
684  continue;
685  }
686 
687  if ($this->enabledRegistrationForUsers()) {
688  $this->session_logger->debug('Registration enabled: register user');
689  $parts->register($user_id);
690  } else {
691  $this->session_logger->debug('Registration disabled: set user status to participated.');
692  $parts->getEventParticipants()->updateParticipation($user_id, true);
693  }
694  $parts->sendNotification(
696  $user_id
697  );
698 
699  $session_waiting_list->removeFromList($user_id);
700 
701  $current++;
702  if ($current >= $max) {
703  break;
704  }
705  }
706 
707  return true;
708  }
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 192 of file class.ilObjSession.php.

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

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

◆ hasWaitingListAutoFill()

ilObjSession::hasWaitingListAutoFill ( )

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

References $reg_waiting_list_autofill.

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

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

◆ initAppointments()

ilObjSession::initAppointments ( )
protected

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

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

Referenced by read().

607  : void
608  {
609  // get assigned appointments
610  $this->appointments = ilSessionAppointment::_readAppointmentsBySession($this->getId());
611  }
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 132 of file class.ilObjSession.php.

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

132  : void
133  {
135  self::LOCAL_ROLE_PARTICIPANT_PREFIX . '_' . $this->getRefId(),
136  'Participant of session obj_no.' . $this->getId(),
137  self::LOCAL_ROLE_PARTICIPANT_PREFIX,
138  $this->getRefId()
139  );
140 
141  if (!$role instanceof ilObjRole) {
142  $this->session_logger->warning('Could not create default session role.');
143  $this->session_logger->logStack(ilLogLevel::WARNING);
144  }
145  }
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:

◆ initParticipants()

ilObjSession::initParticipants ( )
protected

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

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

Referenced by getMembersObject().

710  : void
711  {
712  $this->members_obj = ilSessionParticipants::_getInstanceByObjId($this->getId());
713  }
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 311 of file class.ilObjSession.php.

References $show_cannot_participate_option.

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

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

◆ isRegistrationNotificationEnabled()

ilObjSession::isRegistrationNotificationEnabled ( )

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

References $registrationNotificationEnabled.

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

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

◆ isRegistrationUserLimitEnabled()

ilObjSession::isRegistrationUserLimitEnabled ( )

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

References $reg_limited.

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

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

◆ isRegistrationWaitingListEnabled()

ilObjSession::isRegistrationWaitingListEnabled ( )

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

References $reg_waiting_list.

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

249  : bool
250  {
252  }
+ Here is the caller graph for this function:

◆ lookupSession()

static ilObjSession::lookupSession ( int  $a_obj_id)
static

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

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

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

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

618  : array
619  {
620  switch ($a_mode) {
621  case 'create':
622  case 'update':
623 
624  $app = new ilCalendarAppointmentTemplate(self::CAL_REG_START);
625  $app->setTranslationType(ilCalendarEntry::TRANSLATION_NONE);
626  $app->setTitle($this->getTitle() ? $this->getTitle() : $this->lng->txt('obj_sess'));
627  $app->setDescription($this->getLongDescription());
628  $app->setLocation($this->getLocation());
629 
630  $sess_app = $this->getFirstAppointment();
631  $app->setFullday($sess_app->isFullday());
632  $app->setStart($sess_app->getStart());
633  $app->setEnd($sess_app->getEnd());
634  $apps[] = $app;
635 
636  return $apps;
637 
638  case 'delete':
639  // Nothing to do: The category and all assigned appointments will be deleted.
640  return [];
641  }
642 
643  return [];
644  }
$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 576 of file class.ilObjSession.php.

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

Referenced by validate().

576  : void
577  {
578  parent::read();
579 
580  $query = "SELECT * FROM event WHERE " .
581  "obj_id = " . $this->db->quote($this->getId(), 'integer') . " ";
582  $res = $this->db->query($query);
583 
584  while ($row = $res->fetchRow(ilDBConstants::FETCHMODE_OBJECT)) {
585  $this->setLocation((string) $row->location);
586  $this->setName((string) $row->tutor_name);
587  $this->setPhone((string) $row->tutor_phone);
588  $this->setEmail((string) $row->tutor_email);
589  $this->setDetails((string) $row->details);
590  $this->setRegistrationType((int) $row->reg_type);
591  $this->enableRegistrationUserLimit((int) $row->reg_limited);
592  $this->enableRegistrationWaitingList((bool) $row->reg_waiting_list);
593  $this->setWaitingListAutoFill((bool) $row->reg_auto_wait);
594  $this->setRegistrationMaxUsers((int) $row->reg_limit_users);
595  $this->setRegistrationMinUsers((int) $row->reg_min_users);
596  $this->setShowMembers((bool) $row->show_members);
597  $this->setMailToMembersType((int) $row->mail_members);
598  $this->setRegistrationNotificationEnabled((bool) $row->reg_notification);
599  $this->setRegistrationNotificationOption((string) $row->notification_opt);
600  $this->enableCannotParticipateOption((bool) $row->show_cannot_part);
601  $this->event_id = (int) $row->event_id;
602  }
603 
604  $this->initAppointments();
605  }
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)
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[]$appointments

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

References $appointments.

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

◆ setDetails()

ilObjSession::setDetails ( string  $a_details)

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

Referenced by cloneSettings(), and read().

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

◆ setEmail()

ilObjSession::setEmail ( string  $a_email)

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

Referenced by cloneSettings(), and read().

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

◆ setLocation()

ilObjSession::setLocation ( string  $a_location)

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

Referenced by cloneSettings(), and read().

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

◆ setMailToMembersType()

ilObjSession::setMailToMembersType ( int  $a_type)

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

Referenced by cloneSettings(), and read().

345  : void
346  {
347  $this->mail_members = $a_type;
348  }
+ Here is the caller graph for this function:

◆ setName()

ilObjSession::setName ( string  $a_name)

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

Referenced by cloneSettings(), and read().

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

◆ setPhone()

ilObjSession::setPhone ( string  $a_phone)

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

Referenced by cloneSettings(), and read().

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

◆ setRegistrationMaxUsers()

ilObjSession::setRegistrationMaxUsers ( int  $a_users)

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

Referenced by cloneSettings(), and read().

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

◆ setRegistrationMinUsers()

ilObjSession::setRegistrationMinUsers ( int  $a_users)

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

Referenced by cloneSettings(), and read().

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

◆ setRegistrationNotificationEnabled()

ilObjSession::setRegistrationNotificationEnabled ( bool  $value)

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

Referenced by cloneSettings(), and read().

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

◆ setRegistrationNotificationOption()

ilObjSession::setRegistrationNotificationOption ( string  $value)

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

Referenced by cloneSettings(), and read().

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

◆ setRegistrationType()

ilObjSession::setRegistrationType ( int  $a_type)

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

Referenced by cloneSettings(), and read().

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

◆ setShowMembers()

ilObjSession::setShowMembers ( bool  $a_status)

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

Referenced by cloneSettings(), and read().

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

◆ setWaitingListAutoFill()

ilObjSession::setWaitingListAutoFill ( bool  $a_value)

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

Referenced by cloneSettings(), and read().

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

◆ update()

ilObjSession::update ( bool  $a_skip_meta_update = false)

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

References ilObject\$db, $event_handler, $ilDB, $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().

501  : bool
502  {
503  $ilDB = $this->db;
504  $ilAppEventHandler = $this->event_handler;
505 
506  if (!parent::update()) {
507  return false;
508  }
509  if (!$a_skip_meta_update) {
510  $this->updateMetaData();
511  }
512 
513  $query = "UPDATE event SET " .
514  "location = " . $this->db->quote($this->getLocation(), 'text') . "," .
515  "tutor_name = " . $this->db->quote($this->getName(), 'text') . ", " .
516  "tutor_phone = " . $this->db->quote($this->getPhone(), 'text') . ", " .
517  "tutor_email = " . $this->db->quote($this->getEmail(), 'text') . ", " .
518  "details = " . $this->db->quote($this->getDetails(), 'text') . ", " .
519  "registration = " . $this->db->quote((int) $this->enabledRegistrationForUsers(), 'integer') . ", " .
520  "reg_type = " . $this->db->quote($this->getRegistrationType(), 'integer') . ", " .
521  "reg_limited = " . $this->db->quote($this->isRegistrationUserLimitEnabled(), 'integer') . ", " .
522  "reg_limit_users = " . $this->db->quote($this->getRegistrationMaxUsers(), 'integer') . ", " .
523  "reg_min_users = " . $this->db->quote($this->getRegistrationMinUsers(), 'integer') . ", " .
524  "reg_waiting_list = " . $this->db->quote((int) $this->isRegistrationWaitingListEnabled(), 'integer') . ", " .
525  "reg_auto_wait = " . $this->db->quote((int) $this->hasWaitingListAutoFill(), 'integer') . ", " .
526  'show_members = ' . $this->db->quote((int) $this->getShowMembers(), 'integer') . ', ' .
527  'mail_members = ' . $this->db->quote($this->getMailToMembersType(), 'integer') . ', ' .
528  "reg_auto_wait = " . $this->db->quote((int) $this->hasWaitingListAutoFill(), 'integer') . ", " .
529  "reg_notification = " . $this->db->quote((int) $this->isRegistrationNotificationEnabled(), 'integer') . ", " .
530  "notification_opt = " . $this->db->quote($this->getRegistrationNotificationOption(), 'text') . ", " .
531  'show_cannot_part = ' . $this->db->quote((int) $this->isCannotParticipateOptionEnabled(), ilDBConstants::T_INTEGER) . ' ' .
532  "WHERE obj_id = " . $this->db->quote($this->getId(), 'integer') . " ";
533  $res = $ilDB->manipulate($query);
534 
535  $ilAppEventHandler->raise(
536  'Modules/Session',
537  'update',
538  array('object' => $this,
539  'obj_id' => $this->getId(),
540  'appointments' => $this->prepareCalendarAppointments('update'))
541  );
542  return true;
543  }
$res
Definition: ltiservices.php:69
prepareCalendarAppointments(string $a_mode='create')
ilDBInterface $db
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 355 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().

355  : bool
356  {
358 
359  // #17114
360  if ($this->isRegistrationUserLimitEnabled() &&
361  !$this->getRegistrationMaxUsers()) {
362  $ilErr->appendMessage($this->lng->txt("sess_max_members_needed"));
363  return false;
364  }
365 
366  return true;
367  }
$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().

◆ $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 56 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 58 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 57 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: