ILIAS  release_7 Revision v7.30-3-g800a261c036
All Data Structures Namespaces Files Functions Variables Modules Pages
ilObjSession Class Reference
+ Inheritance diagram for ilObjSession:
+ Collaboration diagram for ilObjSession:

Public Member Functions

 __construct ($a_id=0, $a_call_by_reference=true)
 Constructor 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 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 public More...
 
 setId ($a_id)
 set object id public More...
 
 setRefId ($a_id)
 set reference id public More...
 
 getRefId ()
 get reference id public More...
 
 getType ()
 get object type public More...
 
 setType ($a_type)
 set object type public More...
 
 getPresentationTitle ()
 get presentation title Normally same as title Overwritten for sessions More...
 
 getTitle ()
 get object title public More...
 
 getUntranslatedTitle ()
 get untranslated object title 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 public More...
 
 getLastUpdateDate ()
 get last update date 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) 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 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 public.

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

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

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

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  }
global $DIC
Definition: goto.php:24
if(!defined('PATH_SEPARATOR')) $GLOBALS['_PEAR_default_error_mode']
Definition: PEAR.php:64
__construct(Container $dic, ilPlugin $plugin)
global $ilDB
+ Here is the call graph for this function:

Member Function Documentation

◆ _lookupRegistrationEnabled()

static ilObjSession::_lookupRegistrationEnabled (   $a_obj_id)
static

lookup registration enabled

public

Parameters

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

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

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

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  }
foreach($_POST as $key=> $value) $res
global $DIC
Definition: goto.php:24
$query
global $ilDB
+ Here is the caller graph for this function:

◆ addAppointment()

ilObjSession::addAppointment (   $appointment)

add appointment

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

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

References $DIC, and ilObject\getId().

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  }
getId()
get object id public
global $DIC
Definition: goto.php:24
class ilEvent
+ Here is the call graph for this function:

◆ cloneSettings()

ilObjSession::cloneSettings ( ilObjSession  $new_obj)

clone settings

public

Parameters
ilObjSession
Returns

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

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  }
enableRegistrationUserLimit($a_limit)
getEmail()
get email
getLocation()
get location
setLocation($a_location)
set location
setPhone($a_phone)
set phone
setWaitingListAutoFill($a_value)
setName($a_name)
set name
setEmail($a_email)
set email
setMailToMembersType($a_type)
Set mail to members type.
enableCannotParticipateOption(bool $status)
setRegistrationMinUsers($a_users)
getId()
get object id public
setRegistrationType($a_type)
getPhone()
get phone
getMailToMembersType()
Get mail to members type.
getShowMembers()
Member gallery enabled.
setDetails($a_details)
set details
getDetails()
get details
setRegistrationNotificationOption($value)
setShowMembers($a_status)
Show members gallery.
static _writeContainerSetting($a_id, $a_keyword, $a_value)
setRegistrationMaxUsers($a_users)
setRegistrationNotificationEnabled($value)
enableRegistrationWaitingList($a_stat)
update($a_skip_meta_update=false)
update object
static _lookupContainerSetting($a_id, $a_keyword, $a_default_value=null)
Lookup a container setting.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ create()

ilObjSession::create (   $a_skip_meta_data = false)

create new session

public

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

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.

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  }
getEmail()
get email
getLocation()
get location
createMetaData()
create meta data entry
foreach($_POST as $key=> $value) $res
getId()
get object id public
prepareCalendarAppointments($a_mode='create')
Prepare calendar appointments.
global $DIC
Definition: goto.php:24
getPhone()
get phone
$query
getMailToMembersType()
Get mail to members type.
getShowMembers()
Member gallery enabled.
getDetails()
get details
global $ilDB
+ Here is the call graph for this function:

◆ delete()

ilObjSession::delete ( )

delete session and all related data

public

Returns
bool

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

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

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

Referenced by cloneSettings(), and read().

466  : void
467  {
468  $this->show_cannot_participate_option = $status;
469  }
+ Here is the caller graph for this function:

◆ enabledRegistration()

ilObjSession::enabledRegistration ( )

is registration enabled

public

Returns

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

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.

