244 Commits

Author SHA1 Message Date
Andrew Nicols
5be481d1d0
MDL-81520 core: Fix test finality 2024-12-11 12:30:21 +08:00
Andrew Nicols
3d51aed3e2
MDL-81521 core: Update all possibly data providers to be static
Note: Some data providers could not be automatically be converted to
being static. These will be handled in a separate issue.
2024-11-19 09:30:51 +08:00
Paul Holden
5b168b055f MDL-82558 h5p: escape template error/exception content. 2024-08-05 11:03:03 +08:00
Paul Holden
6f3337dcba
MDL-82527 h5p: improve editor Behat scenarios for embedding content.
* Move the shared drag fixture out of the Atto plugin;
* Switch to using faster generators for populating private files;
* Clarify required fields for private files generator
2024-07-18 09:45:53 +01:00
Paul Holden
45f674e8cb
MDL-80653 h5p: handle content type creation errors in test.
See also same in c7d08f85.
2024-01-24 08:58:30 +00:00
Sara Arjona
8974392cfa
MDL-74129 h5p: Preserve metadata information
The metadata information was not restored when an H5P file was uploaded
(it was saved when it was edited directly from the Content bank, but the
original information in the H5P file was lost).
This patch includes all the metadata fields and its values in the original
H5P file to preserve this information too.
2023-11-10 10:34:23 +01:00
Paul Holden
1eda3a392b MDL-78820 h5p: use fullname of current user as the xAPI actor name. 2023-10-04 02:10:16 +02:00
Ilya Tregubov
9e62b27d12
Merge branch 'MDL-71955-401' of https://github.com/paulholden/moodle into MOODLE_401_STABLE 2023-09-21 09:18:17 +08:00
Jun Pataleta
312f80d1d7
Merge branch 'MDL-79291-401' of https://github.com/paulholden/moodle into MOODLE_401_STABLE 2023-09-15 17:37:19 +08:00
Paul Holden
0f4b831249
MDL-71955 h5p: ensure embedded player sets up $PAGE correctly.
For module context, it should set the current cm and course to
ensure consistency in navigation API.
2023-09-11 10:18:20 +01:00
Jun Pataleta
49393a1608
MDL-78806 core: Remove redundant site name
MDL-78806 core: Remove redundant site name on page titles

* With the site name now being appended to the page titles, there
is no need to manually append the page titles.
2023-09-09 08:56:50 +08:00
Paul Holden
11867ee8eb
MDL-79291 h5p: handle content type creation errors in test generator.
If the endpoint is temporarily down and/or misbehaving, then at least
we'll a clearer failure message.
2023-09-07 15:39:05 +01:00
Ilya Tregubov
f8e468c41a Merge branch 'MDL-77916-401' of https://github.com/paulholden/moodle into MOODLE_401_STABLE 2023-04-18 14:28:44 +08:00
Paul Holden
31a3c8cda4
MDL-77916 h5p: register autoloader in helper testcase. 2023-04-13 23:14:57 +01:00
Petr Skoda
f336875b1a MDL-76859 h5p: Fix behat failures
- Only resize if the H5P EmbedCommunicator is defined (otherwise, it was causing a
JS error)
- An unnecessary image has been removed from the greeting-card.h5p fixture package.
That way, the text will always be displayed (even if the iframe is still not
resized). Instead of replacing the original greeting-card-887.h5p file, I've
renamed it to greeting-card.h5p, to remove these ugly and unnecessary numbers
at the end of the file name).
2023-04-12 12:27:06 +02:00
Andrew Nicols
cd48ae56c7 MDL-77559 js: Rebuild all JS with Node 16 2023-03-09 09:53:19 +08:00
Andrew Nicols
288620b0b4 MDL-75012 js: Full build of all grunt things 2023-03-02 12:15:25 +08:00
David Woloszyn
226bfb0348 MDL-75946 core_h5p: Fixed deprecated FILTER_SANITIZE_STRING 2023-02-03 12:58:32 +11:00
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
Paul Holden
70a5e38b2c MDL-70070 phpunit: correct data provider method names.
They should not be prefixed `test_` because that's how actual
test methods containing assertions are identified by PHPUnit.
2023-01-16 08:28:31 +00:00
Marina Glancy
66dcb1683b MDL-76356 various: avoid implicit conversion to arrays
PHP before version 8.1 automatically converted stdClass or 'false' to arrays if
function parameter expects array (for example, "reset").
PHP 8.1 shows notices in these situations
2023-01-10 15:03:40 +01:00
Amaia Anabitarte
76ce30ca98 MDL-76004 core_h5p: Ensure the browser is serving updated file 2022-12-14 16:22:46 +01:00
Jun Pataleta
00bae8b8a4 MDL-76403 versions: bump all versions and requires near release 2022-11-23 09:45:23 +08:00
Sara Arjona
3b7d1a2f23 NOBUG: Fixed SVG browser compatibility 2022-11-11 15:05:55 +01:00
Jake Dallimore
c5c85cce43 Merge branch 'MDL-73853-master' of https://github.com/sarjona/moodle 2022-11-11 11:29:08 +08:00
Sara Arjona
f23fe5195a MDL-73853 core_h5p: Improve behat tests, to avoid random errors
An improvement has been added to the H5P tests to avoid random errors
due to the fact that H5P content needs a while to be displayed.

