-
Bug
-
Resolution: Fixed
-
Minor
-
3.5.16, 3.8.7, 3.9.4, 3.10.1, 3.11, 4.0
-
MOODLE_310_STABLE, MOODLE_311_STABLE, MOODLE_35_STABLE, MOODLE_38_STABLE, MOODLE_39_STABLE, MOODLE_400_STABLE
-
MOODLE_310_STABLE, MOODLE_39_STABLE
-
- Unit tests cover this.
-
0
-
Internationals - 3.11 Sprint 8, Internationals - 3.11 Sprint 9
This comes from MDL-46960, more exactly about this change performed by one of the commits there:
By joining the $usecache and $wholecourse conditions together, the method behavior changed dramatically and, since then, instead of running the "wholecourse" code, we are running the "simple" code. No apparent explanation about that change was found in code or tracker comments, so a question was raised there.
Because of bogus unit tests covering that function... everything continued passing and only when some changes in phpunit were being worked (no issue yet, it's about phpunit9), is when tests started to fail.
So this issue is about:
1) split the $usecache and $wholecourse conditions if needed.
2) ensure that the behavior is the correct one for all combinations of them.
3) cover all behaviors with tests (mocked or no), so they become fixed 100% (in tests we trust).
Ciao