66 Commits

Author SHA1 Message Date
Eloy Lafuente (stronk7)
40de097e65 MDL-67673 phpunit: Remove deprecated assertContains() uses on strings
Both assertContains() and assertNotContains() are deprecated in PHPUnit 8
for operations on strings. Also the optional case parameter is. All uses
must be changed to one of:

- assertStringContainsString()
- assertStringContainsStringIgnoringCase()
- assertStringNotContainsString()
- assertStringNotContainsStringIgnoringCase()

More info: https://github.com/sebastianbergmann/phpunit/issues/3422

Regexp to find all uses:

ag 'assert(Not)?Contains\('
2020-10-21 12:46:00 +02:00
Eloy Lafuente (stronk7)
f6711bb394 MDL-67673 phpunit: Fix the return type of template methods
All the setup/teardown/pre/post/conditions template methods
now are required to return void. This was warned with phpunit 7
and now is enforced.

At the same time, fix a few wrong function names,
provider data and param types, return statements...
2020-10-21 12:45:59 +02:00
Jun Pataleta
8252b24f95 Merge branch 'MDL-69520-master' of git://github.com/sarjona/moodle 2020-10-15 13:53:26 +08:00
Sara Arjona
0c69575cc4 MDL-69520 core_h5p: unit tests for covering example and tutorial 2020-10-14 17:47:48 +02:00
Paul Holden
27f8784204 MDL-69813 h5p: fix undefined addon ordering in framework test. 2020-10-06 10:45:21 +01: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
Sara Arjona
67a11150de MDL-68909 h5p: move temporary editor files to draft area 2020-09-10 13:42:16 +02:00
Victor Deniz Falcon
9aa9efbfda MDL-68921 core_h5p: Add H5P libraries metadata settings 2020-08-25 00:48:02 +01:00
Ferran Recio
4b6e92b8e9 MDL-68902 core_h5p: add essay h5p package 2020-06-09 16:58:17 +02:00
Víctor Déniz Falcón
88036713a5 MDL-68641 core_h5p: test dropped because the tested method was deleted 2020-06-04 19:27:59 +01:00
cescobedo
14b463c92a MDL-68448 core_h5p: Add get export information to helper
Create a new method in the helper to use in the player,
in the external WS and in the API. Also, add a
new method in API to help to get export information
by other WS.
2020-05-25 09:12:06 +02:00
Sara Arjona
a42a9ad997 MDL-68227 core_h5p: localize H5P editor strings
H5P editor has a folder with all supported languages in JS files.
A mechanish has been added to let users to translate them using AMOS.
That's how the translations are managed (the order how they are processed):

- If there a JS file for a language, it's loaded.
- If a string has been translated in Moodle (they are placed in
h5plib_vXXX), it will override strings loaded from the JS file.
2020-05-12 16:39:42 +02:00
Sara Arjona
36a3a259de Merge branch 'MDL-68571-master' of git://github.com/cescobedo/moodle 2020-05-11 16:52:48 +02:00
cescobedo
444b2282f1 MDL-68571 core_h5p: Return default handler if no it has been defined 2020-05-11 16:46:27 +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
a8455b7240 MDL-68473 core_h5p: moved fixture to anonymous class 2020-05-01 14:25:11 +01:00
Victor Deniz Falcon
e4127c9262 MDL-68473 core_h5p: fixed import of moodleform class 2020-05-01 13:59:16 +01:00
Sara Arjona
153c45625d MDL-67795 h5p: move methods from player to helper 2020-04-23 13:09:40 +02:00
Víctor Déniz Falcón
eeb90e7e70 MDL-67814 core_h5p: added renderer and editor classes 2020-04-16 11:29:35 +08: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
Ferran Recio
ad9589f64c MDL-67788 core_h5p: add evaluable h5p to fixtures 2020-04-13 12:39:58 +02:00
Ferran Recio
40cef8afe7 MDL-67707 core_h5p: move shared h5p files to core fixtures 2020-03-16 17:52:08 +01:00
Ferran Recio
f3c7e00f13 MDL-67707 core_h5p: add public H5P player methods 2020-03-16 17:52:08 +01: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
Sara Arjona
3e3b656795 MDL-68038 core_h5p: rename can_update_library test 2020-03-02 08:00:42 +01:00
Sara Arjona
91ae2593d6 MDL-67062 core_h5p: behat fix for delete library test 2020-02-27 12:32:21 +01:00
Eloy Lafuente (stronk7)
01689c8fe4 Merge branch 'MDL-67062-master' of git://github.com/sarjona/moodle 2020-02-26 22:44:47 +01:00
Sara Arjona
64a2bd19b0 MDL-67062 core_h5p: delete libraries
New feature to let admins to remove H5P libraries/content types.

