1006 Commits

Author SHA1 Message Date
Huong Nguyen
23ba4d1792
Merge branch 'MDL-82245-404' of https://github.com/paulholden/moodle into MOODLE_404_STABLE 2024-07-11 11:14:07 +07:00
Paul Holden
75791eabea
MDL-82245 restore: use translated lang string in page heading. 2024-06-28 10:03:09 +01:00
Paul Holden
6b01e331e6
MDL-82315 backup: account for null course section sequence value. 2024-06-27 23:34:48 +01:00
Luca Bösch
18bf9704e7 MDL-82008 backup: Format 'Continue' and 'Cancel' button to have a margin 2024-06-21 09:37:02 +02:00
Eloy Lafuente (stronk7)
1093256560
MDL-81522 phpunit: Add missing void return type to all tests
While this change is not 100% required now, it's good habit
and we are checking for it since Moodle 4.4.

All the changes in this commit have been applied automatically
using the moodle.PHPUnit.TestReturnType sniff and are, exclusively
adding the ": void" return types when missing.
2024-06-11 12:18:04 +02:00
Eloy Lafuente (stronk7)
b2a485e244
MDL-81698 phpunit: Apply various fixes towards 1by1 execution
The changes here are heterogeneous:
- Include stuff that is not available (other test has included it).
  Sometimes local to a unit test, others in setupBeforeClass() or
  globally, ... depends on every case.
- Rename some tests (namespaces, test name, ...) towards getting it
  running.
- Amend small bits here and there.

Important note: I've left any "cosmetic" warning out from the
changes, only a few errors (like long array syntax) have been fixed.
2024-05-25 17:19:52 +02:00
Eloy Lafuente (stronk7)
1dbc78253c
MDL-81581 phpunit: Apply the new method to all remaining cases
After discussing it in the issue, we have agreed to apply
the new phpunit_util::normalise_line_endings() method to
all the remaining cases (within tests!) where the manual
replacement was being done. This commits achieves that.

Note that I've looked for both str_replace() and preg_replace()
cases, but only the former had cases worth converting. All the
later ones are different and cannot be replaced by the new
utility method.
2024-04-25 18:52:25 +02:00
Andrew Nicols
6f1df841f7
MDL-67667 core: Deprecate and removal task blocking
There are inherent issues with task blocking which mean that it has
never worked properly. It is also very buggy and can lead to massive
performance issues with task processing.

It is almost impossible to deprecate this in a staged fashion because
various APIs use the methods and it is not possible to determine which
are API uses and which are other valid uses.

In reality there has been little-to-no uptake on the use of this feature
and it should just be removed.
2024-04-12 12:34:20 +08:00
Andrew Nicols
2b49ad42f5
MDL-81456 core: Use DI for all hook access
Using DI for all hook access means that it becomes significantly easier
to mock hooks and callbacks for unit testing without fundamentally
altering the structure of the code purely for the purposes of unit
testing.
2024-04-08 09:35:41 +08:00
Matt Porritt
5d74f366a0 MDL-81172 Backup: Async Backup on by default from install
Enable asynchronous backup and restore on new site install.
Existing behaviour is not changed for sites being upgraded.
Behat tests have been set to use synchronous mode.
2024-03-18 12:01:50 +11:00
Eloy Lafuente (stronk7)
361dfe8145
MDL-75952 general: Since php81, refection->setAccessible() is no-op
Refereces:
- https://wiki.php.net/rfc/make-reflection-setaccessible-no-op
- https://www.php.net/manual/en/reflectionproperty.setaccessible.php
- https://www.php.net/manual/en/reflectionmethod.setaccessible.php

