mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 08:26:37 +02:00
MDL-76362 h5p: Use string as default lang param
This commit is contained in:
parent
e76b1bcd5e
commit
6ae3f79c1e
1 changed files with 2 additions and 2 deletions
|
@ -58,8 +58,8 @@ switch ($action) {
|
||||||
$minor = optional_param('minorVersion', 0, PARAM_INT);
|
$minor = optional_param('minorVersion', 0, PARAM_INT);
|
||||||
|
|
||||||
// Normalise Moodle language using underscore, as opposed to H5P which uses dash.
|
// Normalise Moodle language using underscore, as opposed to H5P which uses dash.
|
||||||
$language = optional_param('default-language', null, PARAM_RAW);
|
$language = optional_param('default-language', '', PARAM_RAW);
|
||||||
$language = clean_param(str_replace('-', '_', $language ?? ''), PARAM_LANG);
|
$language = clean_param(str_replace('-', '_', $language), PARAM_LANG);
|
||||||
|
|
||||||
if (!empty($name)) {
|
if (!empty($name)) {
|
||||||
$editor->ajax->action(H5PEditorEndpoints::SINGLE_LIBRARY, $name,
|
$editor->ajax->action(H5PEditorEndpoints::SINGLE_LIBRARY, $name,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue