31167 Commits

Author SHA1 Message Date
Jun Pataleta
02ba4ceefa Merge branch 'MDL-77940' of https://github.com/stronk7/moodle 2023-04-19 17:43:23 +08:00
Jake Dallimore
555ad338bf Merge branch 'MDL-77958-master' of https://github.com/andrewnicols/moodle 2023-04-19 17:08:14 +08:00
Andrew Nicols
3ac1acacca MDL-77958 moodlenet: Various style fixes
This change contains various style fixes which I encountered and fixed
whilst addressing the other issues identified in this issue.
2023-04-19 16:12:50 +08:00
Andrew Nicols
581ccb9a47 MDL-77958 moodlenet: Pass stored_file to improve memory usage
Previously the content of the stored file was extracted and stored in a
variable, passed around, and then submitted to MoodleNet. This results
in very high memory consumption when dealing with MoodleNet.

The stored_file should be passed around as a first-level param to
discourage this, and the content should _never_ be loaded into memory.
Instead file streams and resources should be used to allow Guzzle/Curl
to buffer the file from disk/other storage straight to MoodleNet.
2023-04-19 16:12:50 +08:00
Andrew Nicols
489a53ceb2 MDL-77897 editor_tiny: Save editor content on editor blur 2023-04-19 14:57:10 +08:00
Andrew Nicols
96a1a0abce MDL-77958 file: Add psr stream functionality to file API
This change introduces a new get_psr_stream() method to:
* stored_file
* file_system

This allows us to fetch a Psr Stream implementing the
PSR\Http\Message\StreamInterface and pass it into Guzzle, which means
that there is no need to load the entire file content into memory to
serve it.
2023-04-19 13:51:49 +08:00
Jun Pataleta
b1954bfdf9 Merge branch 'MDL-77953' of https://github.com/stronk7/moodle 2023-04-19 12:37:55 +08:00
Andrew Nicols
a089496f96 Merge branch 'MDL-77954' of https://github.com/paulholden/moodle 2023-04-19 11:16:50 +08:00
Paul Holden
78d24550af
MDL-77955 moodlenet: destroy backup controller in class destructor.
This ensures that it's always cleaned up during tests, where not doing
so can cause spurious errors on Windows.
2023-04-18 22:42:13 +01:00
Paul Holden
fd8184a295
MDL-77954 moodlenet: store packaged activities in user draft.
We shouldn't invent fileareas with invalid values (specifically in
this case, the `itemid` overflowed maximum length of the field on
Oracle).

Given the generated file is transitory in nature, instead store it
in the users draft area.
2023-04-18 18:40:15 +01:00
Eloy Lafuente (stronk7)
30e94a8916 MDL-77953 pagelib: Ensure that null $SCRIPT continues behaving the same
It's possible to have some Moodle components soft linked instead
of being real directories within codebase (within dirroot).

For example, Composer's "vendor" directory can be soft linked
(from elsewhere), or also plugins can be installed using soft
links.

In those cases, Moodle calculates the $SCRIPT global as null. And,
then, string operations on it are emitting a PHP deprecation message
with PHP 8.1 and up.

This fix just ensures that the behaviour is the same than before
PHP 8.1, aka: ltrim(null) = '' (empty string), without any PHP warning.
2023-04-18 18:48:58 +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
Andrew Nicols
3933cbfb5a Merge branch 'MDL-77895' of https://github.com/paulholden/moodle 2023-04-18 23:34:59 +08:00
Jake Dallimore
c9e8aa0406 Merge branch 'MDL-75316-master-4' of https://github.com/mickhawkins/moodle 2023-04-18 17:24:55 +08:00
Michael Hawkins
2e024f304a MDL-75316 core: MoodleNet integration final improvements 2023-04-18 17:00:54 +08:00
Huong Nguyen
58ced4add0 MDL-75316 core_moodlenet: Share to MoodleNet modal and activity menu
Originally implemented as MDL-75785
2023-04-18 17:05:07 +08:00
Huong Nguyen
6a877d438b MDL-75316 core: Webservice for sending activity to MoodleNet
Originally implemented as MDL-75933
2023-04-18 17:04:46 +08:00
Michael Hawkins
42ba0492e2 MDL-75316 core: Corrected oauth2_client::get_accesstoken() docblock
Originally implemented as MDL-75932
2023-04-18 17:04:30 +08:00
Michael Hawkins
77f85ed287 MDL-75316 core: Add activity sender & moodlenet_client to MoodleNet API
This makes it possible to share a single activity to a MoodleNet
instance (which has been enabled for sharing in site admin).
This utilises the core\moodlenet\activity_packager to create an
activity backup, then sends it using the MoodleNet create resource
API specification.

Originally implemented as MDL-75932
2023-04-18 17:04:14 +08:00
raortegar
9bc769a610 MDL-75316 core: Add activity packager to MoodleNet API
This makes it possible to package a single activity as a Moodle backup
file, excluding user data so it is ready to be shared as a MoodleNet
resource.

Co-authored-by: Michael Hawkins <michaelh@moodle.com>

Originally implemented as MDL-75932
2023-04-18 17:03:45 +08:00
Michael Hawkins
d6c4c0fbbd MDL-75316 core: Set up MoodleNet API structure and utilities helper
Initial folder structure and declaring API.
Created utilities class.

