Plus:
* On the attempts report pages, the "Regrade selected attempts"
and "Delete selected attempts" buttons are now only enabled when
there's at least one item selected.
* Behat fixes for quiz edit feature after this patch
When some activities are manually completed by students, some are still showing in students' timeline.
This commit fix that for module assign,chat,choice,feedback,lesson,quiz,scorm and workshop.
Behat backgrounds and scenarios must observe the new
interdependencies between quiz completion settings.
This commits just applies that to the tests missing it.
There are some mod_quiz generator issues where the new chain
of dependencies between completion settings was not being observed.
This patch just ensures that the now 3 chained settings are
enabled together (or new quiz options logic will proceed to
disable them).
Before this fix, test_repeated_usage_saving_new_usage was failing but
test_repeated_usage_saving_existing_usage was passing. Now the
behaviour is consistent and they both pass.
The background is for set up, the scenario is for the test. Logging in
to start the test is the start of the test and the end of the background
itself.
Namely:
- 3rd param of assertEquals() cannot be null.
- Some incorrect uses of assertNotEmpty().
- Comparing 2 strings now uses strict (===) evaluation.
Link: https://github.com/sebastianbergmann/phpunit/issues/3185
Solution here is one of:
a) Return to the previous situation, making the comparison
softer. That can achieved by forcing different types, so
float == string works.
b) Changing APIs (both forms and database return strings) to
perform some conversion to floats. That would make float
comparison (with floats or strings) to work too.
The patch here follows the a) approach. Changing all the internals
for proper float handling sounds excesive when it has been working
perfectly since ever. So we went the easier route, just getting
rid of the new === comparisons when needed by changing expectation
types to float.
As agreed in MDL-63186, the English language pack has no space
separating the number and the percents. This patch removes the
regressions from the unit tests.
If javascript is disabled, we don't need to open the menus at all. If it is enabled
we should use the custom step where possible.
In some tests (user profile) we have to use link_or_button because
the element that opens the menu will be a link or a button in different themes.