442 Commits

Author SHA1 Message Date
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)
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
Sara Arjona
cb72a08193
MDL-81872 course: Improve the summary page for reset 2024-05-27 16:18:54 +02:00
Sara Arjona
22cc975705
MDL-81872 course: Improve wording and workflow for reset 2024-05-27 16:18:54 +02:00
Sara Arjona
dd5a82ede7
MDL-81872 book: Fix coding style 2024-05-27 09:23:25 +02:00
Andrew Nicols
0964cd5b69
MDL-81125 core: Update upgrade.txt files to document new upgrade notes 2024-05-20 22:26:45 +08: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
Sara Arjona
2cfb5b8efe
MDL-81326 mod_book: Deprecate book_get_nav_classes
While reviewing MDL-72376, I realised book_get_nav_classes is not
used anymore in Moodle LMS since Moodle 4.0 so it should be deprecated
Probably it should have been deprecated together with book_get_nav_types.
2024-04-02 17:11:23 +02:00
Paul Holden
33636dc66d
MDL-72376 mod_book: final removal of deprecated navigation method. 2024-03-20 23:49:01 +00:00
Jun Pataleta
3278ce7aba
Merge branch 'MDL-65292' of https://github.com/stronk7/moodle 2024-03-08 08:00:41 +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
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
Huong Nguyen
0d8c9ed4ae
Merge branch 'MDL-78284-main' of https://github.com/sarjona/moodle 2024-02-21 09:49:41 +07:00
Sara Arjona
307ec03056
Merge branch 'MDL-80383-main' of https://github.com/rjnl/moodle 2024-02-20 15:20:00 +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
Paul Holden
27ca0daf87
MDL-79788 tag: convert module creation of tags to generators.
We don't need to use the tags UI directly for creating tags in module
scenarios, because it's slow and prone to error in case of interface
changes.
2024-02-08 16:31:02 +00:00
Rajneel Totaram
a2bb81a4be MDL-80383 mod_book: Make book content use full width on small screens 2024-01-08 15:36:39 +12: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
Sara Arjona
3079511dc7
NOBUG: Fixed SVG browser compatibility 2023-09-15 17:33:23 +02:00
Huong Nguyen
50a74f6a2d
Merge branch 'MDL-67271-master' of https://github.com/sarjona/moodle 2023-09-13 11:15:22 +07:00
Amaia Anabitarte
b87b72195c MDL-78527 core_completion: Fixing tests 2023-09-12 15:43:49 +02:00
Sara Arjona
87589e07fc
MDL-67271 pix: Add missing SVG files
The absence of SVG files has been addressed by including them,
sourced from the respective FontAwesome versions available for
download at https://fontawesome.com/icons
2023-09-12 10:54:15 +02:00
Sara Arjona
9cece94b69
Merge branch 'MDL-76982-master' of https://github.com/rjnl/moodle 2023-08-23 22:15:42 +08:00
Sara Arjona
07736ae9b7
MDL-78884 pix: Reduce MIME type icons, replacing them
In order to reduce the number of icons for the MIME types, a few
icons have been removed and replaced with their generic from
the existing ones:
- avi -> video
- base -> database
- bmp -> image
- html -> markup
- jpeg -> image
- mov -> video
- mp3 -> audio
- mpeg -> video
- png -> image
- quicktime -> video
- tiff -> image
- wav -> audio
- wmv -> video
2023-08-23 07:32:47 +02:00
Rajneel Totaram
ff186194c9 MDL-76982 mod_book: Flip chapter navigation icons in RTL languages 2023-08-18 18:53:10 +12:00
Rajneel Totaram
e6316d5285 MDL-76982 mod_book: Remove unused styles 2023-08-18 18:53:10 +12:00
Rajneel Totaram
bfea7da668 MDL-76982 mod_book: Make previous/next buttons sticky 2023-08-18 18:53:10 +12:00
David Mudrák
b407af725f MDL-73464 book: Scroll to chapter top when navigating through the book
When navigating to the next / previous chapter, the chapter should be
the page element that gets the user's attention and focus. Its title
should be displayed at the prominent top page area without the need to
scroll to it all the time.
2023-05-24 14:32:45 +08:00
Ilya Tregubov
1ff7767b70
Merge branch 'MDL-78152' of https://github.com/paulholden/moodle 2023-05-17 15:06:45 +08:00
Laurent David
e489ae2492 MDL-76903 mod_book: Fix activity completion
* Check only visibles pages to set completion status.
* Make sure we have consistent completion value in API and on the view page.
2023-05-11 11:47:18 +02:00
Paul Holden
1d66c4cbfb
MDL-78152 mod_book: set permissions required for page editing. 2023-05-09 11:51: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
Marina Glancy
8fc1486d36 MDL-77164 various: fix incorrect phpdocs 2023-04-13 11:35:06 +01:00
Mathew May
e5ca7766e7 MDL-52805 core: Remove legacy log calls 2023-03-07 13:08:46 +08:00
Angelia Dela Cruz
710607ce5f MDL-75830 behat: Book behat tests optimised
Replace steps that manually add Book instances via the UI and use
Behat generators. This improves the speed of the Behat test runs.
Additionally, performed Behat cleanup and optimisation to affected
files.
2023-02-02 09:08:09 +08:00
Andrew Nicols
a3cc26f8bb MDL-76583 core: Update uses of external_* classes 2023-01-19 07:34:09 +08:00
Ilya Tregubov
05535e38df Merge branch 'MDL-76497-master' of https://github.com/junpataleta/moodle 2022-12-01 08:56:09 +03:00
Marina Glancy
a800e7e62f MDL-74853 various: add second parameter to htmlentities functions
Default value of the $flag argument changed in PHP 8.1 from ENT_COMPAT to ENT_QUOTES | ENT_SUBSTITUTE
To ensure consistent behavior across different PHP version the second parameter is now required for the functions:
htmlspecialchars(), htmlentities(), htmlspecialchars_decode(), html_entity_decode() and get_html_translation_table()
2022-11-28 16:12:20 +01:00
Jun Pataleta
c6ab792ddf MDL-76497 upgrade: add the 4.1.0 separation line to all upgrade scripts 2022-11-28 14:43:04 +08:00
Jun Pataleta
00bae8b8a4 MDL-76403 versions: bump all versions and requires near release 2022-11-23 09:45:23 +08:00
Andrew Nicols
903f04a320 Merge branch 'MDL-74608' of https://github.com/timhunt/moodle 2022-08-18 10:52:02 +08:00
Tim Hunt
8babdbd396 MDL-74608 activities: a new option to force the activity language
For a long time, Moodle has had the feature to force the language
for a whole course. This change adds the same feature at activity
level.

The course-level feature was controlled by a capability
moodle/course:setforcedlanguage, and I decided to use the same
capability to control this feature. I think a new capability would be
overkill.
2022-08-15 22:15:52 +01:00
Kevin Pham
c2167257c9 MDL-49795 mod_book: Add foreign key for course 2022-08-03 15:17:04 +10:00