Moodle's implementation of the H5P Editor Ajax interface.
More...
|
const | EDITOR_AJAX_TOKEN = 'editorajax' |
| The component for H5P.
|
|
Moodle's implementation of the H5P Editor Ajax interface.
Makes it possible for the editor's core ajax functionality to communicate with the database used by Moodle.
- Copyright
- 2020 Victor Deniz victo.nosp@m.r@mo.nosp@m.odle..nosp@m.com, base on code by Joubel AS
- License
- http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
◆ get_missing_translations()
core_h5p\editor_ajax::get_missing_translations |
( |
array |
$missing, |
|
|
string |
$language |
|
) |
| |
|
protected |
Get translation for $language for libraries in $missing.
- Parameters
-
array | $missing | An array of libraries, in the form "<machineName> <majorVersion>.<minorVersion> |
string | $language | Language code |
- Return values
-
array | Translations in $language available for libraries $missing |
◆ getAuthorsRecentlyUsedLibraries()
core_h5p\editor_ajax::getAuthorsRecentlyUsedLibraries |
( |
| ) |
|
Gets recently used libraries for the current author.
- Return values
-
array | machine names. The first element in the array is the most recently used. |
◆ getContentTypeCache()
core_h5p\editor_ajax::getContentTypeCache |
( |
|
$machinename = null | ) |
|
Get locally stored Content Type Cache.
If machine name is provided it will only get the given content type from the cache.
- Parameters
-
null | string | $machinename | |
- Return values
-
mixed|null | Returns results from querying the database |
◆ getLatestLibraryVersions()
core_h5p\editor_ajax::getLatestLibraryVersions |
( |
| ) |
|
Gets latest library versions that exists locally.
- Return values
-
array | Latest version of all local libraries |
◆ getTranslations()
core_h5p\editor_ajax::getTranslations |
( |
|
$libraries, |
|
|
|
$languagecode |
|
) |
| |
Get translations in one language for a list of libraries.
- Parameters
-
array | $libraries | An array of libraries, in the form "<machineName> <majorVersion>.<minorVersion> |
string | $languagecode | Language code |
- Return values
-
array | Translations in $languagecode available for libraries $libraries |
◆ validateEditorToken()
core_h5p\editor_ajax::validateEditorToken |
( |
|
$token | ) |
|
Checks if the provided token is valid for this endpoint.
- Parameters
-
string | $token | The token that will be validated for. |
- Return values
-
bool | True if successful validation |
The documentation for this class was generated from the following file: