Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 4.0.x will end 8 May 2023 (12 months).
  • Bug fixes for security issues in 4.0.x will end 13 November 2023 (18 months).
  • PHP version: minimum PHP 7.3.0 Note: the minimum PHP version has increased since Moodle 3.10. PHP 7.4.x is also supported.

Differences Between: [Versions 400 and 401] [Versions 400 and 402] [Versions 400 and 403]

(no description)

File Size: 1171 lines (32 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

instance:: (76 methods):
  __construct()
  get_group_instance_from_instance()
  get_from_instanceid()
  get_from_cmid()
  get_from_meetingid()
  parse_meetingid()
  get_all_instances_in_course()
  set_group_id()
  get_group_id()
  uses_groups()
  get_group_name()
  get_course()
  get_course_id()
  get_cm()
  get_cm_id()
  get_context()
  get_context_id()
  get_course_context()
  get_instance_data()
  get_instance_id()
  get_instance_var()
  get_meeting_id()
  get_meeting_name()
  get_meeting_description()
  get_type()
  is_type_room_and_recordings()
  is_type_room_only()
  is_type_recordings_only()
  get_participant_list()
  get_user()
  get_user_id()
  get_user_fullname()
  is_admin()
  is_moderator()
  can_join()
  can_manage_recordings()
  can_perform_on_recordings()
  get_user_limit()
  has_user_limit_been_reached()
  does_current_user_count_towards_user_limit()
  get_voice_bridge()
  get_mute_on_start()
  get_moderator_password()
  get_viewer_password()
  get_current_user_password()
  get_current_user_role()
  should_show_recording_button()
  is_recorded()
  can_import_recordings()
  get_recordings_imported()
  should_record_from_start()
  allow_recording_start_stop()
  get_welcome_message()
  get_presentation()
  get_presentation_for_bigbluebutton_upload()
  do_get_presentation_with_nonce()
  before_start_time()
  has_ended()
  is_currently_open()
  user_must_wait_to_join()
  user_can_force_join()
  user_can_end_meeting()
  get_origin_data()
  is_blindside_network_server()
  get_course_url()
  get_view_url()
  get_logout_url()
  get_record_ready_url()
  get_meeting_event_notification_url()
  get_join_url()
  get_import_url()
  get_enabled_features()
  is_feature_enabled()
  should_record()
  get_recordings()
  user_has_group_access()


Class: instance  - X-Ref

Instance record for mod_bigbluebuttonbn.

__construct(cm_info $cm, stdClass $course, stdClass $instancedata, ?int $groupid = null)   X-Ref
instance constructor.

param: cm_info $cm
param: stdClass $course
param: stdClass $instancedata
param: int|null $groupid

get_group_instance_from_instance(self $originalinstance, int $groupid)   X-Ref
Get a group instance of the specified instance.

return: null|self
param: self $originalinstance
param: int $groupid

get_from_instanceid(int $instanceid)   X-Ref
Get the instance information from an instance id.

return: null|self
param: int $instanceid The id from the bigbluebuttonbn table

get_from_cmid(int $cmid)   X-Ref
Get the instance information from a cmid.

return: null|self
param: int $cmid

get_from_meetingid(string $meetingid)   X-Ref
Get the instance information from a meetingid.

If a group is specified in the meetingid then this will also be set.

return: null|self
param: string $meetingid

parse_meetingid(string $meetingid)   X-Ref
Parse a meetingID for key data.

return: array
param: string $meetingid

get_all_instances_in_course(int $courseid)   X-Ref
Get all instances in the specified course.

return: self[]
param: int $courseid

set_group_id(int $groupid)   X-Ref
Set the current group id of the activity.

param: int $groupid

get_group_id()   X-Ref
Get the current groupid if set.

return: int

uses_groups()   X-Ref
Check whether this instance is configured to use a group.

return: bool

get_group_name()   X-Ref
Get the group name for the current group, if a group has been set.

return: null|string

get_course()   X-Ref
Get the course object for the instance.

return: stdClass

get_course_id()   X-Ref
Get the course id of the course that the instance is in.

return: int

get_cm()   X-Ref
Get the cm_info object for the instance.

return: cm_info

get_cm_id()   X-Ref
Get the id of the course module.

return: int

get_context()   X-Ref
Get the context.

return: context_module

get_context_id()   X-Ref
Get the context ID of the module context.

return: int

get_course_context()   X-Ref
Get the course context.

return: context_course

get_instance_data()   X-Ref
Get the big blue button instance data.

return: stdClass

get_instance_id()   X-Ref
Get the instance id.

return: int

get_instance_var(string $name)   X-Ref
Helper to get an instance var.

return: mixed|null
param: string $name

get_meeting_id(?int $groupid = null)   X-Ref
Get the meeting id for this meeting.

return: string
param: null|int $groupid

get_meeting_name()   X-Ref
Get the name of the meeting, considering any group if set.

return: string

get_meeting_description(bool $rewritepluginfileurls = false)   X-Ref
Get the meeting description with the pluginfile URLs optionally rewritten.

return: string
param: bool $rewritepluginfileurls

get_type()   X-Ref
Get the meeting type if set.

return: null|string

is_type_room_and_recordings()   X-Ref
Whether this instance is includes both a room, and recordings.

return: bool

is_type_room_only()   X-Ref
Whether this instance is one that only includes a room.

return: bool

is_type_recordings_only()   X-Ref
Whether this instance is one that only includes recordings.

return: bool

get_participant_list()   X-Ref
Get the participant list for the session.

return: array

get_user()   X-Ref
Get the user.

return: stdClass

get_user_id()   X-Ref
Get the id of the user.

return: int

get_user_fullname()   X-Ref
Get the fullname of the current user.

return: string

is_admin()   X-Ref
Whether the current user is an administrator.

return: bool

is_moderator()   X-Ref
Whether the user is a session moderator.

return: bool

can_join()   X-Ref
Whether this user can join the conference.

This checks the user right for access against capabilities and group membership

return: bool

can_manage_recordings()   X-Ref
Whether this user can manage recordings.

return: bool

can_perform_on_recordings($action)   X-Ref
Whether this user can publish/unpublish/protect/unprotect/delete recordings.

return: bool
param: string $action

get_user_limit()   X-Ref
Get the configured user limit.

return: int

has_user_limit_been_reached(int $currentusercount)   X-Ref
Check whether the user limit has been reached.

return: bool
param: int $currentusercount The user count to check

does_current_user_count_towards_user_limit()   X-Ref
Check whether the current user counts towards the user limit.

return: bool

get_voice_bridge()   X-Ref
Get the voice bridge details.

return: null|int

get_mute_on_start()   X-Ref
Whether participants are muted on entry.

return: bool

get_moderator_password()   X-Ref
Get the moderator password.

return: string

get_viewer_password()   X-Ref
Get the viewer password.

return: string

get_current_user_password()   X-Ref
Get the appropriate password for the current user.

return: string

get_current_user_role()   X-Ref
Get the appropriate designated role for the current user.

return: string

should_show_recording_button()   X-Ref
Whether to show the recording button

return: bool

is_recorded()   X-Ref
Whether this instance is recorded.

return: bool

can_import_recordings()   X-Ref
Whether this instance can import recordings from another instance.

return: bool

get_recordings_imported()   X-Ref
Get recordings_imported from instancedata.

return: bool

should_record_from_start()   X-Ref
Whether this instance is recorded from the start.

return: bool

allow_recording_start_stop()   X-Ref
Whether recording can be started and stopped.

return: bool

get_welcome_message()   X-Ref
Get the welcome message to display.

return: string

get_presentation()   X-Ref
Get the presentation data for internal use.

The URL returned for the presentation will be accessible through moodle with checks about user being logged in.

return: array|null

get_presentation_for_bigbluebutton_upload()   X-Ref
Get the presentation data for external API url.

The URL returned for the presentation will be accessible publicly but once and with a specific URL.

return: array|null

do_get_presentation_with_nonce(bool $withnonce)   X-Ref
Generate Presentation URL.

return: array|null
param: bool $withnonce The generated url will have a nonce included

before_start_time()   X-Ref
Whether the current time is before the scheduled start time.

return: bool

has_ended()   X-Ref
Whether the meeting time has passed.

return: bool

is_currently_open()   X-Ref
Whether this session is currently open.

return: bool

user_must_wait_to_join()   X-Ref
Whether the user must wait to join the session.

return: bool

user_can_force_join()   X-Ref
Whether the user can force join in all cases

return: bool

user_can_end_meeting()   X-Ref
Whether the user can end a meeting

return: bool

get_origin_data()   X-Ref
Get information about the origin.

return: stdClass

is_blindside_network_server()   X-Ref
Whether this is a server belonging to blindside networks.

return: bool

get_course_url()   X-Ref
Get the URL used to access the course that the instance is in.

return: moodle_url

get_view_url()   X-Ref
Get the URL used to view the instance as a user.

return: moodle_url

get_logout_url()   X-Ref
Get the logout URL used to log out of the meeting.

return: moodle_url

get_record_ready_url()   X-Ref
Get the URL that the remote server will use to notify that the recording is ready.

return: moodle_url

get_meeting_event_notification_url()   X-Ref
Get the URL that the remote server will use to notify of meeting events.

return: moodle_url

get_join_url()   X-Ref
Get the URL used to join a meeting.

return: moodle_url

get_import_url()   X-Ref
Get the URL used for the import page.

return: moodle_url

get_enabled_features()   X-Ref
Get the list of enabled features for this instance.

return: array

is_feature_enabled(string $feature)   X-Ref
Check whetherthe named features is enabled.

return: bool
param: string $feature

should_record()   X-Ref
Check if meeting is recorded.

return: bool

get_recordings(array $excludedid = [], bool $viewdeleted = false)   X-Ref
Get recordings for this instance

return: recording[]
param: string[] $excludedid
param: bool $viewdeleted view deleted recordings ?

user_has_group_access($user, $groupid)   X-Ref
Check if this is a valid group for this user/instance,

return: bool
param: stdClass $user
param: int $groupid