Moodle PHP Documentation 4.2
Moodle 4.2.8 (Build: 20240610) (2d41ac46f45)
mod_bigbluebuttonbn\local\proxy\bigbluebutton_proxy Class Reference
Inheritance diagram for mod_bigbluebuttonbn\local\proxy\bigbluebutton_proxy:
mod_bigbluebuttonbn\local\proxy\proxy_base

Static Public Member Functions

static create_meeting (array $data, array $metadata, ?string $presentationname=null, ?string $presentationurl=null)
 Create a Meeting.
 
static end_meeting (string $meetingid, string $modpw)
 Perform end meeting on BBB.
 
static enqueue_completion_event (stdClass $bigbluebuttonbn, int $userid)
 Helper function enqueues one user for being validated as for completion.
 
static get_checksum (string $action, string $params)
 Get checksum.
 
static get_guest_join_url (instance $instance, ?string $createtime, string $username)
 Builds and returns a url for joining a BigBlueButton meeting.
 
static get_instance_ownerid (stdClass $bigbluebuttonbn)
 Helper for getting the owner userid of a bigbluebuttonbn instance.
 
static get_instance_profiles_array (array $profiles=[])
 Helper function returns an array with the profiles (with features per profile) for the different types of bigbluebuttonbn instances.
 
static get_instance_type_profiles ()
 Helper function returns an array with the profiles (with features per profile) for the different types of bigbluebuttonbn instances.
 
static get_instance_type_profiles_create_allowed (bool $room, bool $recording)
 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.
 
static get_join_url (instance $instance, ?string $createtime)
 Builds and returns a url for joining a BigBlueButton meeting.
 
static get_meeting_info (string $meetingid)
 Get meeting info for a given meeting id.
 
static get_poll_interval ()
 Get the poll interval as it is set in the configuration.
 
static get_server_not_available_message (instance $instance)
 Get message when server not available.
 
static get_server_not_available_url (instance $instance)
 Get URL to the page displaying that the server is not available.
 
static get_server_version ()
 Perform api request on BBB.
 
static handle_server_not_available (instance $instance)
 Handle the server not being available.
 
static is_bn_server ()
 Helper evaluates if the bigbluebutton server used belongs to blindsidenetworks domain.
 
static is_remote_resource_valid (string $url)
 Helper function validates a remote resource.
 
static is_voicebridge_number_unique (int $instance, int $voicebridge)
 Helper evaluates if a voicebridge number is unique.
 
static require_working_server (instance $instance)
 Ensure that the remote server was contactable.
 
static update_completion_state (stdClass $bigbluebuttonbn, int $userid)
 Helper function enqueues completion trigger.
 
static view_get_activity_status (instance $instance)
 Return the status of an activity [open|not_started|ended].
 

Public Attributes

const BBB_TO_MOODLE_ERROR_CODE
 Sometimes the server sends back some error and errorKeys that can be converted to Moodle error messages.
 
const DEFAULT_POLL_INTERVAL = 5
 Default poll interval for remote bigbluebutton server in seconds.
 
const MIN_POLL_INTERVAL = 2
 Minimum poll interval for remote bigbluebutton server in seconds.
 

Static Protected Member Functions

static action_url (string $action='', array $data=[], array $metadata=[])
 Returns the right URL for the action specified.
 
static assert_returned_xml ($xml, ?array $additionaldetails=null)
 Throw an exception if there is a problem in the returned XML value.
 
static fetch_endpoint_xml (string $action, array $data=[], array $metadata=[])
 Fetch the XML from an endpoint and test for success.
 
static sanitized_secret ()
 Makes sure the shared_secret used doesn't have trailing white characters.
 
static sanitized_url ()
 Makes sure the url used doesn't is in the format required.
 

Member Function Documentation

◆ action_url()

static mod_bigbluebuttonbn\local\proxy\proxy_base::action_url ( string $action = '',
array $data = [],
array $metadata = [] )
staticprotectedinherited