Referenced by cloneSettings(), and read().

342  {
343  $this->reg_limited = $a_limit;
344  }
+ Here is the caller graph for this function:

◆ enableRegistrationWaitingList()

ilObjSession::enableRegistrationWaitingList (   $a_stat)

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

Referenced by cloneSettings(), and read().

372  {
373  $this->reg_waiting_list = $a_stat;
374  }
+ Here is the caller graph for this function:

◆ getAppointments()

ilObjSession::getAppointments ( )

get appointments

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

public

Returns
string details

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

References $details.

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

322  {
323  return $this->details;
324  }
+ Here is the caller graph for this function:

◆ getEmail()

ilObjSession::getEmail ( )

get email

public

Returns
string email

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

References $email.

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

287  {
288  return $this->email;
289  }
+ 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

public

Returns

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

References $event_id.

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

◆ getFiles()

ilObjSession::getFiles ( )

get files

public

Parameters

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

Referenced by delete().

525  {
526  return $this->files ? $this->files : array();
527  }
+ Here is the caller graph for this function:

◆ getFirstAppointment()

ilObjSession::getFirstAppointment ( )

get first appointment

public

Returns
ilSessionAppointment

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

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

513  {
514  return is_object($this->appointments[0]) ? $this->appointments[0] : ($this->appointments[0] = new ilSessionAppointment());
515  }
class ilSessionAppointment
+ Here is the caller graph for this function:

◆ getLocation()

ilObjSession::getLocation ( )

get location

public

Returns
string location

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

References $location.

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

220  {
221  return $this->location;
222  }
+ 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.

References $mail_members.

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

544  {
545  return $this->mail_members;
546  }
+ Here is the caller graph for this function:

◆ getMembersObject()

ilObjSession::getMembersObject ( )

Get members objects.

Returns

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

References $members_obj, and initParticipants().

1040  {
1041  if (!$this->members_obj instanceof ilSessionParticipants) {
1042  $this->initParticipants();
1043  }
1044  return $this->members_obj;
1045  }
Session participation handling.
initParticipants()
init participants object
+ Here is the call graph for this function:

◆ getName()

ilObjSession::getName ( )

get name

public

Returns
string name

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

References $name.

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

242  {
243  return $this->name;
244  }
+ Here is the caller graph for this function:

◆ getPhone()

ilObjSession::getPhone ( )

get phone

public

Returns
string phone

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

References $phone.

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

264  {
265  return $this->phone;
266  }
+ Here is the caller graph for this function:

◆ getPresentationTitle()

ilObjSession::getPresentationTitle ( )

get title (overwritten from base class)

public

Returns

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

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

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 public.
Class for single dates.
getTitle()
get object title public
getFirstAppointment()
get first appointment
+ Here is the call graph for this function:

◆ getPresentationTitleAppointmentPeriod()

ilObjSession::getPresentationTitleAppointmentPeriod ( )
Returns
string

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

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

160  {
161  $title = '';
162  if ($this->getTitle()) {
163  $title = ': ' . $this->getTitle();
164  }
166  $this->getFirstAppointment()->getStart(),
167  $this->getFirstAppointment()->getEnd()
168  ) . $title;
169  }
getTitle()
get object title public
static formatPeriod(ilDateTime $start, ilDateTime $end, $a_skip_starting_day=false)
Format a period of two date Shows: 14.
getFirstAppointment()
get first appointment
+ Here is the call graph for this function:

◆ getRegistrationMaxUsers()

ilObjSession::getRegistrationMaxUsers ( )

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

References $reg_limited_users.

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

357  {
359  }
+ Here is the caller graph for this function:

◆ getRegistrationMinUsers()

ilObjSession::getRegistrationMinUsers ( )

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

References $reg_min_users.

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

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

◆ getRegistrationNotificationOption()

ilObjSession::getRegistrationNotificationOption ( )
Returns
string

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

References $notificationOption.

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

425  {
427  }
+ Here is the caller graph for this function:

◆ getRegistrationType()

ilObjSession::getRegistrationType ( )

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

References $reg_type.

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

332  {
333  return $this->reg_type;
334  }
+ 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.

References $show_members.

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

400  {
401  return (bool) $this->show_members;
402  }
+ 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.

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

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) {
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)
Get instance.
getId()
get object id public
static getInstanceByObjId($a_obj_id, $stop_on_error=true)
get an instance of an Ilias object by object id
+ Here is the call graph for this function:

◆ hasTutorSettings()

ilObjSession::hasTutorSettings ( )

check if there any tutor settings

public

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

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

297  {
298  return strlen($this->getName()) or
299  strlen($this->getEmail()) or
300  strlen($this->getPhone());
301  }
getEmail()
get email
getPhone()
get phone
+ Here is the call graph for this function:

◆ hasWaitingListAutoFill()

ilObjSession::hasWaitingListAutoFill ( )

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

References $reg_waiting_list_autofill.

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

382  {
383  return (bool) $this->reg_waiting_list_autofill;
384  }
+ Here is the caller graph for this function:

◆ initAppointments()

ilObjSession::initAppointments ( )
protected

init appointments

protected

Parameters

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

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

Referenced by read().

900  {
901  // get assigned appointments
902  include_once('./Modules/Session/classes/class.ilSessionAppointment.php');
903  $this->appointments = ilSessionAppointment::_readAppointmentsBySession($this->getId());
904  }
getId()
get object id public
static _readAppointmentsBySession($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 174 of file class.ilObjSession.php.

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

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)
getId()
get object id public
getRefId()
get reference id public
+ Here is the call graph for this function:

◆ initFiles()

ilObjSession::initFiles ( )

init files

protected

Parameters

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.

Referenced by read().

914  {
915  include_once('./Modules/Session/classes/class.ilSessionFile.php');
921  //$this->files = ilSessionFile::_readFilesByEvent($this->getEventId());
922  }
+ Here is the caller graph for this function:

◆ initParticipants()

ilObjSession::initParticipants ( )
protected

init participants object

protected

Returns

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

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

Referenced by getMembersObject().

1030  {
1031  $this->members_obj = ilSessionParticipants::_getInstanceByObjId($this->getId());
1032  }
static _getInstanceByObjId($a_obj_id)
Get instance.
getId()
get object id public
+ 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.

References $show_cannot_participate_option.

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

458  : bool
459  {
461  }
+ Here is the caller graph for this function:

◆ isRegistrationNotificationEnabled()

ilObjSession::isRegistrationNotificationEnabled ( )
Returns
bool

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

References $registrationNotificationEnabled.

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

408  {
410  }
+ Here is the caller graph for this function:

◆ isRegistrationUserLimitEnabled()

ilObjSession::isRegistrationUserLimitEnabled ( )

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

References $reg_limited.

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

337  {
338  return $this->reg_limited;
339  }
+ Here is the caller graph for this function:

◆ isRegistrationWaitingListEnabled()

ilObjSession::isRegistrationWaitingListEnabled ( )

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

References $reg_waiting_list.

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

367  {
369  }
+ 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.

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

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

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
foreach($_POST as $key=> $value) $res
global $DIC
Definition: goto.php:24
$query
global $ilDB
+ Here is the caller graph for this function:

◆ prepareCalendarAppointments()

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

Prepare calendar appointments.

public

Parameters
stringmode UPDATE|CREATE|DELETE
Returns

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

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

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

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  }
$app
Definition: cli.php:38
const IL_CAL_TRANSLATION_NONE
getLocation()
get location
Apointment templates are used for automatic generated apointments.
getTitle()
get object title public
getLongDescription()
get object long description (stored in object_description)
getFirstAppointment()
get first appointment
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ read()

ilObjSession::read ( )

read session data

public

Parameters

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

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

Referenced by validate().

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  }
enableRegistrationUserLimit($a_limit)
initFiles()
init files
setLocation($a_location)
set location
setPhone($a_phone)
set phone
initAppointments()
init appointments
setWaitingListAutoFill($a_value)
setName($a_name)
set name
setEmail($a_email)
set email
setMailToMembersType($a_type)
Set mail to members type.
enableCannotParticipateOption(bool $status)
setRegistrationMinUsers($a_users)
foreach($_POST as $key=> $value) $res
getId()
get object id public
setRegistrationType($a_type)
$query
setDetails($a_details)
set details
setRegistrationNotificationOption($value)
setShowMembers($a_status)
Show members gallery.
setRegistrationMaxUsers($a_users)
setRegistrationNotificationEnabled($value)
enableRegistrationWaitingList($a_stat)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setAppointments()

