Eloy Lafuente (stronk7) c3a89cc550 MDL-72950 restore: Avoid qcat conflicts with matching contexts
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.
2021-11-05 18:52:18 +01:00
..