Returns the right URL for the action specified.

Parameters
string$action
array$data
array$metadata
Return values
string

◆ assert_returned_xml()

static mod_bigbluebuttonbn\local\proxy\proxy_base::assert_returned_xml ( $xml,
?array $additionaldetails = null )
staticprotectedinherited

Throw an exception if there is a problem in the returned XML value.

Parameters
SimpleXMLElement | bool$xml
array | null$additionaldetails
Exceptions
bigbluebutton_exception
server_not_available_exception

◆ create_meeting()

static mod_bigbluebuttonbn\local\proxy\bigbluebutton_proxy::create_meeting ( array $data,
array $metadata,
?string $presentationname = null,
?string $presentationurl = null )
static

Create a Meeting.

Parameters
array$data
array$metadata
string | null$presentationname
string | null$presentationurl
Return values
array
Exceptions
bigbluebutton_exception

◆ end_meeting()

static mod_bigbluebuttonbn\local\proxy\bigbluebutton_proxy::end_meeting ( string $meetingid,
string $modpw )
static

Perform end meeting on BBB.

Parameters
string$meetingid
string$modpw

◆ enqueue_completion_event()

static mod_bigbluebuttonbn\local\proxy\bigbluebutton_proxy::enqueue_completion_event ( stdClass $bigbluebuttonbn,
int $userid )
static

Helper function enqueues one user for being validated as for completion.

Parameters
stdClass$bigbluebuttonbn
int$userid
Return values
void

◆ fetch_endpoint_xml()

static mod_bigbluebuttonbn\local\proxy\proxy_base::fetch_endpoint_xml ( string $action,
array $data = [],
array $metadata = [] )
staticprotectedinherited

Fetch the XML from an endpoint and test for success.

If the result could not be loaded, or the returncode was not 'SUCCESS', a null value is returned.

Parameters
string$action
array$data
array$metadata
Return values
null|bool|SimpleXMLElement

◆ get_checksum()

static mod_bigbluebuttonbn\local\proxy\proxy_base::get_checksum ( string $action,
string $params )
staticinherited

Get checksum.

Parameters
string$action
string$params
Return values
string

◆ get_guest_join_url()

static mod_bigbluebuttonbn\local\proxy\bigbluebutton_proxy::get_guest_join_url ( instance $instance,
?string $createtime,
string $username )
static

Builds and returns a url for joining a BigBlueButton meeting.

Parameters
instance$instance
string | null$createtime
string$username
Return values
string

◆ get_instance_ownerid()

static mod_bigbluebuttonbn\local\proxy\bigbluebutton_proxy::get_instance_ownerid ( stdClass $bigbluebuttonbn)
static

Helper for getting the owner userid of a bigbluebuttonbn instance.

Parameters
stdClass$bigbluebuttonbnBigBlueButtonBN instance
Return values
intownerid (a valid user id or null if not registered/found)

◆ get_instance_profiles_array()

static mod_bigbluebuttonbn\local\proxy\bigbluebutton_proxy::get_instance_profiles_array ( array $profiles = [])
static

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

Parameters
array$profiles
Return values
array

◆ get_instance_type_profiles()

static mod_bigbluebuttonbn\local\proxy\bigbluebutton_proxy::get_instance_type_profiles ( )
static

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

Return values
array

◆ get_instance_type_profiles_create_allowed()

static mod_bigbluebuttonbn\local\proxy\bigbluebutton_proxy::get_instance_type_profiles_create_allowed ( bool $room,
bool $recording )
static

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.

Parameters
bool$room
bool$recording
Return values
array

◆ get_join_url()

static mod_bigbluebuttonbn\local\proxy\bigbluebutton_proxy::get_join_url ( instance $instance,
?string $createtime )
static

Builds and returns a url for joining a BigBlueButton meeting.

Parameters
instance$instance
string | null$createtime
Return values
string

◆ get_meeting_info()

static mod_bigbluebuttonbn\local\proxy\bigbluebutton_proxy::get_meeting_info ( string $meetingid)
static

Get meeting info for a given meeting id.

Parameters
string$meetingid
Return values
array

◆ get_poll_interval()

static mod_bigbluebuttonbn\local\proxy\bigbluebutton_proxy::get_poll_interval ( )
static

Get the poll interval as it is set in the configuration.

If configuration value is under the threshold of {

See also
self\MIN_POLL_INTERVAL}, then return the {
self\MIN_POLL_INTERVAL} value.
Return values
intthe poll interval in seconds

◆ get_server_not_available_message()

static mod_bigbluebuttonbn\local\proxy\bigbluebutton_proxy::get_server_not_available_message ( instance $instance)
static

Get message when server not available.

Parameters
instance$instance
Return values
string

◆ get_server_not_available_url()

static mod_bigbluebuttonbn\local\proxy\bigbluebutton_proxy::get_server_not_available_url ( instance $instance)
static

Get URL to the page displaying that the server is not available.

Parameters
instance$instance
Return values
string

◆ get_server_version()

static mod_bigbluebuttonbn\local\proxy\bigbluebutton_proxy::get_server_version ( )
static

Perform api request on BBB.

Return values
null|string

◆ handle_server_not_available()

static mod_bigbluebuttonbn\local\proxy\bigbluebutton_proxy::handle_server_not_available ( instance $instance)
static

Handle the server not being available.

Parameters
instance$instance

◆ is_bn_server()

static mod_bigbluebuttonbn\local\proxy\bigbluebutton_proxy::is_bn_server ( )
static

Helper evaluates if the bigbluebutton server used belongs to blindsidenetworks domain.

Return values
bool

◆ is_remote_resource_valid()

static mod_bigbluebuttonbn\local\proxy\bigbluebutton_proxy::is_remote_resource_valid ( string $url)
static

Helper function validates a remote resource.

Parameters
string$url
Return values
bool

◆ is_voicebridge_number_unique()

static mod_bigbluebuttonbn\local\proxy\bigbluebutton_proxy::is_voicebridge_number_unique ( int $instance,
int $voicebridge )
static

Helper evaluates if a voicebridge number is unique.

Parameters
int$instance
int$voicebridge
Return values
bool

◆ require_working_server()

static mod_bigbluebuttonbn\local\proxy\bigbluebutton_proxy::require_working_server ( instance $instance)
static

Ensure that the remote server was contactable.

Parameters
instance$instance

◆ sanitized_secret()

static mod_bigbluebuttonbn\local\proxy\proxy_base::sanitized_secret ( )
staticprotectedinherited

Makes sure the shared_secret used doesn't have trailing white characters.

Return values
string

◆ sanitized_url()

static mod_bigbluebuttonbn\local\proxy\proxy_base::sanitized_url ( )
staticprotectedinherited

Makes sure the url used doesn't is in the format required.

Return values
string

◆ update_completion_state()

static mod_bigbluebuttonbn\local\proxy\bigbluebutton_proxy::update_completion_state ( stdClass $bigbluebuttonbn,
int $userid )
static

Helper function enqueues completion trigger.

Parameters
stdClass$bigbluebuttonbn
int$userid
Return values
void

◆ view_get_activity_status()

static mod_bigbluebuttonbn\local\proxy\bigbluebutton_proxy::view_get_activity_status ( instance $instance)
static

Return the status of an activity [open|not_started|ended].

Parameters
instance$instance
Return values
string

Member Data Documentation

◆ BBB_TO_MOODLE_ERROR_CODE

const mod_bigbluebuttonbn\local\proxy\proxy_base::BBB_TO_MOODLE_ERROR_CODE
inherited
Initial value:
= [
'checksumError' => 'index_error_checksum',
'notFound' => 'general_error_not_found',
'maxConcurrent' => 'view_error_max_concurrent',
]

Sometimes the server sends back some error and errorKeys that can be converted to Moodle error messages.


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