-
Bug
-
Resolution: Fixed
-
Minor
-
2.7.4
-
MOODLE_27_STABLE
-
MOODLE_27_STABLE
-
Easy
-
This is another problem I found testing https://github.com/timhunt/moodle-quizaccess_offlinemode in 2.7
The answer is a selective backport of another bit of MDL-43835. If you look at the change there (https://github.com/moodle/moodle/commit/955118d831c31df145d238a68758009406c062cd) it seems like a backwards-incompatible change, changing selects from checking the value="" to checking the human-readable text. However, that is not true.
You need to look more deeply at the code: https://github.com/moodle/moodle/blob/146c80d33818f22e5689d38abb4e08c64fa6bf62/lib/behat/form_field/behat_form_select.php#L201 you will see that it is already trying to match either the human-readable value, or the behind-the scenes value="" attribute. Note the two calls get_selected_options(true / false);
So, this is just a straight bug, get_selected_options(true); was returning the wrong result, and back-porting the fix to that but is safe.
As a verification, you can run one of the tests modified in that commit (e.g. grade/tests/behat/grade_point_maximum.feature which exists in 2.7) in unmodified form, and it still passes.
- has been marked as being related by
-
MDL-48859 Back-port a useful step from MDL-43835
-
- Closed
-