To be integrated as part of MDL-81266
When running PHPUnit 9.6 we get the following deprecation warnings:
"assertObjectHasAttribute() is deprecated and will be removed in PHPUnit
10. Refactor your test to use assertObjectHasProperty() instead."
So we replace all instances of assertObjectHasAttribute with
assertObjectHasProperty.
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>
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.
We need to pick the latest 'ready' version of each question
(not questions where the latest version is ready).
There are test of the behaviour of random_question_loader, and
then a test in the quiz to prove it works in use.
As part of implementing this, there is a new more efficient method
get_version_information_for_questions_in_attempt to see if any
questions in a quiz need to be updated. The regrade code was updated
to take advantage of this.
Co-authored-by: Khoa Nguyen Dang <khoanguyend7@nashtechglobal.com>
- Replace .form-inline Bootstrap helper class with .d-flex.flex-wrap.align-items-center
- Refactor .form-inline occurrences in SCSS files or remove when unneeded
- 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.
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.
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.
* forcing new generated sets of wildcard values into the question edit form so they can be saved.
* added Behat test to check new generated values are used.