ILIAS  trunk Revision v11.0_alpha-1749-g1a06bdef097
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator 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 ()
 
 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 getIconForType (string $type)
 
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
 
LOMServices $lom_services
 
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 29 of file class.ilObjSession.php.

Constructor & Destructor Documentation

◆ __construct()

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

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

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

60  {
61  global $DIC;
62 
63  $this->session_logger = $DIC->logger()->sess();
64  $this->obj_data_cache = $DIC['ilObjDataCache'];
65  $this->event_handler = $DIC->event();
66 
67  $this->type = "sess";
68  parent::__construct($a_id, $a_call_by_reference);
69  }
global $DIC
Definition: shib_login.php:22
__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 71 of file class.ilObjSession.php.

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

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

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

◆ addAppointment()

ilObjSession::addAppointment ( ilSessionAppointment  $appointment)

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

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

◆ cloneDependencies()

ilObjSession::cloneDependencies (   $target_id,
  $copy_id 
)

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

References $obj_data_cache, and ilObject\getId().

436  : bool
437  {
438  $ilObjDataCache = $this->obj_data_cache;
439 
440  parent::cloneDependencies($target_id, $copy_id);
441 
442  $target_obj_id = $ilObjDataCache->lookupObjId($target_id);
443 
444  $session_materials = new ilEventItems($target_obj_id);
445  $session_materials->cloneItems($this->getId(), $copy_id);
446 
447  return true;
448  }
ilObjectDataCache $obj_data_cache
class ilEventItems
+ Here is the call graph for this function:

◆ cloneSettings()

ilObjSession::cloneSettings ( ilObjSession  $new_obj)

Definition at line 401 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().

401  : bool
402  {
404  $new_obj->getId(),
407  $this->getId(),
409  )
410  );
411 
412  $new_obj->setLocation($this->getLocation());
413  $new_obj->setName($this->getName());
414  $new_obj->setPhone($this->getPhone());
415  $new_obj->setEmail($this->getEmail());
416  $new_obj->setDetails($this->getDetails());
417 
418  $new_obj->setRegistrationType($this->getRegistrationType());
424  $new_obj->setShowMembers($this->getShowMembers());
425  $new_obj->setMailToMembersType($this->getMailToMembersType());
426 
430 
431  $new_obj->update(true);
432 
433  return true;
434  }
setRegistrationMaxUsers(int $a_users)
setShowMembers(bool $a_status)
setWaitingListAutoFill(bool $a_value)
setRegistrationType(int $a_type)
setMailToMembersType(int $a_type)
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)
static _lookupContainerSetting(int $a_id, string $a_keyword, ?string $a_default_value=null)
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 450 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.

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

◆ delete()

ilObjSession::delete ( )

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

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

544  : bool
545  {
546  $ilDB = $this->db;
547  $ilAppEventHandler = $this->event_handler;
548 
549  if (!parent::delete()) {
550  return false;
551  }
552 
553  // delete meta data
554  $this->deleteMetaData();
555 
556  $query = "DELETE FROM event " .
557  "WHERE obj_id = " . $this->db->quote($this->getId(), 'integer') . " ";
558  $res = $ilDB->manipulate($query);
559 
561  ilEventItems::_delete($this->getId());
563 
564  $ilAppEventHandler->raise(
565  'components/ILIAS/Session',
566  'delete',
567  array('object' => $this,
568  'obj_id' => $this->getId(),
569  'appointments' => $this->prepareCalendarAppointments('delete'))
570  );
571 
572  return true;
573  }
$res
Definition: ltiservices.php:66
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 315 of file class.ilObjSession.php.

Referenced by cloneSettings(), and read().

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

◆ enabledRegistration()

ilObjSession::enabledRegistration ( )

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

References ilMembershipRegistrationSettings\TYPE_NONE.

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

◆ enabledRegistrationForUsers()

ilObjSession::enabledRegistrationForUsers ( )

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

Referenced by cloneSettings(), and read().

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

◆ enableRegistrationWaitingList()

ilObjSession::enableRegistrationWaitingList ( bool  $a_stat)

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

Referenced by cloneSettings(), and read().

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

◆ getAppointments()

ilObjSession::getAppointments ( )

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

References $appointments.

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

◆ getDetails()

ilObjSession::getDetails ( )

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

References $details.

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

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

◆ getEmail()

ilObjSession::getEmail ( )

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

References $email.

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

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

