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.
* added calculated question for multiplication to tests/helper.php.
* added test_grading_of_negative_responses() test to question/type/calculated/tests/question_test.php
It should always be the case that a question category and its parent
category belong to the same context. However, over the years, we have
observed that this becomes violated by some data in some Moodle sites.
(The suspicion is that this is a backup/restor bug of some sort which
has never been tracked down.)
Since this happens, we should make the code robust to it, which is what
this change does. It ensure that when loading child categories, we only
consider ones in the same context.
grunt-jsdoc is abandoned and only works with an older version of jsdoc.
This is a very simple wrapper around jsdoc itself.
This commit also includes a fix for broken docs.
Most params are formally deprecated here. This was originally planned
for MDL-80042, but I realised that having an emit, and final param is a
very useful option going forward.
This patch also moves the is_deprecated(), and related methods to the
\core\deprecated attribute.
The placeholders for the hints are properly replaced by this change and any formulas present are replaced.
The validation is performed by the existing function qtype_calculated_find_formula_errors(),
which is called by the calculate() function,
which in turn is called by the variable substituter "vs" using the replace_expressions_in_text() function.
vs -> replace_expressions_in_text() -> calculate() -> qtype_calculated_find_formula_errors().