1008 Commits

Author SHA1 Message Date
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
Jun Pataleta
8b976e77ce MDL-81616 upgrade: add the 4.4.0 separation line to all upgrade scripts 2024-04-23 15:24:02 +10:00
Jun Pataleta
a180dba314
MDL-81549 versions: bump all versions and requires near release 2024-04-17 00:03:29 +08:00
Sara Arjona
1f76843f25
MDL-81337 behat: Fix behat failures
A tooltip has been added to the + icons in between activities with the
same text as the "Add an activity or resource" button.
The easiest way to fix the behat failures is to click this
button in empty sections (that way, the button is unique).
2024-04-08 12:44:40 +02:00
Huong Nguyen
1320a2a397
Merge branch 'main_MDL-81172' of https://github.com/mattporritt/moodle 2024-03-28 11:46:51 +07: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
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
Jun Pataleta
3278ce7aba
Merge branch 'MDL-65292' of https://github.com/stronk7/moodle 2024-03-08 08:00:41 +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
Andrew Nicols
2ad6cd5291
Merge branch 'MDL-80646-main' of https://github.com/mihailges/moodle 2024-03-06 13:21:52 +08:00
Paul Holden
3ee5aa3012
Merge branch 'MDL-80914-main' of https://github.com/mihailges/moodle into main 2024-03-05 14:07:57 +00:00
Mihail Geshoski
4753cf3a36 MDL-80646 mod_lti: Enable key and secret configuration in legacy tools
When restoring a manually configured tool to a different site, the key
and secret are not being restored, which is an expected behaviour.
However, legacy (pre-4.3) manually configured tools do not have the
option to configure the key and secret, which makes these instances
unusable. To make sure these tools will continue working after a backup
and restore, we need to re-enable the key and secret fields in the
legacy instance settings form.
2024-03-05 13:23:02 +08:00
Mihail Geshoski
f61a764d16 MDL-80914 mod_lti: Custom parameter configuration in the instance form
Re-enables the configuration of custom parameters when creating or
modifying a tool instance in a course.
2024-03-05 10:13:51 +08: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
Huong Nguyen
3d36a37499
NOBUG: Fixed SVG browser compatibility 2024-02-23 08:37:37 +07:00
Sara Arjona
8cdd62ca88
MDL-78284 theme: Add new interactive content and update styles 2024-02-15 17:49:43 +01:00
Sara Arjona
10f8e19f40
MDL-78284 mod: Replace activity icons with the new SVGs
The old monocromo.png activity icon files have been removed and
replaced with the new SVG files created by the UX team.

Special thanks to Sabina Abellán! :-)
2024-02-15 17:49:41 +01:00
Sara Arjona
8b36abdb9d
Merge branch 'MDL-80259-main' of https://github.com/roland04/moodle 2024-01-24 09:16:12 +01:00
Mikel Martín
a198884333 MDL-80259 theme_boost: Refactor badge helper classes for Bootstrap 5 2024-01-23 08:27:23 +01:00
Jun Pataleta
10744550e6
Merge branch 'MDL-79029-main' of https://github.com/ferranrecio/moodle 2024-01-23 09:26:30 +08:00
Ferran Recio
f4adbc8a11 MDL-79029 behat: replace deprecated behat steps 2024-01-22 11:12:28 +01:00
Sara Arjona
e6f75b59a3
MDL-80248 course: Display only content for the General section 2024-01-19 12:03:36 +01:00
David Carrillo
10d2b5864b
MDL-80325 reportbuilder: Update 'Delete' links to red color
- Update all 'Delete' links on RB system report actions to red color
2024-01-12 15:38:19 +01:00
Paul Holden
7143cf4cbc
MDL-79397 reportbuilder: update existing entity table definitions. 2023-12-07 17:19:01 +00:00
Jun Pataleta
030def7a46
Merge branch 'MDL-80079-master' of https://github.com/andrewnicols/moodle 2023-12-06 21:59:47 +08: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
Andrew Nicols
dab4a2b66f
MDL-80079 core: Correct incorrect arg to format_string::$options 2023-11-14 22:28:55 +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
d5d7835a0a
MDL-79551 versions: Make CiBoT happy
* Use array short syntax for $plugin->dependencies
* Add trailing comma for multi-line $plugin->dependencies array
2023-10-04 14:04:29 +08:00
Jun Pataleta
94bc2cd38b
MDL-79551 versions: bump all versions and requires near release 2023-10-04 13:57:17 +08:00
Jun Pataleta
a24e9872ef
Merge branch 'MDL-79442-master' of https://github.com/snake/moodle 2023-09-26 11:48:31 +08:00
Huong Nguyen
b27f6b0eca
Merge branch 'MDL-79440-master' of https://github.com/snake/moodle 2023-09-25 14:56:49 +07:00
Jake Dallimore
72e867f9e6
MDL-79440 mod_lti: fix missing array key warning on LTI 2 edit
These fields only exist for LTI 1.1 and LTI 1.3 edits, so can be
ignored in LTI 2.0 edits. This change fixes this for the tool
type edit (edit_form) and for the tool instance form (mod_form).
2023-09-22 10:15:20 +08:00
Jake Dallimore
26d0ac156e
MDL-79442 mod_lti: launch container should inherit from tool config
Specifically in the case where multiple content items are returned, and
when we hit the content_item_to_form() method, ensure that content-item-
specific values do not influence the final value of launchcontainer,
which must use the value set in tool configuration.
2023-09-22 10:13:56 +08:00
Jun Pataleta
e2f900b2ad
Merge branch 'MDL-79323-master-enfix' of https://github.com/vmdef/moodle 2023-09-21 15:29:40 +02:00
Jun Pataleta
9c4435e874
Merge branch 'MDL-79423-master' of https://github.com/snake/moodle 2023-09-20 16:22:53 +02:00
Jake Dallimore
fa6928250e
MDL-79423 mod_lti: add tool state filtering to LTI tools report
The report should only include those tools which are fully configured,
per the LTI_TOOL_STATE_CONFIGURED constant.
2023-09-20 20:13:26 +08:00
Víctor Déniz
0b838f6977 MDL-79323 lang: Fix Behat tests regressions after merging en_fix strings 2023-09-19 13:42:10 +01:00
Helen Foster
13b7ea5d44 MDL-79323 lang: Import fixed English strings (en_fix) 2023-09-19 10:24:37 +01:00
Jake Dallimore
4476164613
MDL-79384 mod_lti: fix tool configuration details modal 2023-09-19 09:41:19 +08:00
Sara Arjona
3079511dc7
NOBUG: Fixed SVG browser compatibility 2023-09-15 17:33:23 +02:00
Jun Pataleta
4370887449
Merge branch 'MDL-78916-master' of https://github.com/junpataleta/moodle 2023-09-15 16:19:06 +08:00
Jake Dallimore
4464e46336
MDL-78916 mod_lti: deprecate and remove unused strings and files
These strings and files supported the old way of creating course-level
tools, which has now been fully replaced.
2023-09-15 10:47:10 +08:00
Jake Dallimore
f41a0dcacf
MDL-78916 mod_lti: remove delegate option for name and email sharing
These settings are no longer configurable on a per-instance basis, so
'delegate to teacher' needs to be removed from the options list for the
relevant fields in the tool type edit form. For existing tool types,
allow 'delegate to teacher' to continue to be used only if it's the
currently set value of these fields. If changed, it cannot be set again.
2023-09-15 10:47:10 +08:00
Jake Dallimore
3cabbfd00f
MDL-78916 mod_lti: update behat tests to test new instance form 2023-09-15 10:47:10 +08:00