◆ getEnableMap()

ilObjSession::getEnableMap ( )

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

722  : bool
723  {
724  return false;
725  }

◆ getEventId()

ilObjSession::getEventId ( )

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

References $event_id.

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

◆ getFirstAppointment()

ilObjSession::getFirstAppointment ( )

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

References null.

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

339  {
340  $app = $this->appointments[0] ?? null;
341  return is_object($app) ? $app : ($this->appointments[0] = new ilSessionAppointment());
342  }
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
class ilSessionAppointment
+ Here is the caller graph for this function:

◆ getLocation()

ilObjSession::getLocation ( )

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

References $location.

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

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

◆ getMailToMembersType()

ilObjSession::getMailToMembersType ( )

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

References $mail_members.

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

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

◆ getMembersObject()

ilObjSession::getMembersObject ( )

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

References $members_obj, and initParticipants().

715  {
716  if (!$this->members_obj instanceof ilSessionParticipants) {
717  $this->initParticipants();
718  }
719  return $this->members_obj;
720  }
Session participation handling.
ilSessionParticipants $members_obj
+ Here is the call graph for this function:

◆ getName()

ilObjSession::getName ( )

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

References $name.

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

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

◆ getPhone()

ilObjSession::getPhone ( )

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

References $phone.

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

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

◆ getPresentationTitle()

ilObjSession::getPresentationTitle ( )

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

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

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

◆ getPresentationTitleAppointmentPeriod()

ilObjSession::getPresentationTitleAppointmentPeriod ( )

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

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

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

◆ getRegistrationMaxUsers()

ilObjSession::getRegistrationMaxUsers ( )

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

References $reg_limited_users.

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

238  : int
239  {
241  }
+ Here is the caller graph for this function:

◆ getRegistrationMinUsers()

ilObjSession::getRegistrationMinUsers ( )

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

References $reg_min_users.

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

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

◆ getRegistrationNotificationOption()

ilObjSession::getRegistrationNotificationOption ( )

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

References $notificationOption.

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

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

◆ getRegistrationType()

ilObjSession::getRegistrationType ( )

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

References $reg_type.

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

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

◆ getShowMembers()

ilObjSession::getShowMembers ( )

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

References $show_members.

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

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

◆ handleAutoFill()

ilObjSession::handleAutoFill ( )

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

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

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

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

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

◆ hasWaitingListAutoFill()

ilObjSession::hasWaitingListAutoFill ( )

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

References $reg_waiting_list_autofill.

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

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

◆ initAppointments()

ilObjSession::initAppointments ( )
protected

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

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

Referenced by read().

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

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

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

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

Referenced by getMembersObject().

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

References $show_cannot_participate_option.

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

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

◆ isRegistrationNotificationEnabled()

ilObjSession::isRegistrationNotificationEnabled ( )

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

References $registrationNotificationEnabled.

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

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

◆ isRegistrationUserLimitEnabled()

ilObjSession::isRegistrationUserLimitEnabled ( )

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

References $reg_limited.

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

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

◆ isRegistrationWaitingListEnabled()

ilObjSession::isRegistrationWaitingListEnabled ( )

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

References $reg_waiting_list.

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

248  : bool
249  {
251  }
+ Here is the caller graph for this function:

◆ lookupSession()

static ilObjSession::lookupSession ( int  $a_obj_id)
static

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

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

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

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

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

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

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

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

References $appointments.

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

◆ setDetails()

ilObjSession::setDetails ( string  $a_details)

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

Referenced by cloneSettings(), and read().

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

◆ setEmail()

ilObjSession::setEmail ( string  $a_email)

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

Referenced by cloneSettings(), and read().

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

◆ setLocation()

ilObjSession::setLocation ( string  $a_location)

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

Referenced by cloneSettings(), and read().

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

◆ setMailToMembersType()

ilObjSession::setMailToMembersType ( int  $a_type)

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

Referenced by cloneSettings(), and read().

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

◆ setName()

ilObjSession::setName ( string  $a_name)

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

Referenced by cloneSettings(), and read().

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

◆ setPhone()

ilObjSession::setPhone ( string  $a_phone)

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

Referenced by cloneSettings(), and read().

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

◆ setRegistrationMaxUsers()

ilObjSession::setRegistrationMaxUsers ( int  $a_users)

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

Referenced by cloneSettings(), and read().

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

◆ setRegistrationMinUsers()

