Before Moodle 4.3, config_plugins settings for qbank_columnsortorder
(disabledcol, enabledcol) had a value like
qbank_statistics\columns\facility_index,
qbank_statistics\columns\discriminative_efficiency, ...
In Moodle 4.3, the values are stored as
qbank_statistics\columns\facility_index-facility_index.
So updating the old values to match the new format.
After discussing it in the issue, we have agreed to apply
the new phpunit_util::normalise_line_endings() method to
all the remaining cases (within tests!) where the manual
replacement was being done. This commits achieves that.
Note that I've looked for both str_replace() and preg_replace()
cases, but only the former had cases worth converting. All the
later ones are different and cannot be replaced by the new
utility method.
Users can now rearrange options using the move buttons that each option
have, therefore there is no need for the current unintuitive keyboard
interaction implementation in the ordering question type plugin.
Each option has a couple of buttons to move the option's position. This
allows moving options by single pointer without dragging to address WCAG
Success Criterion 2.5.7.
Having the buttons also addresses WCAG Success Criterion 2.1.1 as it
provides an intuitive way to move options using keyboard.
Fixes the failing unit tests in the ordering question type by
implementing the following adjustments and corrections:
- Ensure the missing required files are imported in
questionhint_test.php and questiontype_test.php.
- Modify the expected fraction values in testexport.moodle.xml to
accurately reflect the recent changes, specifically the type
casting of the fraction value stored for each answer into the
question object.
- Reorder the items in the answers array within the failing scenario
in specific_grade_detail_feedback_test.php to guarantee that, in
accordance with the randomly generated subset of correct answers,
the question attempt will consistently be incorrect as required.
- Pass the answer codes in the order of the defined response when
calling the process_submission() function in feedback_test.php
to ensure the response in the current question attempt is properly
set, rather than relying on random generation of the response which
may result in random test failures.
When retrieving the answer data from the database, it's essential to
cast the value of the answer's fraction to a float before storing it
into the question object. This step is crucial for ensuring consistency,
as some database engines return floats as strings like '1.0000000'.
The implementation of the check_file_access() method needs to be added
in the qtype_ordering_question class in order to ensure the users have
the appropriate access rights to a particular file.