The comboboxsearch component now has uses beyond the grade subcomponent
and includes alternative step definitions in behat_general.php. This
change deprecates the redundant behat step definitions related to this
component in behat_grade.php and replaces current usages with the
alternative definitions.
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.
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).
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.
* 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
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).
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.
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.
In MDL-78744, when the overallcompletion state was added to be displayed
in the activity card, only COMPLETE/INCOMPLETE status were considered.
However, depending on the activity completion settings, there are a
couple of states more that should also be included (COMPLETE_FAIL and
COMPLETE_PASS).
A new method has been added to the cm_completion_details class to
calculate whether a module should be considered or not completed,
based on their completion options and the current value for the
overall complete state.
Júlia, from the PX team, has suggested a few improvements to make it easier to
understand the Restore main page:
- Displaying a notification instead of the empty table when there are no files
in an area.
- Improve the copy, removing the help buttons and moving this information to the
main page.
- Replacing "Import a backup file" with "Upload a backup file".
- Adding some space between the different areas.
- Displaying a different text in the different "Manage backup files" buttons.
The UX team confirmed that an activity shouldn't be considered completed
when the criteria use a passing grade and the user gets a failing grade.
So the COMPLETION_COMPLETE_FAIL status won't be considered
completed from now on.