Search moodle.org's
Developer Documentation

See Release Notes
Long Term Support Release

  • Bug fixes for general core bugs in 3.9.x will end* 10 May 2021 (12 months).
  • Bug fixes for security issues in 3.9.x will end* 8 May 2023 (36 months).
  • PHP version: minimum PHP 7.2.0 Note: minimum PHP version has increased since Moodle 3.8. PHP 7.3.x and 7.4.x are supported too.

Differences Between: [Versions 39 and 310] [Versions 39 and 311] [Versions 39 and 400] [Versions 39 and 401] [Versions 39 and 402] [Versions 39 and 403]

(no description)

File Size: 52 lines (1 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

H5PEditorAjaxInterface:: (5 methods):
  getLatestLibraryVersions()
  getContentTypeCache()
  getAuthorsRecentlyUsedLibraries()
  validateEditorToken()
  getTranslations()


Interface: H5PEditorAjaxInterface  - X-Ref

Handles Ajax functionality that must be implemented separately for each of the
H5P plugins

getLatestLibraryVersions()   X-Ref
Gets latest library versions that exists locally

return: array Latest version of all local libraries

getContentTypeCache($machineName = NULL)   X-Ref
Get locally stored Content Type Cache. If machine name is provided
it will only get the given content type from the cache

param: $machineName
return: array|object|null Returns results from querying the database

getAuthorsRecentlyUsedLibraries()   X-Ref
Gets recently used libraries for the current author

return: array machine names. The first element in the array is the

validateEditorToken($token)   X-Ref
Checks if the provided token is valid for this endpoint

param: string $token The token that will be validated for.
return: bool True if successful validation

getTranslations($libraries, $language_code)   X-Ref
Get translations for a language for a list of libraries

param: array $libraries An array of libraries, in the form "<machineName> <majorVersion>.<minorVersion>
param: string $language_code
return: array