As of PHP 8.1.0, calling this method has no effect; all methods are
invokable by default. So, let's remove all uses from core, they are
no-op.
2024-03-10 21:15:00 +01:00
Jun Pataleta
3278ce7aba
Merge branch 'MDL-65292' of https://github.com/stronk7/moodle 2024-03-08 08:00:41 +08:00
Sara Arjona
6f81ace5a8
Merge branch 'MDL-81011-main' of https://github.com/andrewnicols/moodle 2024-03-07 12:20:01 +01:00
Sara Arjona
c799ea5e21
MDL-69656 backup: Remove illegal whitespaces 2024-03-07 12:01:35 +01:00
Jun Pataleta
f364dd5e40
Merge branch 'MDL-81044-main' of https://github.com/andrewnicols/moodle 2024-03-07 11:02:05 +08:00
Ilya Tregubov
cd85552e38 Merge branch 'MDL-80460-main' of https://github.com/sarjona/moodle 2024-03-07 08:41:42 +08:00
Sara Arjona
fed26847b4
MDL-80460 behat: Fix tests to replace Topic with Section
The behat tests using the course format topics have been reviewed to:
- Add the 'inisections' parameter where necessary, facilitating automatic
renaming of section names.
- Evaluate failing tests due to slight changes in ordering. Notably, in
the topics format, sections are now uniformly named 'New section' without
any numbering.
2024-03-06 15:25:22 +01:00
Stefan Hanauska
a0d501463a MDL-69656 backup: Replace urlencoded pluginfile urls 2024-03-06 07:37:17 +01:00
Sara Arjona
e1034deb8b
Merge branch 'MDL-75670-main' of https://github.com/roland04/moodle 2024-03-04 16:05:18 +01:00
Mikel Martín
d0d62fd06c MDL-75670 theme: Refactor form-inline helper class dropped in BS5
- Replace .form-inline Bootstrap helper class with .d-flex.flex-wrap.align-items-center
- Refactor .form-inline occurrences in SCSS files or remove when unneeded
2024-02-29 13:56:46 +01:00
Eloy Lafuente (stronk7)
29a541724f
MDL-65292 style: Fix all the function declaration ordering
This has been generated running the following Sniff,
part of the Moodle's CodeSniffer standard:
- PSR2.Methods.MethodDeclaration

It just ensures all the function declarations have
the correct order for:
- abstract and final.
- visibility (public, protected, private).
- static.

So, all the lines modified by this commit are function declarations
and the only changes are in the positions of those keywords.
2024-02-28 23:47:47 +01:00
Eloy Lafuente (stronk7)
ba1f804ffa
MDL-65292 style: Fix all function declarations white space
This has been generated running the following Sniffs, all
them part of the Moodle's CodeSniffer standard:
- PSR12.Functions.ReturnTypeDeclaration
- PSR12.Functions.NullableTypeDeclaration
- moodle.Methods.MethodDeclarationSpacing
- Squiz.Whitespace.ScopeKeywordSpacing

All them are, exclusively, about correct spacing, so the changes
are, all them, only white space changes.

Only exceptions to the above are 3 changes what were setting the
return type in a new line, and, when that happens, the closing
parenthesis (bracket) has to go to the same line than the colon.
2024-02-28 23:33:26 +01:00
Andrew Nicols
62ae5b6175
MDL-81044 backup: Use varidic to exclude events instead of an array 2024-02-27 11:40:56 +08:00
Andrew Nicols
275e5f9412
MDL-81044 backup: Coding style fixes 2024-02-27 11:40:55 +08:00
Andrew Nicols
7b63a6864a
MDL-81044 backup: Prevent parameter bleed between readers
These parameters were re-used between array iterations, but some of the
values were modified during the iteration.
2024-02-27 11:40:55 +08:00
Andrew Nicols
5109761162
MDL-81044 backup: Rename excluded events hook to meet style 2024-02-27 11:40:55 +08:00
Amaia Anabitarte
0c081f004a MDL-75794 mod_data: deprecate behat steps to generate entries and fields 2024-02-22 17:37:54 +01:00
Sara Arjona
69ee5c3395
MDL-80461 courseformat: Fix tests after replacing topic/week 2024-01-19 08:53:18 +01:00
Huong Nguyen
028c0384a2 MDL-69615 core_backup: Send backup report email once the tasks are done 2024-01-16 09:32:19 +07:00
Tomo Tsuyuki
f4597c9096 MDL-73926 backup: Add hook to exclude events for triggering backup 2023-12-14 10:01:47 +11:00
Sara Arjona
9e3acd9f06
MDL-79915 backup: Improve the Restore main page
Júlia, from the PX team, has suggested a few improvements to make it easier to
understand the Restore main page:

