Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 4.3.x will end 7 October 2024 (12 months).
  • Bug fixes for security issues in 4.3.x will end 21 April 2025 (18 months).
  • PHP version: minimum PHP 8.0.0 Note: minimum PHP version has increased since Moodle 4.1. PHP 8.2.x is supported too.

Class: bigbluebutton_proxy  - X-Ref

The bigbluebutton proxy class.

This class acts as a proxy between Moodle and the BigBlueButton API server,
and handles all requests relating to the server and meetings.

get_join_url(instance $instance,?string $createtime)   X-Ref
Builds and returns a url for joining a BigBlueButton meeting.

param: instance $instance
param: string|null $createtime
return: string

get_guest_join_url(instance $instance,?string $createtime,string $username)   X-Ref
Builds and returns a url for joining a BigBlueButton meeting.

param: instance $instance
param: string|null $createtime
param: string $username
return: string

internal_get_join_url(instance $instance,?string $jointime,string $userfullname = null,bool $isguestjoin = false)   X-Ref
Internal helper method to builds and returns a url for joining a BigBlueButton meeting.

param: instance $instance
param: string|null $jointime = null
param: string|null $userfullname
param: bool $isguestjoin
return: string

get_avatar_url(stdClass $user)   X-Ref
Get user avatar URL

param: stdClass $user
return: moodle_url

get_server_version()   X-Ref
Perform api request on BBB.

return: null|string

get_instance_ownerid(stdClass $bigbluebuttonbn)   X-Ref
Helper for getting the owner userid of a bigbluebuttonbn instance.

param: stdClass $bigbluebuttonbn BigBlueButtonBN instance
return: int ownerid (a valid user id or null if not registered/found)

is_voicebridge_number_unique(int $instance, int $voicebridge)   X-Ref
Helper evaluates if a voicebridge number is unique.

param: int $instance
param: int $voicebridge
return: bool

is_remote_resource_valid(string $url)   X-Ref
Helper function validates a remote resource.

param: string $url
return: bool

enqueue_completion_event(stdClass $bigbluebuttonbn, int $userid)   X-Ref
Helper function enqueues one user for being validated as for completion.

param: stdClass $bigbluebuttonbn
param: int $userid
return: void

update_completion_state(stdClass $bigbluebuttonbn, int $userid)   X-Ref
Helper function enqueues completion trigger.

param: stdClass $bigbluebuttonbn
param: int $userid
return: void

get_instance_type_profiles()   X-Ref
Helper function returns an array with the profiles (with features per profile) for the different types
of bigbluebuttonbn instances.

return: array

get_instance_type_profiles_create_allowed(bool $room, bool $recording)   X-Ref
Helper function returns an array with the profiles (with features per profile) for the different types
of bigbluebuttonbn instances that the user is allowed to create.

param: bool $room
param: bool $recording
return: array

get_instance_profiles_array(array $profiles = [])   X-Ref
Helper function returns an array with the profiles (with features per profile) for the different types
of bigbluebuttonbn instances.

param: array $profiles
return: array

view_get_activity_status(instance $instance)   X-Ref
Return the status of an activity [open|not_started|ended].

param: instance $instance
return: string

require_working_server(instance $instance)   X-Ref
Ensure that the remote server was contactable.

param: instance $instance

handle_server_not_available(instance $instance)   X-Ref
Handle the server not being available.

param: instance $instance

get_server_not_available_message(instance $instance)   X-Ref
Get message when server not available

param: instance $instance
return: string

get_server_not_available_url(instance $instance)   X-Ref
Get URL to the page displaying that the server is not available

param: instance $instance
return: string

create_meeting(array $data,array $metadata,?string $presentationname = null,?string $presentationurl = null,?int $instanceid = null)   X-Ref
Create a Meeting

param: array $data
param: array $metadata
param: string|null $presentationname
param: string|null $presentationurl
param: int|null $instanceid
return: array

get_meeting_info(string $meetingid, ?int $instanceid = null)   X-Ref
Get meeting info for a given meeting id

param: string $meetingid
param: int|null $instanceid
return: array

end_meeting(string $meetingid, string $modpw, ?int $instanceid = null)   X-Ref
Perform end meeting on BBB.

param: string $meetingid
param: string $modpw
param: int|null $instanceid

is_bn_server()   X-Ref
Helper evaluates if the bigbluebutton server used belongs to blindsidenetworks domain.

return: bool

get_poll_interval()   X-Ref
Get the poll interval as it is set in the configuration

If configuration value is under the threshold of {@see self::MIN_POLL_INTERVAL},
then return the {@see self::MIN_POLL_INTERVAL} value.

return: int the poll interval in seconds