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 401 and 402] [Versions 401 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.

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
return: array($context, $cm, $instance) Testable wrapper around the assign class.

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

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

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

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

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

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

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

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

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

param: array $dataset
return: mixed

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.

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