205 Commits

Author SHA1 Message Date
Jun Pataleta
d078e0f5f0
Merge branch 'MDL-82270-extra_backslash' of https://github.com/mathbruyen/moodle 2024-09-11 15:53:41 +08:00
Mathieu Bruyen
598eb3260b MDL-82270 tool_policy: fix guest policy template markup.
Remove extra backslash producing invalid markup in consent banner.
2024-09-03 09:00:09 +02:00
Simey Lameze
b66d4e12bf MDL-82651 behat: wait for button to exist before clicking 2024-08-28 13:54:09 +08:00
Huong Nguyen
dca18ebca3
Merge branch 'MDL-81634-main' of https://github.com/andrewnicols/moodle 2024-08-20 09:30:44 +07:00
Huong Nguyen
e6ea778c03
NOBUG: Fixed SVG browser compatibility 2024-08-16 08:37:01 +07:00
Huong Nguyen
31e1fa1f1b
Merge branch 'MDL-82211-main' of https://github.com/sarjona/moodle 2024-08-13 15:37:02 +07:00
Sara Arjona
4d86717530
MDL-82211 tool_policy: Update SVG icons 2024-08-13 07:22:41 +02:00
Mikel Martín
f179890ad5 MDL-75671 theme_boost: Refactor text direction classes for BS5
- Add SCSS code for text direction utility classes to the Boostrap 5 bridge SCSS file
- Replace all occurrences in the codebase (text-left > text-start, text-sm-right > text-sm-end, ...)
2024-08-09 07:40:17 +02:00
Mikel Martín
6baf2046d5 MDL-75671 theme_boost: Refactor float classes for BS5
- Add SCSS code for float  utility classes to the Boostrap 5 bridge SCSS file
- Replace all occurrences in the codebase (float-left > float-start, float-sm-right > float-sm-end, ...)
2024-08-09 07:40:17 +02:00
Andrew Nicols
024e36be17
MDL-81634 core: Fix all implicitly defined nullables
Note: This does not impact third-party libraries.
2024-08-02 14:11:12 +08:00
Eloy Lafuente (stronk7)
674497a12c
MDL-81523 phpunit: Add all missing setUp/tearDown parent calls
All setUp(), tearDown(), setUpBeforeClass() and tearDownAfterClass()
must, always, call to parent, to ensure that everything is properly
set and cleaned.

While in a lot of situations this is not needed (parents may not
have anything to run), with PHPUnit >= 10 this can become more
important because we are going to move the reset code from current
placement @ runBare() to setUp()/tearDown().

Note that all the changes performed in this commit have been detected
and fixed by moodle-cs (ParentSetUpTearDownSniffTest).
2024-06-14 16:04:57 +02:00
Eloy Lafuente (stronk7)
4f7631113c
MDL-81522 phpunit: Add missing void return type to all tests #2
This commit includes more changes, all them also adding the :void
return type to unit tests missing them.

The difference is that all these changes, while also detected
perfectly by the moodle.PHPUnit.TestReturnType sniff, were not
auto-fixed (like the previous commit ones), because all them
do include some "return" statement and, for safety, we don't
fix them.

All the cases have been visually inspected and confirmed that
the existing "return" statements always belong to anon
functions within the test body and not the test own return statement.
2024-06-11 11:55:08 +02:00
Eloy Lafuente (stronk7)
01148a0816
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 11:55:07 +02:00
Juan Leyva
0e966da5e6 MDL-80973 tool_policy: Fix edge case 2024-05-27 17:19:53 +02:00
Jun Pataleta
78e5814a0f
MDL-81616 upgrade: add the 4.4.0 separation line to all upgrade scripts 2024-04-20 21:01:04 +08:00
Jun Pataleta
a180dba314
MDL-81549 versions: bump all versions and requires near release 2024-04-17 00:03:29 +08:00
Andrew Nicols
770e6b49f4
MDL-81144 core: Convert standard_footer_html to hook 2024-04-02 10:23:41 +08:00
Andrew Nicols
3105ea7dc2
MDL-81144 core: Convert before_standard_top_of_body_html to hook 2024-04-02 10:23:41 +08:00
Daniel Ziegenberg
08027e408c
MDL-81281 phpunit: assertObjectHasAttribute is deprecated
To be integrated as part of MDL-81266

When running PHPUnit 9.6 we get the following deprecation warnings:
"assertObjectHasAttribute() is deprecated and will be removed in PHPUnit
10. Refactor your test to use assertObjectHasProperty() instead."

So we replace all instances of assertObjectHasAttribute with
assertObjectHasProperty.

PHPUnit justifies the change with:
> PHPUnit currently refers to "fields" (see above) as "attributes". This
> is (or will become) confusing considering the introduction of
> attributes in PHP 8 and their support in PHPUnit.  PHPUnit will be
> changed to use the term "property" instead of "attribute" where "field"
> is meant.