Thanks Ferran Recio for your contribution with the renderer!

AMOS BEGIN
 CPY [actions,core],[actions,core_h5p]
AMOS END
2020-02-26 19:55:34 +01:00
Jun Pataleta
47fd698541 Merge branch 'MDL-67921-master' of git://github.com/sarjona/moodle 2020-02-26 16:51:19 +08:00
Eloy Lafuente (stronk7)
b5220abb0f Merge branch 'MDL-67920-master' of git://github.com/aanabit/moodle 2020-02-25 23:32:17 +01:00
cescobedo
5d81efd1f7 MDL-67131 core_h5p: Allow use webservice/pluginfile|tokenpluginfile url
With this fix the player accepts webservice/pluginfile.php, pluginfile.php
and tokenpluginfile.php URLs to find the h5p files.
Also, we allow to build fileurl with the proper endpoint if
the URL is webservice/pluginfile, tokenpluginfile.php or pluginfile.php
as Mobile App needs.
2020-02-21 09:46:23 +01:00
Sara Arjona
92ad6bd901 MDL-67921 core_h5p: re-implement framework->getOption
The implementation done for getOption was not correct because it
was only taking into account the displayoptions for download and
embed.
Besides, setOption implementation has been added.
2020-02-21 09:29:07 +01:00
Amaia Anabitarte
f531a30252 MDL-67920 core_h5p: Move upload button into form and fix title
Minor bugs in Site administration > H5P > Manage H5P content types admin page'
2020-02-21 08:59:27 +01:00
Sara Arjona
5963c3c8f0 Merge branch 'MDL-67060-master' of git://github.com/aanabit/moodle 2020-02-11 11:40:18 +01:00
Amaia Anabitarte
78f0e17127 MDL-67060 core_h5p: Behats for H5P tools Overview 2020-02-11 10:26:57 +01:00
Amaia Anabitarte
d3ee08dba3 MDL-67060 core_h5p: Improving H5P libraries list 2020-02-11 10:26:57 +01: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
e942844d76 MDL-67296 core_h5p: tests modified to use exttests 2020-01-22 20:40:12 +00:00
Jun Pataleta
f136aa1933 Merge branch 'MDL-67231-master' of git://github.com/andrewnicols/moodle 2019-11-13 16:00:16 +08:00
Andrew Nicols
8bd3e49cc9 MDL-67231 h5p: Correct naming of h5p unit test files 2019-11-13 14:24:28 +08:00
Andrew Nicols
09ab002746 Merge branch 'MDL-67194-master' of git://github.com/vmdef/moodle 2019-11-13 08:38:34 +08: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
Sara Arjona
1cb3493ab1 Merge branch 'MDL-67156-master' of git://github.com/vmdef/moodle 2019-11-09 19:53:27 +01:00
Sara Arjona
5e7d8b42ce Merge branch 'MDL-67158-master' of git://github.com/mihailges/moodle 2019-11-09 19:23:39 +01:00
Mihail Geshoski
d68be5b209 MDL-67158 core_h5p: Unit test fixes 2019-11-10 01:37:44 +08:00
Sara Arjona
b80c1e015a Merge branch 'MDL-67061-master' of https://github.com/aanabit/moodle 2019-11-09 13:22:03 +01:00
Amaia Anabitarte
2c679b6ea8 MDL-67061 core_h5p: Behat tests for H5P content-types admin settings 2019-11-09 11:11:07 +01:00
Sara Arjona
3b381bd2da Merge branch 'MDL-67173-master' of git://github.com/cescobedo/moodle 2019-11-09 08:55:47 +01:00
Víctor Déniz Falcón
47627abe9d MDL-67156 core_h5p: change DIRECTORY_SEPARATOR by slashes
In Windows, the value of DIRECTORY_SEPARATOR is "\", causing failures in
the tests when compared to the path strings that use "/".
2019-11-08 22:18:11 +00:00
Andrew Nicols
fc0ded848c MDL-67058 h5p: Correct PHPUNIT_LONGTEST usage 2019-11-08 15:48:58 +08:00