ilObjSession::setAppointments (   $appointments)

set appointments

public

Parameters
arrayilSessionAppointments
Returns

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

References $appointments.

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

◆ setDetails()

ilObjSession::setDetails (   $a_details)

set details

public

Parameters
stringdetails

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

Referenced by cloneSettings(), and read().

311  {
312  $this->details = $a_details;
313  }
+ Here is the caller graph for this function:

◆ setEmail()

ilObjSession::setEmail (   $a_email)

set email

public

Parameters
stringemail
Returns

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

Referenced by cloneSettings(), and read().

276  {
277  $this->email = $a_email;
278  }
+ Here is the caller graph for this function:

◆ setLocation()

ilObjSession::setLocation (   $a_location)

set location

public

Parameters
stringlocation

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

Referenced by cloneSettings(), and read().

209  {
210  $this->location = $a_location;
211  }
+ 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.

Referenced by cloneSettings(), and read().

535  {
536  $this->mail_members = $a_type;
537  }
+ Here is the caller graph for this function:

◆ setName()

ilObjSession::setName (   $a_name)

set name

public

Parameters
stringname

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

Referenced by cloneSettings(), and read().

231  {
232  $this->name = $a_name;
233  }
+ Here is the caller graph for this function:

◆ setPhone()

ilObjSession::setPhone (   $a_phone)

set phone

public

Parameters
stringphone

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

Referenced by cloneSettings(), and read().

253  {
254  $this->phone = $a_phone;
255  }
+ Here is the caller graph for this function:

◆ setRegistrationMaxUsers()

ilObjSession::setRegistrationMaxUsers (   $a_users)

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

Referenced by cloneSettings(), and read().

362  {
363  $this->reg_limited_users = $a_users;
364  }
+ Here is the caller graph for this function:

◆ setRegistrationMinUsers()

ilObjSession::setRegistrationMinUsers (   $a_users)

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

Referenced by cloneSettings(), and read().

352  {
353  $this->reg_min_users = $a_users;
354  }
+ 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.

Referenced by cloneSettings(), and read().

417  {
418  return $this->registrationNotificationEnabled = $value;
419  }
+ Here is the caller graph for this function:

◆ setRegistrationNotificationOption()

ilObjSession::setRegistrationNotificationOption (   $value)
Parameters
$value

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

Referenced by cloneSettings(), and read().

433  {
434  $this->notificationOption = $value;
435  }
+ Here is the caller graph for this function:

◆ setRegistrationType()

ilObjSession::setRegistrationType (   $a_type)

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

Referenced by cloneSettings(), and read().

327  {
328  $this->reg_type = $a_type;
329  }
+ 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.

Referenced by cloneSettings(), and read().

391  {
392  $this->show_members = (bool) $a_status;
393  }
+ Here is the caller graph for this function:

◆ setWaitingListAutoFill()

ilObjSession::setWaitingListAutoFill (   $a_value)

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

Referenced by cloneSettings(), and read().

377  {
378  $this->reg_waiting_list_autofill = (bool) $a_value;
379  }
+ Here is the caller graph for this function:

◆ update()

ilObjSession::update (   $a_skip_meta_update = false)

update object

public

Parameters

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

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

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  }
getEmail()
get email
getLocation()
get location
updateMetaData()
update meta data entry
foreach($_POST as $key=> $value) $res
getId()
get object id public
prepareCalendarAppointments($a_mode='create')
Prepare calendar appointments.
global $DIC
Definition: goto.php:24
getPhone()
get phone
$query
getMailToMembersType()
Get mail to members type.
getShowMembers()
Member gallery enabled.
getDetails()
get details
global $ilDB
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ validate()

ilObjSession::validate ( )

validate

public

Parameters

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

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

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
global $DIC
Definition: goto.php:24
+ 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

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