Co-author: Ferran Recio <ferran@moodle.com>
2022-11-09 14:04:41 +01:00
Sara Arjona
288963e526 MDL-73853 core_h5p: Add core lib changes after upgrading it 2022-11-08 17:09:00 +01:00
Sara Arjona
7ea2b6bfa1 MDL-73853 core_h5p: Upgrade core lib to moodle-1.22.4 2022-11-08 17:09:00 +01:00
Sara Arjona
d611cdff9d MDL-73853 core_h5p: Disable H5P hub
Although we're not currently supporting the H5P Hub, the hubIsEnabled
setting was set to true (probably by mistake).
It has been changed to false by default because the new version of
the H5P editor library is causing some errors otherwise.
2022-11-08 17:09:00 +01:00
Sara Arjona
7c4ede9280 MDL-73853 core_h5p: Add editor lib changes after upgrading it 2022-11-08 17:09:00 +01:00
Sara Arjona
b9ed63b470 MDL-73853 core_h5p: Upgrade editor lib to moodle-1.22.4 2022-11-08 17:09:00 +01:00
Eloy Lafuente (stronk7)
56e5b69930 MDL-72979 general: Remove any reference to the git:// protocol
Trivial change, only point is that, for the h5p library it was
agreed that it's better to just remove the "sample" directory
completely when importing the library.
2022-11-08 16:49:26 +01:00
Eloy Lafuente (stronk7)
0ed53be9b2 MDL-66902 tests: Fix all incorrect namespaces
This issue just goes over all the currently incorrect
namespaces in test cases and:

1. Change the namespace to the correct one.
2. Move/rename it to correct location if needed (level 2 and down).
3. Remove not needed MOODLE_INTERNAL check when possible.
4. Remove file phpdoc when the file only has one class.
5. Make small adjustments in case the change of namespace requires it.
2022-09-26 14:12:16 +02:00
Paul Holden
b40ab6987d MDL-75326 h5p: require sesskey to toggle library enabled state. 2022-08-12 04:14:18 +02:00
Jun Pataleta
29d804b302 Merge branch 'MDL-74895' of https://github.com/paulholden/moodle 2022-08-04 11:35:47 +08: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
Andrew Nicols
547cae0a02 MDL-74697 libraries: Update all third-party libraries with more metadata 2022-07-22 07:28:47 +02:00
Sujith Haridasan
73d604369d MDL-71062 core: Step 1 deprecation of print_error function 2022-07-13 08:20:54 +05:30
Jun Pataleta
d4ba0359cf MDL-72885 core: Use get_html_lang_attribute_value()
Use get_html_lang_attribute_value() for formatting language codes
for the HTML lang attribute.
2022-05-27 19:38:54 +08:00
Eloy Lafuente (stronk7)
caf55abf17 MDL-74413 phpunit: Move more tests to use correct names and namespaces
Applied the following changes to various testcase classes:

- Namespaced with component[\level2-API]
- Moved to level2-API subdirectory when required.
- Fixed incorrect use statements with leading backslash.
- Remove file phpdoc block
- Remove MOODLE_INTERNAL if not needed.
- Changed code to point to global scope when needed.
- Fix some relative paths and comments here and there.
- All them passing individually.
- Complete runs passing too.

Special mention to:

- Moved to the level2 "privacy" namespace:
  - \mod_assign\privacy\feedback_legacy_polyfill_test
  - \mod_assign\privacy\submission_legacy_polyfill_test

- Moved to the level2 "task" namespace:
  - \core_message\task\migrate_message_data_test
  - \ltiservice_gradebookservices\task\cleanup_test
  - \message_email\task\send_email_test
  - \mod_lti\task\clean_access_tokens_test
  - \mod_workshop\task\cron_task_test

- Moved to the level2 "event" namespace:
  - \core_h5p\event\deleted_test
  - \core_h5p\event\viewed_test

- Renamed to a better name:
  - backup_forum_activity_task_test.php (missing "task")
2022-05-07 20:32:30 +02:00
Jun Pataleta
70f6b1605b MDL-74471 versions: bump all versions and requires near release 2022-04-13 10:37:36 +08:00
Paul Holden
4102ae35a4 MDL-74283 dml: replace hardcoded concat SQL with appropriate API. 2022-03-22 17:33:03 +00:00
Sara Arjona
ae935e8349 Merge branch 'MDL-74123_h5p_duplicate_file' of https://github.com/davosmith/moodle 2022-03-10 08:40:55 +01:00
Davo Smith
4202104a2e MDL-74123 h5p: delete any existing files when downloading new files 2022-03-08 13:52:26 +00:00
cescobedo
4025695552 MDL-71722 h5plib_v124: Add required changes after lib upgrade 2022-03-08 10:04:20 +01:00
cescobedo
1b5af6aa4f MDL-71722 h5plib_v124: Upgrade ckeditor to 4.17.1 2022-03-08 10:04:20 +01:00
Jun Pataleta
96e5418134 NOBUG: Fixed SVG browser compatibility 2022-03-03 17:51:51 +08:00
cescobedo
20fd467f35 MDL-73830 h5plib_v124: Add required changes after lib upgrade 2022-02-28 07:29:47 +01:00
cescobedo
20916ff72a MDL-73830 h5plib_v124: Upgrade H5P core library to 1.24.3 2022-02-28 07:23:39 +01:00