12 Commits

Author SHA1 Message Date
Andrew Nicols
ddf0f08cc9 MDL-76362 h5p: Use string as default lang param 2023-01-23 09:16:07 +08:00
Marina Glancy
2dd7290ccb MDL-76362 various: Avoid passing nulls to functions that don't allow nulls
PHP 8.1 is more strict on the parameter type. Functions such as trim(), strlen(), str_replace(), etc
show notice when null is passed as an argument
2023-01-23 09:16:06 +08:00
Eloy Lafuente (stronk7)
87e7bcb12a Merge branch 'MDL-71970-master' of git://github.com/sarjona/moodle 2021-09-29 23:27:15 +02:00
sam marshall
e332d1849d MDL-72643 core: Improve display_size
Allows display_size to use a fixed unit for easy comparison of
multiple results, and fixed decimal places for the same reason.

Improves behaviour by using consistent decimal places and a
consistent space before the unit (the previous one only has a space
before 'bytes', not before 'KB').

Of existing uses, all the ones that displayed a 'maxbytes' type
configuration setting (which are likely to have an 'exact' size
and would be better shown as 512 KB rather than 512.0 KB) have been
changed to use 0 decimal places, to preserve previous behaviour.
All the uses which were showing an actual file or memory size have
been left as default (1 decimal place).
2021-09-27 16:52:33 +01:00
Sara Arjona
f47a327290 MDL-71970 h5plib_v124: Replace references to new Moodle\H5Pxxx namespace
The joubel/core and joubel/editor libraries have been moved to Moodle
namespace.
This commit adds the new namespace to the places where these classes
are used.
Besides, a couple of minor changes have been done to replace the _test.php
classname and remove some unnecessary defined('MOODLE_INTERNAL').
2021-09-27 11:41:48 +02:00
Paul Holden
5255026717 MDL-71050 h5p: account for parent languages retrieving translations.
Take account of parent languages when requesting given library
translation. For example if we are currently using "de_kids" as the
current language, we need to recurse each language pack looking for
a matching H5P translation ("de_kids" -> "de_du" -> "de").
2021-07-12 13:17:02 +01:00
Jun Pataleta
fac0b05ed5 Merge branch 'MDL-69257-master' of git://github.com/mihailges/moodle 2020-10-09 11:12:23 +08:00
Mihail Geshoski
2212df5dd8 MDL-69257 core_h5p: Move $maxsize outside the foreach loop
There is no reason to repeatedly obtain the maximum size for uploading
files as a part of foreach loop.
2020-10-09 10:23:28 +08:00
Martin Gauk
2355205ad8 MDL-69257 H5P: Check size of uploaded files and virus scan 2020-09-29 10:09:47 +00:00
Sara Arjona
c68897b7e6 MDL-69087 core_h5p: add renderer to let personalize styles
Existing mod_hvp pluging has a renderer to let Moodle instances
alter styles, Javascript, semantics (fields in the editor) and
content: https://github.com/h5p/moodle-mod_hvp/blob/stable/renderer.php

The approach for core_h5p is exactly the same, to let people
to reuse their existing code.
2020-09-24 19:56:12 +02:00
Amaia Anabitarte
6157f5930f MDL-68641 core_h5p: Fixing capability checks in ajax.php 2020-06-04 13:44:23 +02:00
Víctor Déniz Falcón
6da050d72a MDL-67814 core_h5p: implemented H5P Core/Editor library interfaces 2020-04-16 11:29:35 +08:00