1805 Commits

Author SHA1 Message Date
Andrew Nicols
1d753e37af
Merge branch 'MDL-81644-404-new' of https://github.com/meirzamoodle/moodle into MOODLE_404_STABLE 2024-06-18 23:25:33 +08:00
Eloy Lafuente (stronk7)
091b458c52
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 12:18:05 +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
Meirza
821f2a390c 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:45:24 +07:00
Stevani Andolo
891e9994b4
MDL-81412 calendar: Sanitise calendar event names 2024-06-06 22:05:53 +08:00
Huong Nguyen
7ac2d7f598
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:21:22 +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
Harry Smith
944be2dd21 MDL-80793 calendar: Setup $USER with all fields 2024-02-28 10:36:21 +13:00
Neill Magill
6ff5e7aabd MDL-77965 unit tests: Add covers annotation 2024-02-23 09:32:07 +00:00
Neill Magill
18a964324b MDL-77965 calendar: Improve performance of data extract
The UNION caused the query to be run in a way that is very
inefficient on MySQL, separating the queries causes each of them to
run in a much more efficient form.

Any duplicated will be filtered out on the PHP side instead of in
the database. On large Moodle sites this is preferable as the
extract is likely to be performed on a server dedicated to running
the Moodle cron and so there will be less of effect on resources
that are used to serve end users.
2024-02-23 09:32:06 +00:00
Sara Arjona
8cdd62ca88
MDL-78284 theme: Add new interactive content and update styles 2024-02-15 17:49:43 +01:00
Paul Holden
24b5e80365
MDL-80692 calendar: calculate today relative to users own timezone.
Co-authored-by: Archil Abuladze <armiworker@gmail.com>
2024-01-30 14:37:43 +00:00
Huong Nguyen
66d39e9723 Merge branch 'MDL-79701-main' of https://github.com/rjnl/moodle 2024-01-17 14:07:59 +07:00
Sara Arjona
502e1a8329
Merge branch 'MDL-71732' of https://github.com/paulholden/moodle 2024-01-10 17:00:02 +01:00
Rajneel Totaram
dba4cd4511 MDL-79701 block_calendar_upcoming: Display activity name in tooltip 2024-01-05 07:15:17 +12:00
Paul Holden
b98fd96084
MDL-71733 behat: final removal of deprecated 400 step definitions. 2024-01-04 12:43:52 +00:00
Huong Nguyen
a529ee94b3 MDL-80151 behat: Improve viewing site calendar step 2023-12-20 16:31:00 +08:00
Simey Lameze
2321dc3396 MDL-80151 behat: add calendar step to navigate to specific view 2023-12-18 16:10:11 +08:00
Paul Holden
a5f4a725b8
MDL-71732 core: final removal of deprecated 400 methods. 2023-11-28 09:16:07 +00:00
Jun Pataleta
7ad1f922f3
MDL-77651 calendar: Hide left/right arrow characters
* Hide the arrow characters for the calendar templates so they won't be
read out by screen readers and avoid confusion for screen reader users.
2023-10-17 23:51:24 +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
e02ea67301
Merge branch 'MDL-77891-master' of https://github.com/snake/moodle 2023-09-27 23:50:32 +08:00
Sara Arjona
346fe1f78a
Merge branch 'MDL-79432-master' of https://github.com/junpataleta/moodle 2023-09-27 10:22:21 +02:00
Ilya Tregubov
386f29a46d
Merge branch 'MDL-77708-master' of https://github.com/sarjona/moodle 2023-09-27 09:07:10 +08:00
Sara Arjona
cc9430929d
MDL-77708 docs: Update references from docs.moodle.org/dev 2023-09-26 10:30:19 +02:00
Jun Pataleta
54226e8157
MDL-79432 calendar: Deprecate unused functions
* calendar_get_link_previous() and calendar_get_link_next() are no
longer used anywhere except from the already deprecated
calendar_top_controls() so we should deprecate these as well.
2023-09-20 15:39:46 +02:00
Jake Dallimore
38668033ff
MDL-77891 core_calendar: support display of mod iconurl
This affects:
- event_item.mustache (day view)
- event_icon.mustache (used by month_mini and month_mini and
month_detailed templates)
2023-09-20 17:03:08 +08:00
Huong Nguyen
2bc1598138
MDL-79400 Calendar: Use catch() for native Promise 2023-09-19 09:10:45 +07:00
Huong Nguyen
0f1a65723f
Merge branch 'MDL-79313-master' of https://github.com/junpataleta/moodle 2023-09-15 16:54:09 +08:00
Ilya Tregubov
94c9ce0595
Merge branch 'MDL-78806-master' of https://github.com/junpataleta/moodle 2023-09-13 10:54:54 +08:00