Originally implemented as MDL-75932
2023-04-18 17:03:18 +08:00
Huong Nguyen
7727745bf7 MDL-75316 core_moodlenet: Create MoodleNet capability
Originally implemented as MDL-75319
2023-04-18 17:02:47 +08:00
Huong Nguyen
ef2a1934a0 MDL-75316 core_moodlenet: Add setting to control sharing
Originally implemented as MDL-75319
2023-04-18 17:01:38 +08:00
Paul Holden
adb6d5468e
MDL-77895 editor_tiny: standardize quickbar selection toolbar.
Ensure the same heading tags are available as those defined in the
editor block formats configuration (c51b7e2c).

Co-authored-by: Andrew Nicols <andrew@nicols.co.uk>
2023-04-18 07:46:05 +01:00
Andrew Nicols
825e621264 Merge branch 'MDL-77735-master' of https://github.com/sarjona/moodle 2023-04-18 12:11:08 +08:00
Andrew Nicols
dfec1a8e00 MDL-77944 behat: Rename chrome options for w3c support
From Selenium 4.8.0, support for non-w3c browser control has ended.

We only use W3C browser control these days, and this was missed as part
of the move to W3C. All browser options must be vendor-prefixed.
2023-04-18 09:03:35 +08:00
Ilya Tregubov
688c9b13d4 Merge branch 'MDL-77827-master' of https://github.com/HuongNV13/moodle 2023-04-18 08:58:33 +08:00
Paul Holden
6a5a787844
Merge branch 'MDL-77878-master-enfix' of https://github.com/vmdef/moodle 2023-04-17 19:12:36 +01:00
Víctor Déniz
b576b068bd MDL-77878 lang: Use fixed strings in tests 2023-04-17 08:49:59 +01:00
Andrew Nicols
35118869c7 Merge branch 'MDL-77874' of https://github.com/paulholden/moodle 2023-04-17 11:20:53 +08:00
Helen Foster
ee8408c4d5 MDL-77878 lang: Import fixed English strings (en_fix) 2023-04-14 13:08:38 +01:00
Sara Arjona
440edc5e42 MDL-77735 core: Check $CFG->lang isset
In some cases, $CFG->lang might not be set, and this is causing a
Notice to be displayed when, for instance, database connection fails.
This patch should fix this case.
2023-04-14 13:46:18 +02:00
Huong Nguyen
f5867c078d MDL-77827 events: Changed JSON comparison to be less strict 2023-04-14 12:28:55 +07:00
Sara Arjona
2e20e08aa9 Merge branch 'MDL-76986-master' of https://github.com/davewoloszyn/moodle 2023-04-13 17:31:58 +02:00
Sara Arjona
bdc106e840 Merge branch 'MDL-76859-master' of https://github.com/sarjona/moodle 2023-04-13 16:24:20 +02:00
Sara Arjona
9ce4fb65fd Merge branch 'MDL-77164-master' of https://github.com/marinaglancy/moodle 2023-04-13 14:00:18 +02:00
Marina Glancy
8fc1486d36 MDL-77164 various: fix incorrect phpdocs 2023-04-13 11:35:06 +01:00
Marina Glancy
4d765cd699 MDL-77164 privacy: typehint test content writer 2023-04-13 09:43:15 +01:00
Marina Glancy
fcf887919b MDL-77164 lib/pear: correct phpdocs 2023-04-13 09:43:15 +01:00
Marina Glancy
9ffbcce0ac MDL-77164 various: fix mustache template name 2023-04-13 09:43:15 +01:00
Marina Glancy
04f8fdd021 MDL-77164 various: fix javascript AMD module name 2023-04-13 09:43:15 +01:00
Sara Arjona
57589966bc Merge branch 'MDL-77468-master' of https://github.com/rmady/moodle 2023-04-13 09:19:54 +02:00
David Woloszyn
41e5260a3b MDL-76986 editor_tiny: Convert language code format for getting strings 2023-04-13 16:01:44 +10:00
Mathew May
1a1939ac29 MDL-75274 gradereport_grader: Column collapsing 2023-04-13 11:45:17 +08:00
Ilya Tregubov
cfbb0ea4d5 Merge branch 'MDL-70975-adhoc-carneval' of https://github.com/catalyst/moodle 2023-04-13 09:07:58 +08:00
Sara Arjona
16511af2a1 Merge branch 'MDL-77012' of https://github.com/paulholden/moodle 2023-04-12 14:09:27 +02:00
Sara Arjona
3c5e26901c Merge branch 'MDL-77374-master' of https://github.com/meirzamoodle/moodle 2023-04-12 13:14:07 +02: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
ea2e9d5920 MDL-76722 core: Fix upgrade failures with MariaDB
The 'enable' field doesn't exist, and this is causing some failures
with MariaDB (and probably with MySQL too).
2023-04-12 11:43:52 +02:00
Meirza
bb7f3bd9f5 MDL-77374 libraries: Added #[AllowDynamicProperties] attribute
To temporarily prevent the PHP 8.2 warning about Dynamic Properties' deprecation,
the #[AllowDynamicProperties] property was added. We encourage anyone to perform the upgrade
as soon as the Google library complies with PHP 8.2.
2023-04-12 16:39:43 +07:00