Search moodle.org's
Developer Documentation

See Release Notes

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

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

(no description)

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

Defines 1 class


Class: meeting  - X-Ref

Class to describe a BBB Meeting.

__construct(instance $instance)   X-Ref
Constructor for the meeting object.

param: instance $instance

join_meeting(instance $instance, $origin = logger::ORIGIN_BASE)   X-Ref
Helper to join a meeting.

It will create the meeting if not already created.

param: instance $instance
param: int $origin
return: string

get_meeting_info()   X-Ref
Get currently stored meeting info

return: stdClass

get_meeting_info_for_instance(instance $instance, bool $updatecache = false)   X-Ref
Return meeting information for the specified instance.

param: instance $instance
param: bool $updatecache Whether to update the cache when fetching the information
return: stdClass

get_unique_meetingid_seed()   X-Ref
Helper function returns a sha1 encoded string that is unique and will be used as a seed for meetingid.

return: string

is_running()   X-Ref
Is meeting running ?

return: bool

update_cache()   X-Ref
Force update the meeting in cache.


get_attendees()   X-Ref
Get meeting attendees

return: array[]

can_join()   X-Ref
Can the meeting be joined ?

return: bool

get_participant_count()   X-Ref
Total number of moderators and viewers.

return: int

create_meeting()   X-Ref
Creates a bigbluebutton meeting, send the message to BBB and returns the response in an array.

return: array

end_meeting()   X-Ref
Send an end meeting message to BBB server


get_join_url()   X-Ref
Get meeting join URL

return: string

get_guest_join_url(string $userfullname)   X-Ref
Get meeting join URL for guest

param: string $userfullname
return: string

do_get_meeting_info(bool $updatecache = false)   X-Ref
Return meeting information for this meeting.

param: bool $updatecache Whether to update the cache when fetching the information
return: stdClass

get_status_message(object $meetinginfo, instance $instance)   X-Ref
Deduce status message from the current meeting info and the instance

Returns the human-readable message depending on if the user must wait to join, the meeting has not
yet started ...
param: object $meetinginfo
param: instance $instance
return: string

retrieve_cached_meeting_info($meetingid, $updatecache = false)   X-Ref
Gets a meeting info object cached or fetched from the live session.

param: string $meetingid
param: bool $updatecache
return: array

create_meeting_data()   X-Ref
Helper to prepare data used for create meeting.

return: array

create_meeting_metadata()   X-Ref
Helper for preparing metadata used while creating the meeting.

return: array

meeting_events(instance $instance, object $data)   X-Ref
Helper for responding when storing live meeting events is requested.

The callback with a POST request includes:
- Authentication: Bearer <A JWT token containing {"exp":<TIMESTAMP>} encoded with HS512>
- Content Type: application/json
- Body: <A JSON Object>

param: instance $instance
param: object $data
return: string

process_meeting_events(instance $instance, stdClass $jsonobj)   X-Ref
Helper function enqueues list of meeting events to be stored and processed as for completion.

param: instance $instance
param: stdClass $jsonobj

prepare_meeting_join_action(int $origin)   X-Ref
Prepare join meeting action

param: int $origin
return: void

join(int $origin)   X-Ref
Join a meeting.

param: int $origin The spec
return: string The URL to redirect to

guest_join(int $origin, string $userfullname)   X-Ref
Join a meeting as a guest.

param: int $origin The spec
param: string $userfullname Fullname for the guest user
return: string The URL to redirect to