253 Commits

Author SHA1 Message Date
Amaia Anabitarte
0d11cf1bc9 MDL-78183 core_contentbank: Improve error handling 2023-07-07 12:21:24 +02:00
Jun Pataleta
0a36466d9f Merge branch 'MDL-69530' of https://github.com/paulholden/moodle 2023-06-07 23:26:52 +08:00
Meirza
1c2a86c335 MDL-78147 h5p: Added class properties that are not declared
In PHP 8.2 and later, setting a value to an undeclared class property is
deprecated and emits a deprecation notice.
So we need to add missing class properties that still need to be declared.
2023-06-07 05:16:57 +07:00
Paul Holden
3bc3a5b660
MDL-69530 h5p: remove storage class editor filearea constant. 2023-06-06 12:03:15 +01:00
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
Eloy Lafuente (stronk7)
061c9d7ba0 MDL-77940 versions: bump all versions and requires near release
version = 2023042400 release version
requires= 2023041800 current rc1 version
2023-04-18 18:08:09 +02:00
Ilya Tregubov
34d7edf079 Merge branch 'MDL-77916' of https://github.com/paulholden/moodle 2023-04-18 14:27:49 +08:00
Paul Holden
62d48a1d47
MDL-77916 h5p: register autoloader in helper testcase. 2023-04-13 23:12:13 +01:00
Sara Arjona
bdc106e840 Merge branch 'MDL-76859-master' of https://github.com/sarjona/moodle 2023-04-13 16:24:20 +02:00
Marina Glancy
8fc1486d36 MDL-77164 various: fix incorrect phpdocs 2023-04-13 11:35:06 +01:00
Petr Skoda
43b56a90d9 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:26:23 +02:00
Sara Arjona
c8628576e3 MDL-77254 h5p: Add support to restored states
The restored states should be treated differently, to avoid resetting
them by default the first time users access them.
In that case, the first time users access to content with restored
xAPI states, they should be displayed (instead of resetting them).
2023-04-04 17:23:43 +02:00
Sara Arjona
91175a6773 MDL-77049 core_h5p: Use the styles from Raw SCSS theme settings
MDL-69087 added an option to let themes personalize the H5P styles.
This patch implements the h5p_alter_styles() method in boost, to
let admins personalize the H5P styles using the 'Raw initial SCSS'
and 'Raw SCSS' theme settings.
That way, users won't need to create their own themes to define
some styles for the H5P player.
2023-03-22 12:10:57 +01:00
Sara Arjona
bd0a6e6dcc MDL-67789 h5p: Save current state using xAPI State
Co-author: Andrew Lyons <andrew@moodle.com>
2023-03-15 09:42:18 +01:00
Jun Pataleta
8441270181 Merge branch 'MDL-77559-master-2' of https://github.com/andrewnicols/moodle 2023-03-09 16:02:01 +08:00
Andrew Nicols
511401f4f6 MDL-77559 js: Rebuild all JS with Node 16 2023-03-09 09:53:19 +08:00
Mathew May
e5ca7766e7 MDL-52805 core: Remove legacy log calls 2023-03-07 13:08:46 +08:00
Andrew Nicols
33b1e41f13 MDL-75012 js: Full build of all grunt things 2023-03-02 11:55:32 +08:00
Paul Holden
9ca082a5b0 NOBUG: Fixed SVG browser compatibility 2023-02-10 13:47:26 +00:00
Andrew Nicols
bff31d527c Merge branch 'MDL-75946-master' of https://github.com/davewoloszyn/moodle 2023-02-07 10:38:52 +08:00
Sara Arjona
876c3a39d5 MDL-76691 core_h5p: Add editor lib changes after upgrading it 2023-02-06 16:48:08 +01:00
Sara Arjona
0929df7d35 MDL-76691 core_h5p: Upgrade editor lib to moodle-1.23 2023-02-06 16:48:08 +01: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
Sara Arjona
d18d90602b MDL-76691 core_h5p: Upgrade core lib to moodle-1.23 2023-02-06 16:48:07 +01:00
David Woloszyn
e4bbca0401 MDL-75946 core_h5p: Fixed deprecated FILTER_SANITIZE_STRING 2023-02-03 12:56:35 +11:00
Andrew Nicols
6ae3f79c1e MDL-76362 h5p: Use string as default lang param 2023-01-23 09:15:55 +08:00
Marina Glancy
b0a83aa7bd 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:15:54 +08:00
Jun Pataleta
fad05d7929 Merge branch 'MDL-76583-master-withoutrename' of https://github.com/andrewnicols/moodle 2023-01-19 09:44:48 +08:00
Andrew Nicols
a3cc26f8bb MDL-76583 core: Update uses of external_* classes 2023-01-19 07:34:09 +08:00
Paul Holden
af8da7c737 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:37 +00:00
Marina Glancy
594a8c5ab7 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 12:16:52 +01:00
Amaia Anabitarte
2d1883c92e MDL-76004 core_h5p: Ensure the browser is serving updated file 2022-12-14 16:02:44 +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