mirror of
https://github.com/moodle/moodle.git
synced 2025-03-24 09:30:17 +01:00
Though it's really rare for this to happen (it only was discovered when running unit tests with Oracle), it's possible to get problems restoring courses when context ids in the backup file do match existing contexts in the restore target site in certain ways (see the issue for more information). This change just ensures that every call to the method (that happens 4 times, for sys, coursecat, course and module levels): prechek_precheck_qbanks_by_level() Is processed always for that level. Before the patch it was possible (hardly but possible) to return question categories belonging to another level when some qcats contexts were matching between the backup file and the target site.