1
0
mirror of https://github.com/moodle/moodle.git synced 2025-02-16 22:05:13 +01:00

1828 Commits

Author SHA1 Message Date
Andrew Nicols
7bb9f136d2
MDL-81520 core: Fix test finality 2024-12-11 12:30:21 +08:00
Jun Pataleta
2cc40431cb
MDL-83412 core: Coding style fixes 2024-11-28 11:55:15 +08:00
Andrew Nicols
cdbc789fd8
MDL-83412 calendartype_gregorian: Use core_date
Update timestamp_to_date_string to use core_date.
2024-11-28 11:55:15 +08:00
Andrew Nicols
c370c0cc5e
MDL-81521 core: Update all possibly data providers to be static
Note: Some data providers could not be automatically be converted to
being static. These will be handled in a separate issue.
2024-11-15 12:50:44 +08:00
Jun Pataleta
f24e0ecf53
MDL-83309 versions: Bump all versions and requires near release 2024-10-02 17:04:53 +08:00
Huong Nguyen
dca18ebca3
Merge branch 'MDL-81634-main' of https://github.com/andrewnicols/moodle 2024-08-20 09:30:44 +07: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
Mikel Martín
0a03018116 MDL-75671 theme_boost: Refactor spacing classes for BS5
- Add SCSS code for spacing utility classes to the Boostrap 5 bridge SCSS file
- Replace all occurrences in the codebase (pr-1 > pe-1, ml-auto > ms-auto, ml-sm-3 > ms-sm-3, ...)
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
Paul Holden
ff9ba32030
MDL-81830 calendar: handle clearing of group type course element. 2024-07-29 09:20:44 +01:00
Jun Pataleta
cb8208ca77
Merge branch 'MDL-82505-main' of https://github.com/HuongNV13/moodle 2024-07-18 12:51:06 +08:00
Huong Nguyen
c124b23784
MDL-82505 calendar: more precise matching of calendar day partial
The partial name selector points to the parent element,
but the Javascript code monitors the child element.
We need to make it consistent
2024-07-18 11:38:13 +07:00
Huong Nguyen
04f8f11d35
MDL-81272 calendar: Improve permission check for separate group mode 2024-07-15 09:29:08 +07:00
Paul Holden
8a0d02d373
MDL-82326 calendar: correct course name formatting and shortening. 2024-06-27 17:41:28 +01:00
Sara Arjona
9e1eec783c
Merge branch 'MDL-82207' of https://github.com/stronk7/moodle 2024-06-26 12:27:19 +02:00
Sara Arjona
0bccb0b1e4
Merge branch 'MDL-80344' of https://github.com/paulholden/moodle 2024-06-26 12:11:11 +02:00
Meirza
d63aff3f51 MDL-81250 calendar: Use full course name as the course filter
Co-authored-by: Eduardo Domínguez <eduardo.dominguez@uib.es>
2024-06-25 16:35:38 +07:00
Eloy Lafuente (stronk7)
ad5fe71868
MDL-82207 phpunit: fix various @covers annotations (take#1)
This fixes various (not all) wrong @covers annotations that
are reported as warnings by PHPUnit when it's run with
code-coverage enabled.

When possible, the preferred solution is to change to
@covers at class level, that is the recommended way.

If multiple classes are involved, then a mix of @coversDefaultClass
and @covers at method level are used (always trying to use the
minimum needed patch).

This is the first of a series of issues created as sub-tasks
of MDL-82142.
2024-06-24 12:07:39 +02:00
Huong Nguyen
ebae7fbae4
Merge branch 'MDL-81523' of https://github.com/stronk7/moodle 2024-06-19 09:52:10 +07:00
Andrew Nicols
36772d4c8e
Merge branch 'MDL-81644-main-new' of https://github.com/meirzamoodle/moodle 2024-06-18 23:13:55 +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
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
Meirza
b19b9cb8bf MDL-81644 calendar: The behaviour of event dates in the block calendar
There is a difference in the behaviour of the calendar block when it is on the calendar page and when it is not.
On the calendar page, when the user clicks on the date or link next/previous month or day name in the calendar block,
it will have the effect of changing the URL, which should not happen.

The patch also includes hiding popover after the user clicks the day number. When the user clicks on the date or
is focused on the date and then presses enter on the keyboard, the popover does not automatically close.
To fix this, I added an event type, "click", to be attached to the hidePopover function and added conditioning to
the target element when there was a "click" event.

An additional step was added to the Behat calendar for the click event to ease the testing process.

For the popover, I set the "animation" to false to avoid the random Behat failure caused by the slow animation.
2024-06-07 14:46:44 +07:00
Stevani Andolo
cd2d23d356
MDL-81412 calendar: Sanitise calendar event names 2024-06-06 21:54:46 +08:00
Paul Holden
d5316aeac6
MDL-80344 calendar: correct no subscriptions language string use.
Ensure expected parameters are present; avoid string concatenation.
2024-06-05 15:53:28 +01:00
Andrew Nicols
0964cd5b69
MDL-81125 core: Update upgrade.txt files to document new upgrade notes 2024-05-20 22:26:45 +08:00
Huong Nguyen
6bfdae885d
MDL-81530 editor_tiny: Better browsers compatibility
The TinyMCE.remove() function is killing other events on Firefox
We need to modify the setupForElementId() to make TinyMCE to
remove itself outside of the event loop
2024-05-07 14:23:03 +07:00
Huong Nguyen
d1514be1bc MDL-81247 calendar: Extra validation for webservices 2024-04-17 03:44:21 +00:00
Paul Holden
53e8a62003 MDL-81247 calendar: freeze event type if "user" only allowed. 2024-04-17 03:44:21 +00:00
Jun Pataleta
a180dba314
MDL-81549 versions: bump all versions and requires near release 2024-04-17 00:03:29 +08:00
Paul Holden
a64c272c4b
MDL-81358 calendar: avoid hard-coded English string concatenation. 2024-04-02 15:49:03 +01:00
Jun Pataleta
9573a6f9c1
Merge branch 'MDL-79007_main' of https://github.com/marxjohnson/moodle 2024-03-20 10:45:14 +08:00
Ilya Tregubov
3f57f25af0 Merge branch 'MDL-80793' of https://github.com/OxyOCE/moodle 2024-03-19 09:10:43 +08:00
Mark Johnson
a64446c2ad
MDL-79007 calendar: Make screen readers read the new month name 2024-03-18 11:25:46 +00:00
Mark Johnson
f419983b32
MDL-79007 calendar: Make screen readers read out calendar day popovers 2024-03-18 11:25:46 +00:00
Andrew Nicols
9cdc5850c5
Merge branch 'MDL-75952' of https://github.com/stronk7/moodle 2024-03-12 10:45:02 +08:00
Paul Holden
400227c0f4
MDL-73117 calendar: restore previously removed Behat step definition. 2024-03-11 12:09:27 +00:00
Paul Holden
ccc4647043
Merge branch 'MDL-73117' of https://github.com/Chocolate-lightning/moodle into main 2024-03-11 12:01:49 +00:00
Mathew May
3d301abcec MDL-73117 calendar: Final deprecation of threemonth_cal 2024-03-11 09:05:10 +08: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
Juan Leyva
d271925d56 MDL-81089 calendar: Return if module is branded 2024-03-07 17:32:37 +01:00
Ilya Tregubov
dcc9324b68 Merge branch 'MDL-78850-main' of https://github.com/meirzamoodle/moodle 2024-03-05 11:23:17 +08: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
4ce883ae21 MDL-75670 theme: Refactor form-group helper class dropped in BS5
- Replace .form-group Boostrap helper class with .mb-3. The .form-group class was only
adding margin bottom styles, so it is an straightforward change.
- Replace .form-group references in SCSS files with .fitem now .form-group has been removed.
- There were some other .form-group occurrences in the code that were using it not for styling
but incorrectly for managing some logic. These have been also replaced with .fitem or removed.
2024-02-29 13:55:37 +01:00
Meirza
edce8cca8b MDL-78850 calendar: course calendar improvement 2024-02-29 12:48:56 +07: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