Commit graph

29951 commits

Author SHA1 Message Date
Jun Pataleta
2814436c44 Merge branch 'MDL-71198-master' of https://github.com/junpataleta/moodle 2022-05-26 10:23:27 +08:00
Jun Pataleta
dac4af8e4c Merge branch 'MDL-73183-master' of https://github.com/andrewnicols/moodle 2022-05-26 10:09:46 +08:00
Jun Pataleta
e60e8bc629 Merge branch 'MDL-73423-master' of https://github.com/marinaglancy/moodle 2022-05-26 00:18:35 +08:00
Peter Burnett
3801662e97 MDL-71198 backup: Change times on restore file duplication 2022-05-25 22:18:36 +08:00
Cameron Ball
f284e446b9 MDL-67648 tasks: Add unit tests 2022-05-25 09:38:41 +08:00
Cameron Ball
8154aa2e03 MDL-67648 tasks: Fair-share scheduling with resource management
This patch changes the way adhoc tasks are chosen to run. It now calculates
how many runners each type of adhoc task should be allowed to use. In the
case that not all the runners are utilised, it attempts to infer which
tasks do not take a long time to run, and gives those to the vacant runners.

Thanks to Brendan Heywood for guidance and SQL help.
2022-05-25 09:38:41 +08:00
Jun Pataleta
de177cc564 Merge branch 'MDL-72283_allow-customisation-of-redis-session-handler-errors' of https://github.com/ziegenberg/moodle 2022-05-24 10:13:04 +08:00
Daniel Ziegenberg
01309248d8
MDL-72283 caching: internationalize redis session handler error
The 'unable to obtain session lock'-exception raised by the Redis
session handler is hardcoded in English and not all that useful
to the end user.

This change adds the error message to the lang/error.php and gives
the user further hints why the error might have occured and how it
could be fixed.

Signed-off-by: Daniel Ziegenberg <daniel@ziegenberg.at>
2022-05-23 16:42:33 +02:00
Jun Pataleta
8310b2014e MDL-74802 core: Improve the accessibility of alert notifications
* Make the ordering of the message and the close button logical on
  the DOM.
* Hide the times HTML entity
* Add sr-only label on the close button for non-sighted users
* Add tooltip on the close button sighted users
* With all the notification templates being the same except for the
  class, I created a base notification template (core/notification_base)
  that alert notifications just override. This avoids code duplication
  and can make maintenance simpler.
2022-05-23 12:54:55 +08:00
Brendan Heywood
e032ac9303 MDL-68668 redis: Add session lock acquire warning 2022-05-20 22:41:38 +10:00
Sujith Haridasan
9812b4bbaa MDL-74577 core: Reset login_failed_count_since_success after login
When the user is logged in successfully then reset the value
of login_failed_count_since_success to zero, if the value of
login_failed_count_since_success is greater than zero.
2022-05-20 10:12:42 +05:30
Paul Holden
6d5c0190e2 MDL-74192 core: add strictness to persistent get_record method.
Allow developer to specify the given record MUST_EXIST, and the
method to throw the underlying database exception.
2022-05-19 15:21:39 +01:00
Jun Pataleta
b0b3b13032 Merge branch 'MDL-73163-master' of https://github.com/lameze/moodle 2022-05-19 10:11:48 +08:00
Jun Pataleta
7cda6e3641 Merge branch 'MDL-74416-master' of https://github.com/lameze/moodle 2022-05-19 09:59:54 +08:00
Jun Pataleta
94e803b663 Merge branch 'MDL-73478-improve-set-config' of https://github.com/keevan/moodle 2022-05-18 23:11:06 +08:00
Carlos Castillo
3236a41c3a MDL-74150 tool_componentlibrary: Add title attribute to core/toggle 2022-05-16 11:43:55 -05:00
Paul Holden
5215a02444 MDL-73013 calendar: fix serving of files added to category events. 2022-05-12 16:12:15 +01:00
Jun Pataleta
eae7ec37ca Merge branch 'MDL-74413' of https://github.com/stronk7/moodle 2022-05-12 12:09:05 +08:00
Jun Pataleta
c7ddee0890 Merge branch 'MDL-70568-cron-debugging-patch' of https://github.com/macgirvin/moodle 2022-05-11 10:43:19 +08:00
Paul Holden
f8790390d0 MDL-72458 user: add timezone to user profile page. 2022-05-10 13:17:06 +01:00
Pete Whelpton
bc6041158c MDL-71202 webservice: Add index on external_tokens.sid
Without this index, a full table scan / table level locking occurs when
logging out of Moodle.  This can result in slow performance in a busy
Moodle site.
2022-05-10 12:31:25 +08:00
Petr Skoda
d91cd20d64 MDL-74416 phpunit: fix generator counters reset 2022-05-10 07:47:46 +08:00
Kordan
84735e806d MDL-73163 behat: Changed most to must 2022-05-09 19:29:19 +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
Víctor Déniz
89fbe47289 Merge branch 'MDL-74567' of https://github.com/paulholden/moodle 2022-05-05 09:37:28 +01:00
Jake Dallimore
59b5858da2 MDL-73736 core_auth: Fix concurrency issue in login_attempt_failed()
This patch wraps the login_failed_count logic in a resource lock and
forces a user preferences cache reload. Each thread must wait for the
lock and must fetch the current count before incrementing it. This
ensures that login_failed_count is correct across threads and that the
lockout threshold is correctly honoured.

