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 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.

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

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

return: \stored_file|bool
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

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.

return: string
param: stdClass $bigbluebuttonformdata BigBlueButtonBN form data

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

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

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

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

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

return: int
param: int $id

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

return: int
param: int $id

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