3643 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
Jun Pataleta
3f1f6192ea
Merge branch 'MDL-81355-404' of https://github.com/lameze/moodle into MOODLE_404_STABLE 2024-06-12 10:38:11 +08:00
Michael Aherne
bf51502049 MDL-81355 phpdoc: Fix incorrect phpdocs on block_base. 2024-06-12 10:32:42 +08: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
Sara Arjona
e56c732209
MDL-82009 course: Course blocks should be displayed in section page too 2024-05-31 15:16:55 +02:00
Sara Arjona
48c064505e
Merge branch 'MDL-81632-404' of https://github.com/paulholden/moodle into MOODLE_404_STABLE 2024-04-30 15:09:34 +02:00
Paul Holden
dd88b540c2
MDL-81632 block_recentlyaccesseditems: deterministic item ordering.
Behat tests of this functionality could trigger the unlikely (in real
world usage) scenario where a user has an identical "timeaccess" value
for multiple course activities.

This led to random failures in said tests when the DB ordered items in
apparently random order, where the "timeaccess" value was equal.
2024-04-24 20:57:36 +01: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
Jun Pataleta
f17285be09
MDL-70829 block_recentlyaccesseditems: Move listitem role out of <a>
* Axe DevTools flags an error on the recently accessed items block that
the listitem role is not allowed for <a> tags. This is because the
"listitem" role will override the native semantic meaning of the course
links. So the solution is to move the course links within a <div> tag
with the listitem role instead.
2024-04-12 11:21:03 +08:00
Jun Pataleta
91837d0553
MDL-70829 course: Mark up decorative images properly
* Decorative images should have an empty alt text and there's no need
to set a presentation role.
* Accessibility Behat tests added to cover the changes:
  - block_starredcourses uses the core_course/no-courses template
  - core_completion tests changes in core_course/activity instance and
    core_course/editdefaultcompletion
2024-04-12 10:42:10 +08:00
Jun Pataleta
eb38033024
MDL-70829 block_recentlyaccesseditems: Mark up decorative image properly
* The zero state image is purely decorative so there's no need to
set a non-empty alt text for it.
* The presentation role is also unnecessary for decorative image with
empty alt.
* Accessibility Behat tests added to cover changes
2024-04-12 10:42:10 +08:00
Jun Pataleta
cfcf79499b
MDL-70829 block_myoverview: Mark up decorative image properly
* The zero state image is purely decorative so there's no need to
set a non-empty alt text for it.
* The presentation role is also unnecessary for decorative image with
empty alt.
* Accessibility Behat tests added to cover changes
2024-04-12 10:42:10 +08:00
Ilya Tregubov
b47c590e10 Merge branch 'MDL-78370-main' of https://github.com/junpataleta/moodle 2024-04-04 14:17:15 +08:00
Mikel Martín
b28f3b7666 MDL-80397 theme: Refactor card-deck class dropped in BS5
- Refactor recentlyaccessedcourses, starredcourses and myovervew blocks
  removing card-deck helper class occurrences
- Refactor card-deck helper class occurrences with utility classes
2024-03-27 10:10:22 +01:00
Daniel Ziegenberg
87267da39d
MDL-81281 phpunit: assertObjectNotHasAttribute is deprecated
To be integrated as part of MDL-81266

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

So we replace all instances of assertObjectNotHasAttribute with
assertObjectNotHasProperty.

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:07 +01:00
Sara Arjona
1e1d6d8be8
Merge branch 'MDL-71734' of https://github.com/paulholden/moodle 2024-03-21 16:11:40 +01:00
Paul Holden
011619dbd3
MDL-71734 lang: final removal of deprecated 400 strings. 2024-03-21 09:44:15 +00:00
Jun Pataleta
9573a6f9c1
Merge branch 'MDL-79007_main' of https://github.com/marxjohnson/moodle 2024-03-20 10:45:14 +08:00
Huong Nguyen
52c481318a MDL-77255 block_tag_flickr: Update to match with the new API
Flickr dropped php_serial format, we need to change to JSON format
2024-03-19 10:14:18 +07: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
Sara Arjona
9c444cefc6
Merge branch 'MDL-79027' of https://github.com/paulholden/moodle 2024-03-11 17:26:47 +01: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
Sara Arjona
763591fad0
Merge branch 'MDL-81089-master' of https://github.com/jleyva/moodle 2024-03-07 17:54:52 +01:00
Paul Holden
04b52b043c
Merge branch 'MDL-80703' of https://github.com/Chocolate-lightning/moodle into main 2024-03-07 16:52:00 +00:00
Juan Leyva
1e87c997df MDL-81089 block_recentlyaccesseditems: Return module branded 2024-03-07 17:32:37 +01: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
Mathew May
2f0247643f MDL-80703 block_calendar_upcoming: Final deprecation upcoming content 2024-03-06 15:40:29 +08:00
Ilya Tregubov
dcc9324b68 Merge branch 'MDL-78850-main' of https://github.com/meirzamoodle/moodle 2024-03-05 11:23:17 +08:00
Huong Nguyen
5a7caff558 Merge branch 'MDL-80866-main' of https://github.com/sarjona/moodle 2024-03-05 09:05:50 +07:00
Paul Holden
1488a71d90
MDL-79027 block_myoverview: retrieve only course related custom fields. 2024-03-04 10:39:08 +00:00
Sara Arjona
b2e5f3e746
MDL-80866 phpunit: Fix failures after disabling Chat and Survey 2024-03-01 11:41:50 +01:00
Sara Arjona
0b3b739370
MDL-80866 behat: Fix failures after disabling Chat and Survey 2024-03-01 11:41:50 +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
Jun Pataleta
e0ef590b00
MDL-78370 block_myoverview: Ensure curry functions use current filters 2024-02-20 13:48:24 +08:00
Jun Pataleta
8c26445d8d
MDL-78370 block_myoverview: Conditionally show "All" paging option
To minimise performance issues when displaying courses in Summary view,
we need to conditionally show the "All" paging option. This commit
will prevent the "All" paging option to be shown if there are more than
100 courses to be shown.
2024-02-20 13:48:24 +08:00
Jun Pataleta
3056f6cdbd
MDL-78370 block_myoverview: Ensure that the summary text will be loaded
* With the summary data being excluded in card/list display modes,
it means that switching to the summary display mode will render the
courses in summary view without the summary text. This patch will ensure
that course summary text are included when switching to the summary
view.
2024-02-20 13:48:23 +08:00
Jun Pataleta
40c329064b
MDL-78370 block_myoverview: Define required fields for views
* For list and card views, we only need the course
fields ('id', 'fullname', 'shortname', 'showcoursecategory',
'showshortname', 'visible', and 'enddate').
* For summary view, in addition to the fields from list/card views,
we only need the 'summary' and 'summaryformat'.
2024-02-20 13:48:23 +08:00
Sara Arjona
8cdd62ca88
MDL-78284 theme: Add new interactive content and update styles 2024-02-15 17:49:43 +01:00
Sara Arjona
1ea31db81c
MDL-80249 course: Hide secondary menu and add breadcrumb to section page 2024-02-14 08:03:56 +01:00
meirzamoodle
4cae44dd0e MDL-78300 block: Determine if users can comment based on context 2024-02-07 02:34:19 +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
Huong Nguyen
f888a1200f Merge branch 'MDL-80532' of https://github.com/paulholden/moodle 2024-01-22 15:38:51 +07:00