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

The mod_bigbluebuttonbn files helper

Author: Laurent David (laurent [at] call-learning [dt] fr)
Copyright: 2021 onwards, Blindside Networks Inc
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 324 lines (11 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class


Class: files  - X-Ref

Utility class for all files routines helper

pluginfile_valid(stdClass $context, string $filearea)   X-Ref
Helper for validating pluginfile.

param: stdClass $context context object
param: string $filearea file area
return: bool|null false if file not valid

pluginfile_file(?stdClass $course, ?stdClass $cm, context $context, string $filearea, array $args)   X-Ref
Helper for getting pluginfile.

param: stdClass|null $course course object
param: stdClass|null $cm course module object
param: context $context context object
param: string $filearea file area
param: array $args extra arguments
return: \stored_file|bool

save_media_file(stdClass &$bigbluebuttonformdata)   X-Ref
Get a full path to the file attached as a preuploaded presentation
or if there is none, set the presentation field will be set to blank.

param: stdClass $bigbluebuttonformdata BigBlueButtonBN form data
return: string

get_presentation(context $context, string $presentation, $id = null, $withnonce = false)   X-Ref
Helper return array containing the file descriptor for a preuploaded presentation.

param: context $context
param: string $presentation matching presentation file name
param: int $id bigbluebutton instance id
param: bool $withnonce add nonce to the url
return: array|null the representation of the presentation as an associative array

get_plugin_filename(?stdClass $course, ?stdClass $cm, context $context, array $args)   X-Ref
Helper for getting pluginfile name.

param: stdClass|null $course course object
param: stdClass|null $cm course module object
param: context $context context object
param: array $args extra arguments
return: string|null

get_nonce(int $id)   X-Ref
Helper generates a salt used for the preuploaded presentation callback url.

param: int $id
return: int

generate_nonce($id)   X-Ref
Generate a nonce and store it in the cache

param: int $id
return: int

get_nonce_cache()   X-Ref
Get cache for nonce

return: \cache_application|\cache_session|cache_store

get_file_areas()   X-Ref
Returns an array of file areas.

return: array a list of available file areas