ilObjSession::setRegistrationMinUsers ( int  $a_users)

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

Referenced by cloneSettings(), and read().

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

◆ setRegistrationNotificationEnabled()

ilObjSession::setRegistrationNotificationEnabled ( bool  $value)

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

Referenced by cloneSettings(), and read().

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

◆ setRegistrationNotificationOption()

ilObjSession::setRegistrationNotificationOption ( string  $value)

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

Referenced by cloneSettings(), and read().

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

◆ setRegistrationType()

ilObjSession::setRegistrationType ( int  $a_type)

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

Referenced by cloneSettings(), and read().

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

◆ setShowMembers()

ilObjSession::setShowMembers ( bool  $a_status)

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

Referenced by cloneSettings(), and read().

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

◆ setWaitingListAutoFill()

ilObjSession::setWaitingListAutoFill ( bool  $a_value)

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

Referenced by cloneSettings(), and read().

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

◆ update()

ilObjSession::update ( bool  $a_skip_meta_update = false)

Definition at line 500 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().

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

354  : bool
355  {
357 
358  // #17114
359  if ($this->isRegistrationUserLimitEnabled() &&
360  !$this->getRegistrationMaxUsers()) {
361  $ilErr->appendMessage($this->lng->txt("sess_max_members_needed"));
362  return false;
363  }
364 
365  return true;
366  }
$ilErr
Definition: raiseError.php:33
ilErrorHandling $error
+ Here is the call graph for this function:

Field Documentation

◆ $appointments

array ilObjSession::$appointments = []
protected

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

Referenced by getAppointments(), and setAppointments().

◆ $details

string ilObjSession::$details = ""
protected

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

Referenced by getDetails().

◆ $email

string ilObjSession::$email = ""
protected

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

Referenced by getEmail().

◆ $event_handler

ilAppEventHandler ilObjSession::$event_handler
protected

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

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

◆ $event_id

int ilObjSession::$event_id = 0
protected

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

Referenced by getEventId().

◆ $location

string ilObjSession::$location = ""
protected

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

Referenced by getLocation().

◆ $mail_members

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

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

Referenced by getMailToMembersType().

◆ $members_obj

ilSessionParticipants ilObjSession::$members_obj = null
protected

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

Referenced by getMembersObject().

◆ $name

string ilObjSession::$name = ""
protected

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

Referenced by getName().

◆ $notificationOption

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

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

Referenced by getRegistrationNotificationOption().

◆ $obj_data_cache

ilObjectDataCache ilObjSession::$obj_data_cache
protected

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

Referenced by cloneDependencies().

◆ $phone

string ilObjSession::$phone = ""
protected

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

Referenced by getPhone().

◆ $reg_limited

int ilObjSession::$reg_limited = 0
protected

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

Referenced by isRegistrationUserLimitEnabled().

◆ $reg_limited_users

int ilObjSession::$reg_limited_users = 0
protected

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

Referenced by getRegistrationMaxUsers().

◆ $reg_min_users

int ilObjSession::$reg_min_users = 0
protected

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

Referenced by getRegistrationMinUsers().

◆ $reg_type

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

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

Referenced by getRegistrationType().

◆ $reg_waiting_list

bool ilObjSession::$reg_waiting_list = false
protected

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

Referenced by isRegistrationWaitingListEnabled().

◆ $reg_waiting_list_autofill

bool ilObjSession::$reg_waiting_list_autofill = false
protected

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

Referenced by hasWaitingListAutoFill().

◆ $registrationNotificationEnabled

bool ilObjSession::$registrationNotificationEnabled = false
protected

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

Referenced by isRegistrationNotificationEnabled().

◆ $session_logger

ilLogger ilObjSession::$session_logger
protected

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

◆ $show_cannot_participate_option

bool ilObjSession::$show_cannot_participate_option = true
protected

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

Referenced by isCannotParticipateOptionEnabled().

◆ $show_members

bool ilObjSession::$show_members = false
protected

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

Referenced by getShowMembers().

◆ CAL_REG_START

const ilObjSession::CAL_REG_START = 1

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

◆ LOCAL_ROLE_PARTICIPANT_PREFIX

const ilObjSession::LOCAL_ROLE_PARTICIPANT_PREFIX = 'il_sess_participant'

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

◆ MAIL_ALLOWED_ADMIN

const ilObjSession::MAIL_ALLOWED_ADMIN = 2

Definition at line 32 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: