ILIAS  release_7 Revision v7.30-3-g800a261c036
ilObjSession Class Reference
+ Inheritance diagram for ilObjSession:
+ Collaboration diagram for ilObjSession:

Public Member Functions

 __construct ($a_id=0, $a_call_by_reference=true)
 Constructor @access public. More...
 
 getPresentationTitle ()
 get title (overwritten from base class) More...
 
 getPresentationTitleAppointmentPeriod ()
 
 initDefaultRoles ()
 Create local session participant role. More...
 
 getEventId ()
 sget event id More...
 
 setLocation ($a_location)
 set location More...
 
 getLocation ()
 get location More...
 
 setName ($a_name)
 set name More...
 
 getName ()
 get name More...
 
 setPhone ($a_phone)
 set phone More...
 
 getPhone ()
 get phone More...
 
 setEmail ($a_email)
 set email More...
 
 getEmail ()
 get email More...
 
 hasTutorSettings ()
 check if there any tutor settings More...
 
 setDetails ($a_details)
 set details More...
 
 getDetails ()
 get details More...
 
 setRegistrationType ($a_type)
 
 getRegistrationType ()
 
 isRegistrationUserLimitEnabled ()
 
 enableRegistrationUserLimit ($a_limit)
 
 getRegistrationMinUsers ()
 
 setRegistrationMinUsers ($a_users)
 
 getRegistrationMaxUsers ()
 
 setRegistrationMaxUsers ($a_users)
 
 isRegistrationWaitingListEnabled ()
 
 enableRegistrationWaitingList ($a_stat)
 
 setWaitingListAutoFill ($a_value)
 
 hasWaitingListAutoFill ()
 
 setShowMembers ($a_status)
 Show members gallery. More...
 
 getShowMembers ()
 Member gallery enabled. More...
 
 isRegistrationNotificationEnabled ()
 
 setRegistrationNotificationEnabled ($value)
 
 getRegistrationNotificationOption ()
 
 setRegistrationNotificationOption ($value)
 
 enabledRegistration ()
 is registration enabled More...
 
 enabledRegistrationForUsers ()
 
 isCannotParticipateOptionEnabled ()
 
 enableCannotParticipateOption (bool $status)
 
 getAppointments ()
 get appointments More...
 
 addAppointment ($appointment)
 add appointment More...
 
 setAppointments ($appointments)
 set appointments More...
 
 getFirstAppointment ()
 get first appointment More...
 
 getFiles ()
 get files More...
 
 setMailToMembersType ($a_type)
 Set mail to members type. More...
 
 getMailToMembersType ()
 Get mail to members type. More...
 
 validate ()
 validate More...
 
 cloneSettings (ilObjSession $new_obj)
 clone settings More...
 
 cloneDependencies ($a_target_id, $a_copy_id)
 Clone dependencies. More...
 
 create ($a_skip_meta_data=false)
 create new session More...
 
 update ($a_skip_meta_update=false)
 update object More...
 
 delete ()
 delete session and all related data More...
 
 read ()
 read session data More...
 
 initFiles ()
 init files More...
 
 prepareCalendarAppointments ($a_mode='create')
 Prepare calendar appointments. More...
 
 handleAutoFill ()
 Handle auto fill for session members. More...
 
 getMembersObject ()
 Get members objects. More...
 
 getEnableMap ()
 ALways disabled. More...
 
- Public Member Functions inherited from ilObject
 __construct ($a_id=0, $a_reference=true)
 Constructor @access public. More...
 
 withReferences ()
 determines wehter objects are referenced or not (got ref ids or not) More...
 
 read ()
 read object data from db into object More...
 
 getId ()
 get object id @access public More...
 
 setId ($a_id)
 set object id @access public More...
 
 setRefId ($a_id)
 set reference id @access public More...
 
 getRefId ()
 get reference id @access public More...
 
 getType ()
 get object type @access public More...
 
 setType ($a_type)
 set object type @access public More...
 
 getPresentationTitle ()
 get presentation title Normally same as title Overwritten for sessions More...
 
 getTitle ()
 get object title @access public More...
 
 getUntranslatedTitle ()
 get untranslated object title @access public More...
 
 setTitle ($a_title)
 set object title More...
 
 getDescription ()
 get object description More...
 
 setDescription ($a_desc)
 set object description More...
 
 getLongDescription ()
 get object long description (stored in object_description) More...
 
 getImportId ()
 get import id More...
 
 setImportId ($a_import_id)
 set import id More...
 
 setOfflineStatus ($a_status)
 Set offline status. More...
 
 getOfflineStatus ()
 Get offline status. More...
 
 supportsOfflineHandling ()
 Check whether object supports offline handling. More...
 
 getOwner ()
 get object owner More...
 
 getOwnerName ()
 
 setOwner ($a_owner)
 set object owner More...
 
 getCreateDate ()
 get create date @access public More...
 
 getLastUpdateDate ()
 get last update date @access public More...
 
 getDiskUsage ()
 Gets the disk usage of the object in bytes. More...
 
 create ()
 create More...
 
 update ()
 update object in db More...
 
 MDUpdateListener ($a_element)
 Meta data update listener. More...
 
 createMetaData ()
 create meta data entry More...
 
 updateMetaData ()
 update meta data entry More...
 
 deleteMetaData ()
 delete meta data entry More...
 
 updateOwner ()
 update owner of object in db More...
 
 putInTree ($a_parent_ref)
 maybe this method should be in tree object!? More...
 
 setPermissions ($a_parent_ref)
 set permissions of object More...
 
 setParentRolePermissions ($a_parent_ref)
 Initialize the permissions of parent roles (local roles of categories, global roles...) This method is overwritten in e.g courses, groups for building permission intersections with non_member templates. More...
 
 createReference ()
 creates reference for object More...
 
 countReferences ()
 count references of object More...
 
 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 If you want to setup default local roles you MUST overwrite this method in derived object classes (see ilObjForum for an example) @access public More...
 
 applyDidacticTemplate ($a_tpl_id)
 Apply template. More...
 
 setRegisterMode ($a_bool)
 
 isUserRegistered ($a_user_id=0)
 
 requireRegistration ()
 
 getXMLZip ()
 
 getHTMLDirectory ()
 
 appendCopyInfo ($a_target_id, $a_copy_id)
 Prepend Copy info if object with same name exists in that container. More...
 
 cloneDependencies ($a_target_id, $a_copy_id)
 Clone object dependencies. More...
 
 cloneMetaData ($target_obj)
 Copy meta data. More...
 
 getPossibleSubObjects ($a_filter=true)
 get all possible subobjects of this type the object can decide which types of subobjects are possible jut in time overwrite if the decision distinguish from standard model More...
 

Static Public Member Functions

static _lookupRegistrationEnabled ($a_obj_id)
 lookup registration enabled More...
 
static lookupSession ($a_obj_id)
 Get session data. More...
 
- Static Public Member Functions inherited from ilObject
static _lookupObjIdByImportId ($a_import_id)
 
static _lookupImportId ($a_obj_id)
 
static _lookupOwnerName ($a_owner_id)
 lookup owner name for owner id More...
 
static _getIdForImportId ($a_import_id)
 get current object id for import id (static) More...
 
static _getAllReferences ($a_id)
 get all reference ids of object More...
 
static _lookupTitle ($a_id)
 lookup object title More...
 
static lookupOfflineStatus ($a_obj_id)
 Lookup offline status using objectDataCache. More...
 
static _lookupOwner ($a_id)
 lookup object owner More...
 
static _getIdsForTitle ($title, $type='', $partialmatch=false)
 
static _lookupDescription ($a_id)
 lookup object description More...
 
static _lookupLastUpdate ($a_id, $a_as_string=false)
 lookup last update More...
 
static _getLastUpdateOfObjects ($a_objs)
 Get last update for a set of media objects. More...
 
static _lookupObjId ($a_id)
 
static _setDeletedDate ($a_ref_id, $a_deleted_by)
 
static setDeletedDates ($a_ref_ids, $a_user_id)
 Set deleted date. More...
 
static _resetDeletedDate ($a_ref_id)
 only called in ilObjectGUI::insertSavedNodes More...
 
static _lookupDeletedDate ($a_ref_id)
 only called in ilObjectGUI::insertSavedNodes More...
 
static _writeTitle ($a_obj_id, $a_title)
 write title to db (static) More...
 
static _writeDescription ($a_obj_id, $a_desc)
 write description to db (static) More...
 
static _writeImportId ($a_obj_id, $a_import_id)
 write import id to db (static) More...
 
static _lookupType ($a_id, $a_reference=false)
 lookup object type More...
 
static _isInTrash ($a_ref_id)
 checks wether object is in trash More...
 
static _hasUntrashedReference ($a_obj_id)
 checks wether an object has at least one reference that is not in trash More...
 
static _lookupObjectId ($a_ref_id)
 lookup object id More...
 
static _getObjectsDataForType ($a_type, $a_omit_trash=false)
 get all objects of a certain type More...
 
static _exists ($a_id, $a_reference=false, $a_type=null)
 checks if an object exists in object_data@access public More...
 
static _getObjectsByType ($a_obj_type="", $a_owner="")
 Get objects by type. More...
 
static _prepareCloneSelection ($a_ref_ids, $new_type, $show_path=true)
 Prepare copy wizard object selection. More...
 
static _getIcon ( $a_obj_id="", $a_size="big", $a_type="", $a_offline=false)
 Get icon for repository item. More...
 
static collectDeletionDependencies (&$deps, $a_ref_id, $a_obj_id, $a_type, $a_depth=0)
 Collect deletion dependencies. More...
 
static getDeletionDependencies ($a_obj_id)
 Get deletion dependencies. More...
 
static getLongDescriptions (array $a_obj_ids)
 Get long description data. More...
 
static getAllOwnedRepositoryObjects ($a_user_id)
 Get all ids of objects user owns. More...
 
static fixMissingTitles ($a_type, array &$a_obj_title_map)
 Try to fix missing object titles. More...
 
static _lookupCreationDate ($a_id)
 Lookup creation date. More...
 
static hasAutoRating ($a_type, $a_ref_id)
 Check if auto rating is active for parent group/course. More...
 

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
 max length of object title More...
 
const DESC_LENGTH = 128
 
 $lng
 
 $id
 
 $ref_id
 
 $type
 
 $title
 
 $untranslatedTitle
 
 $desc
 
 $long_desc
 
 $owner
 
 $create_date
 
 $last_update
 
 $import_id
 
 $register = false
 
 $referenced
 
 $objectList
 
 $max_title
 
 $max_desc
 
 $add_dots
 

Protected Member Functions

 initAppointments ()
 init appointments More...
 
 initParticipants ()
 init participants object More...
 

Protected Attributes

 $db
 
 $location
 
 $name
 
 $phone
 
 $email
 
 $details
 
 $registration
 
 $event_id
 
 $reg_type = ilMembershipRegistrationSettings::TYPE_NONE
 
 $reg_limited = 0
 
 $reg_min_users = 0
 
 $reg_limited_users = 0
 
 $reg_waiting_list = 0
 
 $reg_waiting_list_autofill
 
 $show_members = false
 
 $show_cannot_participate_option = true
 
 $mail_members = self::MAIL_ALLOWED_ADMIN
 
 $appointments
 
 $files = array()
 
 $session_logger = null
 
 $members_obj
 
- Protected Attributes inherited from ilObject
 $objDefinition
 
 $db
 
 $log
 
 $error
 
 $tree
 
 $app_event_handler
 
 $rbacadmin
 
 $rbacreview
 

Private Attributes

 $registrationNotificationEnabled = false
 
 $notificationOption = ilSessionConstants::NOTIFICATION_INHERIT_OPTION
 

Detailed Description

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

Constructor & Destructor Documentation

◆ __construct()

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

Constructor @access public.

Parameters
integerreference_id or object_id
booleantreat the id as reference_id (true) or object_id (false)

Reimplemented from ilObject.

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

80 {
81 global $DIC;
82
83 $ilDB = $DIC['ilDB'];
84
85 $this->session_logger = $GLOBALS['DIC']->logger()->sess();
86
87 $this->db = $ilDB;
88 $this->type = "sess";
89 parent::__construct($a_id, $a_call_by_reference);
90 }
if(!defined('PATH_SEPARATOR')) $GLOBALS['_PEAR_default_error_mode']
Definition: PEAR.php:64
global $DIC
Definition: goto.php:24
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
global $ilDB

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

+ Here is the call graph for this function:

Member Function Documentation

◆ _lookupRegistrationEnabled()

static ilObjSession::_lookupRegistrationEnabled (   $a_obj_id)
static

lookup registration enabled

@access public

Parameters

return

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

101 {
102 global $DIC;
103
104 $ilDB = $DIC['ilDB'];
105
106 $query = "SELECT reg_type FROM event " .
107 "WHERE obj_id = " . $ilDB->quote($a_obj_id, 'integer') . " ";
108 $res = $ilDB->query($query);
109 while ($row = $res->fetchRow(ilDBConstants::FETCHMODE_OBJECT)) {
110 return (bool) $row->reg_type != ilMembershipRegistrationSettings::TYPE_NONE;
111 }
112 return false;
113 }
$query
foreach($_POST as $key=> $value) $res

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

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

+ Here is the caller graph for this function:

◆ addAppointment()

ilObjSession::addAppointment (   $appointment)

add appointment

@access public

Parameters
objectilSessionAppointment
Returns

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

490 {
491 $this->appointments[] = $appointment;
492 }

◆ cloneDependencies()

ilObjSession::cloneDependencies (   $a_target_id,
  $a_copy_id 
)

Clone dependencies.

Parameters
inttarget id ref_id of new session
intcopy_id
Returns

Reimplemented from ilObject.

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

670 {
671 global $DIC;
672
673 $ilObjDataCache = $DIC['ilObjDataCache'];
674
675 parent::cloneDependencies($a_target_id, $a_copy_id);
676
677 $target_obj_id = $ilObjDataCache->lookupObjId($a_target_id);
678
679 include_once('./Modules/Session/classes/class.ilEventItems.php');
680 $session_materials = new ilEventItems($target_obj_id);
681 $session_materials->cloneItems($this->getId(), $a_copy_id);
682
683 return true;
684 }
class ilEvent
getId()
get object id @access public

References $DIC, and ilObject\getId().

+ Here is the call graph for this function:

◆ cloneSettings()

ilObjSession::cloneSettings ( ilObjSession  $new_obj)

clone settings

@access public

Parameters
ilObjSession
Returns

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

627 {
629 $new_obj->getId(),
632 $this->getId(),
634 )
635 );
636
637 // @var ilObjSession $new_obj
638 $new_obj->setLocation($this->getLocation());
639 $new_obj->setName($this->getName());
640 $new_obj->setPhone($this->getPhone());
641 $new_obj->setEmail($this->getEmail());
642 $new_obj->setDetails($this->getDetails());
643
644 $new_obj->setRegistrationType($this->getRegistrationType());
650 $new_obj->setShowMembers($this->getShowMembers());
651 $new_obj->setMailToMembersType($this->getMailToMembersType());
652
656
657 $new_obj->update(true);
658
659 return true;
660 }
static _lookupContainerSetting($a_id, $a_keyword, $a_default_value=null)
Lookup a container setting.
static _writeContainerSetting($a_id, $a_keyword, $a_value)
getShowMembers()
Member gallery enabled.
getMailToMembersType()
Get mail to members type.
setLocation($a_location)
set location
setEmail($a_email)
set email
getDetails()
get details
enableCannotParticipateOption(bool $status)
setRegistrationNotificationOption($value)
getLocation()
get location
update($a_skip_meta_update=false)
update object
setRegistrationType($a_type)
setName($a_name)
set name
setRegistrationMinUsers($a_users)
setPhone($a_phone)
set phone
setDetails($a_details)
set details
setWaitingListAutoFill($a_value)
setMailToMembersType($a_type)
Set mail to members type.
setRegistrationNotificationEnabled($value)
setShowMembers($a_status)
Show members gallery.
enableRegistrationUserLimit($a_limit)
enableRegistrationWaitingList($a_stat)
setRegistrationMaxUsers($a_users)

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().

+ Here is the call graph for this function:

◆ create()

ilObjSession::create (   $a_skip_meta_data = false)

create new session

@access public

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

694 {
695 global $DIC;
696
697 $ilDB = $DIC['ilDB'];
698 global $DIC;
699
700 $ilAppEventHandler = $DIC['ilAppEventHandler'];
701
702 parent::create();
703
704 if (!$a_skip_meta_data) {
705 $this->createMetaData();
706 }
707
708 $next_id = $ilDB->nextId('event');
709 $query = "INSERT INTO event (event_id,obj_id,location,tutor_name,tutor_phone,tutor_email,details,registration, " .
710 'reg_type, reg_limit_users, reg_limited, reg_waiting_list, reg_min_users, reg_auto_wait,show_members,mail_members,
711 reg_notification, notification_opt, show_cannot_part) ' .
712 "VALUES( " .
713 $ilDB->quote($next_id, 'integer') . ", " .
714 $this->db->quote($this->getId(), 'integer') . ", " .
715 $this->db->quote($this->getLocation(), 'text') . "," .
716 $this->db->quote($this->getName(), 'text') . ", " .
717 $this->db->quote($this->getPhone(), 'text') . ", " .
718 $this->db->quote($this->getEmail(), 'text') . ", " .
719 $this->db->quote($this->getDetails(), 'text') . "," .
720 $this->db->quote($this->enabledRegistrationForUsers(), 'integer') . ", " .
721 $this->db->quote($this->getRegistrationType(), 'integer') . ', ' .
722 $this->db->quote($this->getRegistrationMaxUsers(), 'integer') . ', ' .
723 $this->db->quote($this->isRegistrationUserLimitEnabled(), 'integer') . ', ' .
724 $this->db->quote($this->isRegistrationWaitingListEnabled(), 'integer') . ', ' .
725 $this->db->quote($this->getRegistrationMinUsers(), 'integer') . ', ' .
726 $this->db->quote($this->hasWaitingListAutoFill(), 'integer') . ', ' .
727 $this->db->quote($this->getShowMembers(), 'integer') . ', ' .
728 $this->db->quote($this->getMailToMembersType(), 'integer') . ',' .
729 $this->db->quote($this->isRegistrationNotificationEnabled(), 'integer') . ', ' .
730 $this->db->quote($this->getRegistrationNotificationOption(), 'text') . ', ' .
731 $this->db->quote($this->isCannotParticipateOptionEnabled(), ilDBConstants::T_INTEGER) . ' ' .
732 ")";
733 $res = $ilDB->manipulate($query);
734 $this->event_id = $next_id;
735
736 $ilAppEventHandler->raise(
737 'Modules/Session',
738 'create',
739 array('object' => $this,
740 'obj_id' => $this->getId(),
741 'appointments' => $this->prepareCalendarAppointments('create'))
742 );
743
744 return $this->getId();
745 }
prepareCalendarAppointments($a_mode='create')
Prepare calendar appointments.
createMetaData()
create meta data entry

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

+ Here is the call graph for this function:

◆ delete()

ilObjSession::delete ( )

delete session and all related data

@access public

Returns
bool

Reimplemented from ilObject.

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

809 {
810 global $DIC;
811
812 $ilDB = $DIC['ilDB'];
813 global $DIC;
814
815 $ilAppEventHandler = $DIC['ilAppEventHandler'];
816
817 if (!parent::delete()) {
818 return false;
819 }
820
821 // delete meta data
822 $this->deleteMetaData();
823
824 $query = "DELETE FROM event " .
825 "WHERE obj_id = " . $this->db->quote($this->getId(), 'integer') . " ";
826 $res = $ilDB->manipulate($query);
827
828 include_once('./Modules/Session/classes/class.ilSessionAppointment.php');
830
831 include_once('./Modules/Session/classes/class.ilEventItems.php');
833
834 include_once('./Modules/Session/classes/class.ilEventParticipants.php');
836
837 foreach ($this->getFiles() as $file) {
838 $file->delete();
839 }
840
841 $ilAppEventHandler->raise(
842 'Modules/Session',
843 'delete',
844 array('object' => $this,
845 'obj_id' => $this->getId(),
846 'appointments' => $this->prepareCalendarAppointments('delete'))
847 );
848
849
850 return true;
851 }
static _delete($a_event_id)
static _deleteByEvent($a_event_id)
deleteMetaData()
delete meta data entry
static _deleteBySession($a_event_id)

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

+ Here is the call graph for this function:

◆ enableCannotParticipateOption()

ilObjSession::enableCannotParticipateOption ( bool  $status)
Parameters
bool$status

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

466 : void
467 {
468 $this->show_cannot_participate_option = $status;
469 }

Referenced by cloneSettings(), and read().

+ Here is the caller graph for this function:

◆ enabledRegistration()

ilObjSession::enabledRegistration ( )

is registration enabled

@access public

Returns

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

444 {
445 return $this->reg_type != ilMembershipRegistrationSettings::TYPE_NONE;
446 }

References ilMembershipRegistrationSettings\TYPE_NONE.

◆ enabledRegistrationForUsers()

ilObjSession::enabledRegistrationForUsers ( )
Returns
bool

Definition at line 451 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 (   $a_limit)

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

342 {
343 $this->reg_limited = $a_limit;
344 }

Referenced by cloneSettings(), and read().

+ Here is the caller graph for this function:

◆ enableRegistrationWaitingList()

ilObjSession::enableRegistrationWaitingList (   $a_stat)

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

372 {
373 $this->reg_waiting_list = $a_stat;
374 }

Referenced by cloneSettings(), and read().

+ Here is the caller graph for this function:

◆ getAppointments()

ilObjSession::getAppointments ( )

get appointments

@access public

Returns
array

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

478 {
479 return $this->appointments ? $this->appointments : array();
480 }

◆ getDetails()

ilObjSession::getDetails ( )

get details

@access public

Returns
string details

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

322 {
323 return $this->details;
324 }

References $details.

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

+ Here is the caller graph for this function:

◆ getEmail()

ilObjSession::getEmail ( )

get email

@access public

Returns
string email

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

287 {
288 return $this->email;
289 }

References $email.

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

+ Here is the caller graph for this function:

◆ getEnableMap()

ilObjSession::getEnableMap ( )

ALways disabled.

Returns
bool

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

1052 {
1053 return false;
1054 }

◆ getEventId()

ilObjSession::getEventId ( )

sget event id

@access public

Returns

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

198 {
199 return $this->event_id;
200 }

References $event_id.

◆ getFiles()

ilObjSession::getFiles ( )

get files

@access public

Parameters

return

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

525 {
526 return $this->files ? $this->files : array();
527 }

Referenced by delete().

+ Here is the caller graph for this function:

◆ getFirstAppointment()

ilObjSession::getFirstAppointment ( )

get first appointment

@access public

Returns
ilSessionAppointment

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

513 {
514 return is_object($this->appointments[0]) ? $this->appointments[0] : ($this->appointments[0] = new ilSessionAppointment());
515 }
class ilSessionAppointment

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

+ Here is the caller graph for this function:

◆ getLocation()

ilObjSession::getLocation ( )

get location

@access public

Returns
string location

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

220 {
221 return $this->location;
222 }

References $location.

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

+ Here is the caller graph for this function:

◆ getMailToMembersType()

ilObjSession::getMailToMembersType ( )

Get mail to members type.

Returns
int

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

544 {
545 return $this->mail_members;
546 }

References $mail_members.

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

+ Here is the caller graph for this function:

◆ getMembersObject()

ilObjSession::getMembersObject ( )

Get members objects.

Returns
\ilSessionParticipants

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

1040 {
1041 if (!$this->members_obj instanceof ilSessionParticipants) {
1042 $this->initParticipants();
1043 }
1044 return $this->members_obj;
1045 }
initParticipants()
init participants object
Session participation handling.

References $members_obj, and initParticipants().

+ Here is the call graph for this function:

◆ getName()

ilObjSession::getName ( )

get name

@access public

Returns
string name

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

242 {
243 return $this->name;
244 }

References $name.

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

+ Here is the caller graph for this function:

◆ getPhone()

ilObjSession::getPhone ( )

get phone

@access public

Returns
string phone

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

264 {
265 return $this->phone;
266 }

References $phone.

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

+ Here is the caller graph for this function:

◆ getPresentationTitle()

ilObjSession::getPresentationTitle ( )

get title (overwritten from base class)

@access public

Returns

Reimplemented from ilObject.

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

147 {
148 $date = new ilDate($this->getFirstAppointment()->getStart()->getUnixTime(), IL_CAL_UNIX);
149 if ($this->getTitle()) {
150 return ilDatePresentation::formatDate($this->getFirstAppointment()->getStart()) . ': ' . $this->getTitle();
151 } else {
152 return ilDatePresentation::formatDate($date);
153 }
154 }
const IL_CAL_UNIX
static formatDate(ilDateTime $date, $a_skip_day=false, $a_include_wd=false, $include_seconds=false)
Format a date @access public.
Class for single dates.
getFirstAppointment()
get first appointment
getTitle()
get object title @access public

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

+ Here is the call graph for this function:

◆ getPresentationTitleAppointmentPeriod()

ilObjSession::getPresentationTitleAppointmentPeriod ( )
Returns
string

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

160 {
161 $title = '';
162 if ($this->getTitle()) {
163 $title = ': ' . $this->getTitle();
164 }
166 $this->getFirstAppointment()->getStart(),
167 $this->getFirstAppointment()->getEnd()
168 ) . $title;
169 }
static formatPeriod(ilDateTime $start, ilDateTime $end, $a_skip_starting_day=false)
Format a period of two date Shows: 14.

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

+ Here is the call graph for this function:

◆ getRegistrationMaxUsers()

ilObjSession::getRegistrationMaxUsers ( )

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

357 {
359 }

References $reg_limited_users.

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

+ Here is the caller graph for this function:

◆ getRegistrationMinUsers()

ilObjSession::getRegistrationMinUsers ( )

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

347 {
349 }

References $reg_min_users.

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

+ Here is the caller graph for this function:

◆ getRegistrationNotificationOption()

ilObjSession::getRegistrationNotificationOption ( )
Returns
string

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

425 {
427 }

References $notificationOption.

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

+ Here is the caller graph for this function:

◆ getRegistrationType()

ilObjSession::getRegistrationType ( )

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

332 {
333 return $this->reg_type;
334 }

References $reg_type.

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

+ Here is the caller graph for this function:

◆ getShowMembers()

ilObjSession::getShowMembers ( )

Member gallery enabled.

Returns
bool

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

400 {
401 return (bool) $this->show_members;
402 }

References $show_members.

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

+ Here is the caller graph for this function:

◆ handleAutoFill()

ilObjSession::handleAutoFill ( )

Handle auto fill for session members.

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

964 {
965 if (
967 !$this->hasWaitingListAutoFill()
968 ) {
969 $this->session_logger->debug('Waiting list or auto fill is disabled.');
970 return true;
971 }
972
974 $current = $parts->getCountParticipants();
975 $max = $this->getRegistrationMaxUsers();
976
977 if ($max <= $current) {
978 $this->session_logger->debug('Maximum number of participants not reached.');
979 $this->session_logger->debug('Maximum number of members: ' . $max);
980 $this->session_logger->debug('Current number of members: ' . $current);
981 return true;
982 }
983
984 $session_waiting_list = new ilSessionWaitingList($this->getId());
985 foreach ($session_waiting_list->getUserIds() as $user_id) {
986 $user = ilObjectFactory::getInstanceByObjId($user_id);
987 if (!$user instanceof ilObjUser) {
988 $this->session_logger->warning('Found invalid user id on waiting list: ' . $user_id);
989 continue;
990 }
991 if (in_array($user_id, $parts->getParticipants())) {
992 $this->session_logger->notice('User on waiting list already session member: ' . $user_id);
993 continue;
994 }
995
996 if ($this->enabledRegistrationForUsers()) {
997 $this->session_logger->debug('Registration enabled: register user');
998 $parts->register($user_id);
999 $parts->sendNotification(
1001 $user_id
1002 );
1003 } else {
1004 $this->session_logger->debug('Registration disabled: set user status to participated.');
1005 $parts->getEventParticipants()->updateParticipation($user_id, true);
1006 $parts->sendNotification(
1008 $user_id
1009 );
1010 }
1011
1012 $session_waiting_list->removeFromList($user_id);
1013
1014 $current++;
1015 if ($current >= $max) {
1016 break;
1017 }
1018 }
1019 }
static getInstanceByObjId($a_obj_id, $stop_on_error=true)
get an instance of an Ilias object by object id
static _getInstanceByObjId($a_obj_id)
Get instance.

References ilSessionParticipants\_getInstanceByObjId(), enabledRegistrationForUsers(), ilObject\getId(), ilObjectFactory\getInstanceByObjId(), getRegistrationMaxUsers(), hasWaitingListAutoFill(), isRegistrationWaitingListEnabled(), and ilSessionMembershipMailNotification\TYPE_ACCEPTED_SUBSCRIPTION_MEMBER.

+ Here is the call graph for this function:

◆ hasTutorSettings()

ilObjSession::hasTutorSettings ( )

check if there any tutor settings

@access public

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

297 {
298 return strlen($this->getName()) or
299 strlen($this->getEmail()) or
300 strlen($this->getPhone());
301 }

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

+ Here is the call graph for this function:

◆ hasWaitingListAutoFill()

ilObjSession::hasWaitingListAutoFill ( )

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

382 {
384 }

References $reg_waiting_list_autofill.

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

+ Here is the caller graph for this function:

◆ initAppointments()

ilObjSession::initAppointments ( )
protected

init appointments

@access protected

Parameters

return

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

900 {
901 // get assigned appointments
902 include_once('./Modules/Session/classes/class.ilSessionAppointment.php');
903 $this->appointments = ilSessionAppointment::_readAppointmentsBySession($this->getId());
904 }
static _readAppointmentsBySession($a_event_id)

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

Referenced by read().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initDefaultRoles()

ilObjSession::initDefaultRoles ( )

Create local session participant role.

Reimplemented from ilObject.

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

175 {
176 include_once './Services/AccessControl/classes/class.ilObjRole.php';
178 self::LOCAL_ROLE_PARTICIPANT_PREFIX . '_' . $this->getRefId(),
179 'Participant of session obj_no.' . $this->getId(),
180 self::LOCAL_ROLE_PARTICIPANT_PREFIX,
181 $this->getRefId()
182 );
183
184 if (!$role instanceof ilObjRole) {
185 $this->session_logger->warning('Could not create default session role.');
186 $this->session_logger->logStack(ilLogLevel::WARNING);
187 }
188 return array();
189 }
Class ilObjRole.
static createDefaultRole($a_title, $a_description, $a_tpl_name, $a_ref_id)
getRefId()
get reference id @access public

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

+ Here is the call graph for this function:

◆ initFiles()

ilObjSession::initFiles ( )

init files

@access protected

Parameters

return

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

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

914 {
915 include_once('./Modules/Session/classes/class.ilSessionFile.php');
921 //$this->files = ilSessionFile::_readFilesByEvent($this->getEventId());
922 }

Referenced by read().

+ Here is the caller graph for this function:

◆ initParticipants()

ilObjSession::initParticipants ( )
protected

init participants object

@access protected

Returns

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

1030 {
1031 $this->members_obj = ilSessionParticipants::_getInstanceByObjId($this->getId());
1032 }

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

Referenced by getMembersObject().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isCannotParticipateOptionEnabled()

ilObjSession::isCannotParticipateOptionEnabled ( )

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

458 : bool
459 {
461 }

References $show_cannot_participate_option.

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

+ Here is the caller graph for this function:

◆ isRegistrationNotificationEnabled()

ilObjSession::isRegistrationNotificationEnabled ( )
Returns
bool

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

408 {
410 }

References $registrationNotificationEnabled.

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

+ Here is the caller graph for this function:

◆ isRegistrationUserLimitEnabled()

ilObjSession::isRegistrationUserLimitEnabled ( )

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

337 {
338 return $this->reg_limited;
339 }

References $reg_limited.

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

+ Here is the caller graph for this function:

◆ isRegistrationWaitingListEnabled()

ilObjSession::isRegistrationWaitingListEnabled ( )

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

367 {
369 }

References $reg_waiting_list.

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

+ Here is the caller graph for this function:

◆ lookupSession()

static ilObjSession::lookupSession (   $a_obj_id)
static

Get session data.

Parameters
object$a_obj_id
Returns

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

121 {
122 global $DIC;
123
124 $ilDB = $DIC['ilDB'];
125
126 $query = "SELECT * FROM event " .
127 "WHERE obj_id = " . $ilDB->quote($a_obj_id);
128 $res = $ilDB->query($query);
129 while ($row = $res->fetchRow(ilDBConstants::FETCHMODE_OBJECT)) {
130 $data['location'] = $row->location ? $row->location : '';
131 $data['details'] = $row->details ? $row->details : '';
132 $data['name'] = $row->tutor_name ? $row->tutor_name : '';
133 $data['email'] = $row->tutor_email ? $row->tutor_email : '';
134 $data['phone'] = $row->tutor_phone ? $row->tutor_phone : '';
135 }
136 return (array) $data;
137 }
$data
Definition: storeScorm.php:23

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

Referenced by ilObjSessionListGUI\getProperties().

+ Here is the caller graph for this function:

◆ prepareCalendarAppointments()

ilObjSession::prepareCalendarAppointments (   $a_mode = 'create')

Prepare calendar appointments.

@access public

Parameters
stringmode UPDATE|CREATE|DELETE
Returns

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

933 {
934 include_once('./Services/Calendar/classes/class.ilCalendarAppointmentTemplate.php');
935
936 switch ($a_mode) {
937 case 'create':
938 case 'update':
939
940 $app = new ilCalendarAppointmentTemplate(self::CAL_REG_START);
941 $app->setTranslationType(IL_CAL_TRANSLATION_NONE);
942 $app->setTitle($this->getTitle() ? $this->getTitle() : $this->lng->txt('obj_sess'));
943 $app->setDescription($this->getLongDescription());
944 $app->setLocation($this->getLocation());
945
946 $sess_app = $this->getFirstAppointment();
947 $app->setFullday($sess_app->isFullday());
948 $app->setStart($sess_app->getStart());
949 $app->setEnd($sess_app->getEnd());
950 $apps[] = $app;
951
952 return $apps;
953
954 case 'delete':
955 // Nothing to do: The category and all assigned appointments will be deleted.
956 return array();
957 }
958 }
const IL_CAL_TRANSLATION_NONE
Apointment templates are used for automatic generated apointments.
getLongDescription()
get object long description (stored in object_description)
$app
Definition: cli.php:38

References $app, getFirstAppointment(), getLocation(), ilObject\getLongDescription(), ilObject\getTitle(), and IL_CAL_TRANSLATION_NONE.

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

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ read()

ilObjSession::read ( )

read session data

@access public

Parameters

return

Reimplemented from ilObject.

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

861 {
862 parent::read();
863
864 $query = "SELECT * FROM event WHERE " .
865 "obj_id = " . $this->db->quote($this->getId(), 'integer') . " ";
866 $res = $this->db->query($query);
867
868 while ($row = $res->fetchRow(ilDBConstants::FETCHMODE_OBJECT)) {
869 $this->setLocation($row->location);
870 $this->setName($row->tutor_name);
871 $this->setPhone($row->tutor_phone);
872 $this->setEmail($row->tutor_email);
873 $this->setDetails($row->details);
874 $this->setRegistrationType($row->reg_type);
875 $this->enableRegistrationUserLimit($row->reg_limited);
876 $this->enableRegistrationWaitingList($row->reg_waiting_list);
877 $this->setWaitingListAutoFill($row->reg_auto_wait);
878 $this->setRegistrationMaxUsers($row->reg_limit_users);
879 $this->setRegistrationMinUsers($row->reg_min_users);
880 $this->setShowMembers((bool) $row->show_members);
881 $this->setMailToMembersType((int) $row->mail_members);
882 $this->setRegistrationNotificationEnabled($row->reg_notification);
883 $this->setRegistrationNotificationOption($row->notification_opt);
884 $this->enableCannotParticipateOption((bool) $row->show_cannot_part);
885 $this->event_id = $row->event_id;
886 }
887
888 $this->initAppointments();
889 $this->initFiles();
890 }
initAppointments()
init appointments
initFiles()
init files

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

+ Here is the call graph for this function:

◆ setAppointments()

ilObjSession::setAppointments (   $appointments)

set appointments

@access public

Parameters
arrayilSessionAppointments
Returns

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

502 {
503 $this->appointments = $appointments;
504 }

References $appointments.

◆ setDetails()

ilObjSession::setDetails (   $a_details)

set details

@access public

Parameters
stringdetails

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

311 {
312 $this->details = $a_details;
313 }

Referenced by cloneSettings(), and read().

+ Here is the caller graph for this function:

◆ setEmail()

ilObjSession::setEmail (   $a_email)

set email

@access public

Parameters
stringemail
Returns

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

276 {
277 $this->email = $a_email;
278 }

Referenced by cloneSettings(), and read().

+ Here is the caller graph for this function:

◆ setLocation()

ilObjSession::setLocation (   $a_location)

set location

@access public

Parameters
stringlocation

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

209 {
210 $this->location = $a_location;
211 }

Referenced by cloneSettings(), and read().

+ Here is the caller graph for this function:

◆ setMailToMembersType()

ilObjSession::setMailToMembersType (   $a_type)

Set mail to members type.

Parameters
int$a_type

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

535 {
536 $this->mail_members = $a_type;
537 }

Referenced by cloneSettings(), and read().

+ Here is the caller graph for this function:

◆ setName()

ilObjSession::setName (   $a_name)

set name

@access public

Parameters
stringname

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

231 {
232 $this->name = $a_name;
233 }

Referenced by cloneSettings(), and read().

+ Here is the caller graph for this function:

◆ setPhone()

ilObjSession::setPhone (   $a_phone)

set phone

@access public

Parameters
stringphone

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

253 {
254 $this->phone = $a_phone;
255 }

Referenced by cloneSettings(), and read().

+ Here is the caller graph for this function:

◆ setRegistrationMaxUsers()

ilObjSession::setRegistrationMaxUsers (   $a_users)

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

362 {
363 $this->reg_limited_users = $a_users;
364 }

Referenced by cloneSettings(), and read().

+ Here is the caller graph for this function:

◆ setRegistrationMinUsers()

ilObjSession::setRegistrationMinUsers (   $a_users)

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

352 {
353 $this->reg_min_users = $a_users;
354 }

Referenced by cloneSettings(), and read().

+ Here is the caller graph for this function:

◆ setRegistrationNotificationEnabled()

ilObjSession::setRegistrationNotificationEnabled (   $value)
Parameters
$value
Returns
mixed

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

417 {
418 return $this->registrationNotificationEnabled = $value;
419 }

Referenced by cloneSettings(), and read().

+ Here is the caller graph for this function:

◆ setRegistrationNotificationOption()

ilObjSession::setRegistrationNotificationOption (   $value)
Parameters
$value

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

433 {
434 $this->notificationOption = $value;
435 }

Referenced by cloneSettings(), and read().

+ Here is the caller graph for this function:

◆ setRegistrationType()

ilObjSession::setRegistrationType (   $a_type)

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

327 {
328 $this->reg_type = $a_type;
329 }

Referenced by cloneSettings(), and read().

+ Here is the caller graph for this function:

◆ setShowMembers()

ilObjSession::setShowMembers (   $a_status)

Show members gallery.

Parameters
$a_status

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

391 {
392 $this->show_members = (bool) $a_status;
393 }

Referenced by cloneSettings(), and read().

+ Here is the caller graph for this function:

◆ setWaitingListAutoFill()

ilObjSession::setWaitingListAutoFill (   $a_value)

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

377 {
378 $this->reg_waiting_list_autofill = (bool) $a_value;
379 }

Referenced by cloneSettings(), and read().

+ Here is the caller graph for this function:

◆ update()

ilObjSession::update (   $a_skip_meta_update = false)

update object

@access public

Parameters

return bool success

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

755 {
756 global $DIC;
757
758 $ilDB = $DIC['ilDB'];
759 global $DIC;
760
761 $ilAppEventHandler = $DIC['ilAppEventHandler'];
762
763 if (!parent::update()) {
764 return false;
765 }
766 if (!$a_skip_meta_update) {
767 $this->updateMetaData();
768 }
769
770 $query = "UPDATE event SET " .
771 "location = " . $this->db->quote($this->getLocation(), 'text') . "," .
772 "tutor_name = " . $this->db->quote($this->getName(), 'text') . ", " .
773 "tutor_phone = " . $this->db->quote($this->getPhone(), 'text') . ", " .
774 "tutor_email = " . $this->db->quote($this->getEmail(), 'text') . ", " .
775 "details = " . $this->db->quote($this->getDetails(), 'text') . ", " .
776 "registration = " . $this->db->quote($this->enabledRegistrationForUsers(), 'integer') . ", " .
777 "reg_type = " . $this->db->quote($this->getRegistrationType(), 'integer') . ", " .
778 "reg_limited = " . $this->db->quote($this->isRegistrationUserLimitEnabled(), 'integer') . ", " .
779 "reg_limit_users = " . $this->db->quote($this->getRegistrationMaxUsers(), 'integer') . ", " .
780 "reg_min_users = " . $this->db->quote($this->getRegistrationMinUsers(), 'integer') . ", " .
781 "reg_waiting_list = " . $this->db->quote($this->isRegistrationWaitingListEnabled(), 'integer') . ", " .
782 "reg_auto_wait = " . $this->db->quote($this->hasWaitingListAutoFill(), 'integer') . ", " .
783 'show_members = ' . $this->db->quote($this->getShowMembers(), 'integer') . ', ' .
784 'mail_members = ' . $this->db->quote($this->getMailToMembersType(), 'integer') . ', ' .
785 "reg_auto_wait = " . $this->db->quote($this->hasWaitingListAutoFill(), 'integer') . ", " .
786 "reg_notification = " . $this->db->quote($this->isRegistrationNotificationEnabled(), 'integer') . ", " .
787 "notification_opt = " . $this->db->quote($this->getRegistrationNotificationOption(), 'text') . ", " .
788 'show_cannot_part = ' . $this->db->quote($this->isCannotParticipateOptionEnabled(), ilDBConstants::T_INTEGER) . ' ' .
789 "WHERE obj_id = " . $this->db->quote($this->getId(), 'integer') . " ";
790 $res = $ilDB->manipulate($query);
791
792 $ilAppEventHandler->raise(
793 'Modules/Session',
794 'update',
795 array('object' => $this,
796 'obj_id' => $this->getId(),
797 'appointments' => $this->prepareCalendarAppointments('update'))
798 );
799 return true;
800 }
updateMetaData()
update meta data entry

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

Referenced by cloneSettings().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ validate()

ilObjSession::validate ( )

validate

@access public

Parameters

return bool

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

557 {
558 global $DIC;
559
560 $ilErr = $DIC['ilErr'];
561
562 // #17114
563 if ($this->isRegistrationUserLimitEnabled() &&
564 !$this->getRegistrationMaxUsers()) {
565 $ilErr->appendMessage($this->lng->txt("sess_max_members_needed"));
566 return false;
567 }
568
569 return true;
570 }
$ilErr
Definition: raiseError.php:18

References $DIC, $ilErr, getRegistrationMaxUsers(), and isRegistrationUserLimitEnabled().

+ Here is the call graph for this function:

Field Documentation

◆ $appointments

ilObjSession::$appointments
protected

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

Referenced by setAppointments().

◆ $db

ilObjSession::$db
protected

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

◆ $details

ilObjSession::$details
protected

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

Referenced by getDetails().

◆ $email

ilObjSession::$email
protected

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

Referenced by getEmail().

◆ $event_id

ilObjSession::$event_id
protected

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

Referenced by getEventId().

◆ $files

ilObjSession::$files = array()
protected

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

◆ $location

ilObjSession::$location
protected

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

Referenced by getLocation().

◆ $mail_members

ilObjSession::$mail_members = self::MAIL_ALLOWED_ADMIN
protected

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

Referenced by getMailToMembersType().

◆ $members_obj

ilObjSession::$members_obj
protected

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

Referenced by getMembersObject().

◆ $name

ilObjSession::$name
protected

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

Referenced by getName().

◆ $notificationOption

ilObjSession::$notificationOption = ilSessionConstants::NOTIFICATION_INHERIT_OPTION
private

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

Referenced by getRegistrationNotificationOption().

◆ $phone

ilObjSession::$phone
protected

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

Referenced by getPhone().

◆ $reg_limited

ilObjSession::$reg_limited = 0
protected

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

Referenced by isRegistrationUserLimitEnabled().

◆ $reg_limited_users

ilObjSession::$reg_limited_users = 0
protected

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

Referenced by getRegistrationMaxUsers().

◆ $reg_min_users

ilObjSession::$reg_min_users = 0
protected

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

Referenced by getRegistrationMinUsers().

◆ $reg_type

ilObjSession::$reg_type = ilMembershipRegistrationSettings::TYPE_NONE
protected

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

Referenced by getRegistrationType().

◆ $reg_waiting_list

ilObjSession::$reg_waiting_list = 0
protected

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

Referenced by isRegistrationWaitingListEnabled().

◆ $reg_waiting_list_autofill

ilObjSession::$reg_waiting_list_autofill
protected

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

Referenced by hasWaitingListAutoFill().

◆ $registration

ilObjSession::$registration
protected

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

◆ $registrationNotificationEnabled

ilObjSession::$registrationNotificationEnabled = false
private

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

Referenced by isRegistrationNotificationEnabled().

◆ $session_logger

ilObjSession::$session_logger = null
protected

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

◆ $show_cannot_participate_option

ilObjSession::$show_cannot_participate_option = true
protected

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

Referenced by isCannotParticipateOptionEnabled().

◆ $show_members

ilObjSession::$show_members = false
protected

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

Referenced by getShowMembers().

◆ CAL_REG_START

const ilObjSession::CAL_REG_START = 1

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

◆ LOCAL_ROLE_PARTICIPANT_PREFIX

const ilObjSession::LOCAL_ROLE_PARTICIPANT_PREFIX = 'il_sess_participant'

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

◆ MAIL_ALLOWED_ADMIN

const ilObjSession::MAIL_ALLOWED_ADMIN = 2

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

Referenced by ilObjSessionGUI\initForm().

◆ MAIL_ALLOWED_ALL

const ilObjSession::MAIL_ALLOWED_ALL = 1

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

Referenced by ilObjSessionGUI\initForm().


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