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 402] [Versions 400 and 403]

BBB Library tests class trait.

Author: Laurent David (laurent@call-learning.fr)
Copyright: 2018 - present, Blindside Networks Inc
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 342 lines (14 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 9 functions


Functions that are not part of a class:

create_instance(?stdClass $course = null, array $params = [], array $options = [])   X-Ref
Convenience function to create an instance of a bigbluebuttonactivty.

return: array($context, $cm, $instance) Testable wrapper around the assign class.
param: stdClass|null $course course to add the module to
param: array $params Array of parameters to pass to the generator
param: array $options Array of options to pass to the generator

get_form_data_from_instance(stdClass $bbactivity, ?stdClass $course = null)   X-Ref
Get the matching form data

return: mixed
param: stdClass $bbactivity the current bigbluebutton activity
param: stdClass|null $course the course or null (taken from $this->get_course() if null)

get_course()   X-Ref
Get or create course if it does not exist

return: stdClass|null

setup_course_students_teachers(stdClass $courserecord, int $numstudents, int $numteachers,int $groupsnum)   X-Ref
Generate a course, several students and several groups

return: array
param: stdClass $courserecord
param: int $numstudents
param: int $numteachers
param: int $groupsnum

initialise_mock_server()   X-Ref
This test requires mock server to be present.


create_recordings_for_instance(instance $instance, array $recordingdata = [],$additionalmeetingdata = [])   X-Ref
Create an return an array of recordings

return: array
param: instance $instance
param: array $recordingdata array of recording information
param: array $additionalmeetingdata

create_activity_with_recordings(stdClass $course, int $type, array $recordingdata, int $groupid = 0)   X-Ref
Create an activity which includes a set of recordings.

return: array
param: stdClass $course
param: int $type
param: array $recordingdata array of recording information
param: int $groupid

create_from_dataset(array $dataset)   X-Ref
Create a course, users and recording from dataset given in an array form

return: mixed
param: array $dataset

create_legacy_log_entries(instance $instance,int $userid,int $count = 30,bool $importedrecordings = false,bool $withremoterecordings = true)   X-Ref
Create the legacy log entries for this task.

return: array
param: instance $instance
param: int $userid
param: int $count
param: bool $importedrecordings
param: bool $withremoterecordings create recording on the mock server ?