Signed-off-by: Daniel Ziegenberg <daniel@ziegenberg.at>
2024-03-25 16:21:45 +01:00
Sara Arjona
4b5f957743
Merge branch 'MDL-81007-master' of https://github.com/jleyva/moodle 2024-03-14 10:37:43 +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
Juan Leyva
b4b9749417 MDL-81007 tool_policy: Allow adding notes to policies acceptances 2024-02-23 11:28:33 +01:00
Juan Leyva
8dfef80c0e MDL-81007 tool_policy: Allow acceptance/decline of non-current policies 2024-02-22 17:57:53 +01:00
Juan Leyva
f8f04b6f63 MDL-81007 tool_policy: Return permissions per policy 2024-02-22 17:14:05 +01:00
Mark Johnson
c6d4066201
MDL-78994 tool_policy: Move guest consent to start of page.
When a site has policies but a user has not logged in, a banner is
displayed to inform the guest user of the polciies. This banner was
inserted by Javascript at the end of the DOM, so keyboard users had to
tab through the whole page to reach it.

This commit makes the following changes:
* Change the callback used to display the policy banner from
_before_standard_html_head to _before_standard_top_of_body_html.
* Define the banner's body text in an HTML element, rather than a
Javascript parameter.
* Set absolute positioning on the banner for behat sites, so it does not
display at the top of the page and overlap the site header.
* Revert use of the standard_head_html_prepend hook in tool_policy from
MDL-79076.

The combination of these changes means that the banner will be output
near the start of the HTML DOM, so will be accessible to keyboard users
early on in the tab order until dismissed. However, it will still appear
visually at the end of the page, to avoid clashing with the site header.
2024-02-20 13:38:51 +00:00
Jun Pataleta
245edd9a11
Merge branch 'MDL-73008-master' of https://github.com/jleyva/moodle 2024-01-29 14:42:08 +08:00
Mikel Martín
a198884333 MDL-80259 theme_boost: Refactor badge helper classes for Bootstrap 5 2024-01-23 08:27:23 +01:00
Marina Glancy
e9abb3a5de MDL-79076 output: convert callback before_standard_html_head 2024-01-15 15:33:42 +00:00
Juan Leyva
40734d5afc MDL-73008 tool_policy: Bump version for WS 2023-12-05 10:28:29 +01:00
Juan Leyva
6b2806e745 MDL-73008 tool_policy: New WS to set user acceptances 2023-12-05 10:27:31 +01:00
Juan Leyva
7d7ab3aa1c MDL-73008 tool_policy: New WS to retrieve user acceptances 2023-12-05 10:27:31 +01:00
Andrew Nicols
525212f2d2
MDL-78496 core: Address phpcs issues with upgrade.php files 2023-11-19 21:20:53 +08:00
Andrew Nicols
545b36cd4a
MDL-78496 upgrade: remove all the < 4.1.0 upgrade steps
Also includes an upgrade step to prevent upgrading from any
version < 2021112802 (v4.1.0) as anti-cheating measure.
2023-11-17 23:25:36 +08:00
Jun Pataleta
9beff03a96
MDL-79626 upgrade: add the 4.3.0 separation line to all upgrade scripts 2023-10-10 10:44:17 +08:00
Jun Pataleta
94bc2cd38b
MDL-79551 versions: bump all versions and requires near release 2023-10-04 13:57:17 +08:00
Andrew Nicols
48bc688ccd
MDL-78324 core: Convert modals to use new static methods
This commit takes all modals which were not using the legacy
ModalFactory.create triggers and migrates them to the new Modal.create
method.
2023-09-09 00:04:11 +08:00
Michael Hawkins
b50d0532e5
MDL-78763 tool_policy: Initialise returnurl as a moodle_url in viewall 2023-08-10 18:31:50 +07:00
Lior Gil
f92437428e MDL-76629 core_table: add sticky column option 2023-06-19 12:46:29 +03:00
Simey Lameze
2367bc9ff6 MDL-69231 behat: remaining work for role capability generator
This commit does few things:
* Unify data generators usage to role short name.
* Replace remaining manual steps to use the new data generator.
* Also replaced other manual steps to set config to use data generators.
* Tidy up of some tests, aligning pipes and splitting one line steps into multiple lines.
* Fixes tests to have one Given/When/Then per scenario.
2023-06-02 12:47:27 +08:00
Andrew Nicols
aa2fc4048e MDL-69231 behat: Update tests to use new generator 2023-06-02 12:47:27 +08:00
Jake Dallimore
78a4999ddf Merge branch 'MDL-78023' of https://github.com/paulholden/moodle 2023-05-03 16:15:29 +08:00
Paul Holden
99daf499c7
MDL-78023 tool_policy: cast timemodified column on table download. 2023-04-25 14:48:38 +01:00
Jun Pataleta
9095bb0ef9 MDL-78000 upgrade: add the 4.2.0 separation line to all upgrade scripts 2023-04-22 23:17:50 +08: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
Mikel Martín
9191edb72f MDL-77691 behat: Add step to navigate to profile page directly 2023-03-20 14:18:33 +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
Jun Pataleta
85718f00d8 Merge branch 'MDL-77416-master-enfix' of https://github.com/vmdef/moodle 2023-03-08 08:50:30 +08:00
Meirza
e2d5d50276 MDL-77336 admin: 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-03-06 16:44:06 +07:00
Víctor Déniz
6a9f78b0e7 MDL-77416 lang: Use fixed strings in tests 2023-03-03 14:15:30 +00:00