Differences Between: [Versions 310 and 311] [Versions 310 and 400] [Versions 310 and 401] [Versions 310 and 402] [Versions 310 and 403] [Versions 39 and 310]
Class \core_h5p\editor_ajax
Copyright: | 2020 Victor Deniz <victor@moodle.com>, base on code by Joubel AS |
License: | http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later |
File Size: | 220 lines (9 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
editor_ajax:: (6 methods):
getLatestLibraryVersions()
getContentTypeCache()
getAuthorsRecentlyUsedLibraries()
validateEditorToken()
getTranslations()
get_missing_translations()
Class: editor_ajax - X-Ref
Moodle's implementation of the H5P Editor Ajax interface.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: null|string $machinename return: mixed|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, $languagecode) X-Ref |
Get translations in one language for a list of libraries. param: array $libraries An array of libraries, in the form "<machineName> <majorVersion>.<minorVersion> param: string $languagecode Language code return: array Translations in $languagecode available for libraries $libraries |
get_missing_translations(array $missing, string $language) X-Ref |
Get translation for $language for libraries in $missing. param: array $missing An array of libraries, in the form "<machineName> <majorVersion>.<minorVersion> param: string $language Language code return: array Translations in $language available for libraries $missing |