Commit Graph

21 Commits

Author SHA1 Message Date
Sara Arjona
5372f54440 MDL-78087 h5p: Fix TimeLine display bug
When the H5P third-party library was upgraded to moodle-1.23, the calls to
libraryToString(xxx, true) where replaced with libraryToFolderName().
We missed this, which was doing the H5P Timeline activities weren't
displayed properly.

Thanks Joseph for raising this and preparing a patch! Well done!

Co-authored: Joseph Rézeau
2023-05-11 10:19:45 +02:00
Sara Arjona
ca37dd3baf MDL-76691 core_h5p: Add core lib changes after upgrading it
Apart from applying the points described in readme_moodle.txt, the following
changes have been done too:

- The parameter $folderName from the method libraryToString() have been removed
and a new method, libraryToFolderName() has been added to the H5PCore API.
References to libraryToString() with the $folderName set to true have been
replaced to the new method.
- missing-main-library has been added and replaces in some cases to
missing-required-library.
- The framework saveLibraryData method must be called before saveLibrary
(h5p.classes.php file has been patched to leave the original order because
libraryid is required to save the itemid).
- The getLibraryId() method from H5PCore has been rewritten to use MUC, in
order to avoid PHPUnit failures.
2023-02-06 16:48:07 +01:00
Paul Holden
426f533c07 MDL-74895 h5p: more resilient error handling during content fetching.
On new installs, the task for downloading new H5P content types would
throw exceptions and exit when encountering unexpected and/or missing
data.
2022-07-25 20:03:12 +01:00
Davo Smith
4202104a2e MDL-74123 h5p: delete any existing files when downloading new files 2022-03-08 13:52:26 +00: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
Sara Arjona
dbfd4aebb5 MDL-69331 core_h5p: Only upgrade enabled libraries
The core\task\h5p_get_content_types_task task will only download
content-type for enabled libraries.
2021-04-15 09:03:56 +02:00
Sara Arjona
6171c4bbe8 MDL-69520 core_h5p: add example and tutorial links 2020-10-14 17:47:46 +02:00
Amaia Anabitarte
6157f5930f MDL-68641 core_h5p: Fixing capability checks in ajax.php 2020-06-04 13:44:23 +02:00
Sara Arjona
f635915137 MDL-68271 core_h5p: implement localization methods for editor
The following methods have been implemented for supporting
content-type translations:
- H5PEditorAjaxInterface.getTranslations. This method is used for
loading the "Text overrides and translations" section.
- H5peditorStorage.getLanguage. This method is used for displaying
the specific fields and messages for each content-type library.
- H5peditorStorage.getAvailableLanguages. This method is used to
get the language list displayed into the "Text overrides and
translations" section.
2020-05-08 18:18:24 +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
cescobedo
c667e6064a MDL-68285 core_h5p: Fix unused variables and undeclared globals 2020-03-30 09:55:32 +02:00
Sara Arjona
08fda3e0f8 MDL-67063 h5p: new h5plib plugintype for supporting multi coreAPI
A new plugintype has been created for having more than one installed
third-party H5P libraries. Existing libraries have been moved from
lib/h5p to the new h5plib_v124 plugin.
2020-03-11 08:46:16 +01:00
Víctor Déniz Falcón
fe9bb50cb5 MDL-67192 core_h5p: remove redundant assignment 2020-02-10 08:40:13 +00:00
Víctor Déniz Falcón
a23969a5fa MDL-67192 core_h5p: get site UUID from H5P using the API 2020-02-10 08:40:12 +00:00
Víctor Déniz Falcón
d8fe1eddf9 MDL-67296 core_h5p: minor changes
core.php-Avoid to use the factory for each content type
h5p_get_content_types_task-new method to simplify test execution
framework.php-returns error if you get a 404 response after requesting a file
2020-01-22 14:48:16 +00:00
Víctor Déniz Falcón
b7c307f33d MDL-67194 core_h5p: save core API version that content types require 2019-11-11 21:09:50 +00:00
Andrew Nicols
fd9333ca93 MDL-67058 h5p: Content fetch should use save_h5p API 2019-11-08 15:48:58 +08:00
Victor Deniz Falcon
5315acb47c MDL-67058 core_h5p: task to get latest content types version from H5P 2019-11-06 18:17:34 +00:00
Mihail Geshoski
ab02687e30 MDL-67067 core_h5p: Fix coding style issues and undocumented functions 2019-10-30 15:22:40 +08:00
Mihail Geshoski
abf6d1c395 MDL-67067 core_h5p: Load cached assets by default 2019-10-30 15:21:57 +08:00
Andrew Nicols
9e67f5e366 MDL-66609 core_h5p: Make use of upstream change for getting itemid 2019-10-29 10:22:43 +08:00