mirror of
https://github.com/moodle/moodle.git
synced 2025-01-17 13:38:32 +01:00
049bff63bc
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.