Search moodle.org's
Developer Documentation

See Release Notes

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

This plugin is used to access the content bank files.

Copyright: 2020 Mihail Geshoski <mihail@moodle.com>
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 171 lines (6 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

repository_contentbank:: (7 methods):
  get_listing()
  has_moodle_files()
  supported_returntypes()
  default_returntype()
  contains_private_data()
  file_is_accessible()
  search()


Class: repository_contentbank  - X-Ref

repository_contentbank class is used to browse the content bank files

get_listing($encodedpath = '', $page = '')   X-Ref
Get file listing.

param: string $encodedpath
param: string $page
return: array

has_moodle_files()   X-Ref
Is this repository used to browse moodle files?

return: boolean

supported_returntypes()   X-Ref
Tells how the file can be picked from this repository.

return: int

default_returntype()   X-Ref
Which return type should be selected by default.

return: int

contains_private_data()   X-Ref
Is this repository accessing private data?

return: bool

file_is_accessible($source)   X-Ref
Repository method to make sure that user can access particular file.

This is checked when user tries to pick the file from repository to deal with
potential parameter substitutions in request

param: string $source
return: bool whether the file is accessible by current user

search($search, $page = 0)   X-Ref
Return search results.

param: string $search
param: int $page
return: array