- Displaying a notification instead of the empty table when there are no files
in an area.
- Improve the copy, removing the help buttons and moving this information to the
main page.
- Replacing "Import a backup file" with "Upload a backup file".
- Adding some space between the different areas.
- Displaying a different text in the different "Manage backup files" buttons.
2023-11-29 09:19:46 +01:00
Jun Pataleta
690d783f14
MDL-79912 backup: Fix alignment of tertiary navigation border 2023-11-23 10:00:52 +08:00
Sara Arjona
424c9cb1bd
MDL-79912 backup: Create Course reuse index page
The backup/view.php page has been created to display the list of
course reuse actions available for users.
That way, the "Course reuse" option in the secondary navigation
will display this page instead of redirecting to the first action
available.

Apart from that, the headers for all the Course reuse actions have
been homogenised and the tertiary navigation selector has been included,
to replace headers and make it easier navigate between actions.
2023-11-22 18:11:43 +01:00
Huong Nguyen
af31bedf16
Merge branch 'MDL-76092-master' of https://github.com/andrewnicols/moodle 2023-09-01 10:41:18 +07:00
Matt Porritt
4b556a6840 MDL-79134 Backup: Deprecate MD5 for included user passwords
Prevent backups containing legacy MD5 hashed user passwords
from being added back into the database. Hashes are converted
to random SHA512 hashed passwords upon restore for these backups.
2023-08-28 13:39:42 +10:00
Andrew Nicols
956fd2bab5
MDL-76092 core_backup: Unit tests for convert_params_to_values 2023-08-23 14:19:05 +08:00
Paola Maneggia
d2279457f0
MDL-76092 core_backup: Fix PHP8.0 vulnerability convert_params_to_values 2023-08-23 12:21:48 +08:00
Huong Nguyen
728cdc0284
MDL-44190 backup: Always use the course context for course search 2023-07-19 11:26:55 +07:00
Huong Nguyen
18dca30eca
MDL-44190 backup: Current course will be selected by default 2023-07-19 09:17:56 +07:00
Paul Holden
1125af7857
MDL-78587 course: use tertiary nav selector on participant pages. 2023-07-12 18:26:23 +01:00
Ilya Tregubov
b924f68081
Merge branch 'MDL-69983-master' of https://github.com/davewoloszyn/moodle 2023-07-06 10:25:40 +08:00
Franziska Hübler
0458672a77 MDL-69983 backup: Save async backups in correct area. 2023-07-06 12:12:19 +10:00
Angelia Dela Cruz
09d654b3fe MDL-78158 behat: Behat cleanup and optimisation 2023-07-04 07:01:27 +08:00
Angelia Dela Cruz
9f101a30b2 MDL-78158 Behat: Use data generators to add blocks 2023-07-03 17:41:21 +08:00
Andrew Nicols
09505be547 Merge branch '77986-master-backup-trim-search-fields' of https://github.com/DSI-Universite-Rennes2/moodle 2023-06-22 14:29:41 +02:00
Ilya Tregubov
9611669cae
Merge branch 'MDL-70152-master' of https://github.com/andelacruz/moodle 2023-06-14 13:24:06 +08:00
Andrew Nicols
9f5d56b7c3
Merge branch 'MDL-75696_master' of https://github.com/marxjohnson/moodle 2023-06-08 12:30:49 +08:00
Andrew Nicols
7de0cb32d1
Merge branch 'MDL-76838' of https://github.com/paulholden/moodle 2023-06-08 11:54:05 +08:00
Angelia Dela Cruz
c95ef35b60 MDL-70152 behat: Forum behat generators use UI
Behat cleanup and optimisation
2023-05-29 10:32:20 +08:00
Angelia Dela Cruz
640db57c0e MDL-70152 behat: Forum behat generators use UI
Replace steps that manually add forum and forum post instances
via the UI and use Behat generators. This improves the speed of
Behat test runs.
2023-05-29 10:32:12 +08:00