Search moodle.org's
Developer Documentation

See Release Notes
Long Term Support Release

  • Bug fixes for general core bugs in 4.1.x will end 13 November 2023 (12 months).
  • Bug fixes for security issues in 4.1.x will end 10 November 2025 (36 months).
  • PHP version: minimum PHP 7.4.0 Note: minimum PHP version has increased since Moodle 4.0. PHP 8.0.x is supported too.

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

(no description)

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

Defines 1 class


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(string $meetingid,string $username,string $pw,string $logouturl,string $role,string $configtoken = null,int $userid = 0,string $createtime = null)   X-Ref
Builds and returns a url for joining a bigbluebutton meeting.

param: string $meetingid
param: string $username
param: string $pw
param: string $logouturl
param: string $role
param: string|null $configtoken
param: int $userid
param: string|null $createtime
return: string

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)   X-Ref
Create a Meeting

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

get_meeting_info(string $meetingid)   X-Ref
Get meeting info for a given meeting id

param: string $meetingid
return: array

end_meeting(string $meetingid, string $modpw)   X-Ref
Perform end meeting on BBB.

param: string $meetingid
param: string $modpw

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