Co-Authored-By: Sujith Haridasan <sujith@moodle.com>
2022-05-04 14:44:42 +06:00
Jun Pataleta
11b2cc4cb5 Merge branch 'MDL-73878-master' of https://github.com/aanabit/moodle 2022-05-04 09:42:30 +08:00
Amaia Anabitarte
ffc655b181 MDL-73878 core_user: Creating a new category for social fields 2022-05-03 17:52:11 +02:00
David Matamoros
b1a142eab4 MDL-74317 output: Remove capability checks in edit mode WS
- Removed validation on the change edit mode WS. Permission should
be handled where the edit button is rendered in order to show or not
the button.
2022-05-02 10:45:30 +02:00
Marina Glancy
a0398fdde8 MDL-73423 core_privacy: Calling reset() on objects deprecated PHP8.1 2022-04-29 16:16:07 +02:00
Paul Holden
9ff112ea3d MDL-74567 core: re-factor flickr libraries to use shared user-agent. 2022-04-29 13:31:55 +01:00
Paul Holden
2972e66008 MDL-74567 repository_flickr: replace user-agent value for API calls.
Flickr doesn't like user agent that looks like a bot. Effectively the
same reasoning/fix as b8ee31a0.
2022-04-29 13:08:36 +01:00
Eloy Lafuente (stronk7)
76f5445451 MDL-74510 upgrade: add the 4.0.0 separation line to all upgrade scripts 2022-04-22 18:45:10 +02:00
Andrew Nicols
fb0b57f4ab MDL-74506 block: Correct parentcontextid for blocks in dashboard 2022-04-16 17:49:18 +08:00
Andrew Nicols
ed56f9a976 MDL-74506 block: Fix block upgrade to use correct parentcontextid 2022-04-15 20:39:55 +08:00
Ilya Tregubov
edede57172 Merge branch 'MDL-74407-master' of https://github.com/peterRd/moodle 2022-04-15 07:24:08 +06:00
Sara Arjona
d54fa7abd8 Merge branch 'MDL-74447' of https://github.com/Chocolate-lightning/moodle 2022-04-14 12:10:31 +02:00
Andrew Nicols
e9335eb448 MDL-74447 core: Restrict block drag/drop to container 2022-04-14 17:22:29 +12:00
Peter Dias
40ad488405 MDL-74407 navigation: Perform a strict array_search for node keys
Perform strict array_search due to conflicting results in versions <php8.0
2022-04-14 12:25:15 +08:00
Jun Pataleta
821ec66490 Merge branch 'MDL-74498-master' of https://github.com/justusdieckmann/moodle 2022-04-14 10:31:05 +08:00
Justus Dieckmann
bf68b2bc64 MDL-74498 output: Resolve correct icon for modules
Fixes the resolve_image_location function, which previously returned
the 'icon' or 'monologo' icon for modules, no matter the requested
image name.

Also fixes an incorrect pix_icon() call for the context header, which
was hidden by the faulty resolve function.
2022-04-14 01:54:28 +02:00
Ilya Tregubov
e39a1fff2c Merge branch 'MDL-74471-master' of https://github.com/junpataleta/moodle 2022-04-13 14:59:21 +06:00
Jun Pataleta
70f6b1605b MDL-74471 versions: bump all versions and requires near release 2022-04-13 10:37:36 +08:00
Paul Holden
a3a473d644 MDL-74489 admin: consider salt configuration as sensitive to site.
The admin preset tool shouldn't export badge/calendar salt configuration
unless explicitely asked for as changing these values on another site
can be potentially destructive.
2022-04-12 16:19:40 +01:00
Shamim Rezaie
5e957e5ed1 Merge branch 'MDL-74459' of https://github.com/paulholden/moodle 2022-04-12 11:29:44 +10:00
Jake Dallimore
39be17d918 Merge branch 'MDL-74386-integration-master' of https://github.com/mihailges/moodle 2022-04-11 10:01:00 +08:00
Tim Hunt
5fff990e25 MDL-74255 quiz: clean up lots of stuff mainly in the tests
This fixes lots of stuff like outdated or incomplete PHPdoc comments
or test heler functions where the arguments don't have their types
declared.

A few more significant fixes, like places were a silly method
was used to get a context which was readily available.
2022-04-08 12:19:52 +01:00
Mihail Geshoski
93aa5ab03e MDL-74386 navigation: Do not load course navigation in system context 2022-04-08 15:02:01 +08:00
Paul Holden
6e85e01d3b MDL-74459 forms: replace import of jqueryui with native code.
We used the import for ensuring collapsible section elements
contained an ID attribute (efbe1530). This conflicted with use
of Bootstrap tooltips.
2022-04-07 22:38:46 +01:00
Jun Pataleta
ac3e77b1b1 Merge branch 'MDL-74271-master-squashed' of https://github.com/andrewnicols/moodle 2022-04-07 20:52:10 +08:00