mirror of
https://github.com/moodle/moodle.git
synced 2025-04-13 12:32:08 +02:00
MDL-61526 Questions: Fix creation of multiple TOP question categories
Backup files that are made from Moodle 3.5 already contain TOP categories. There is no need to create an additional TOP category for them.
This commit is contained in:
parent
856e07e4e7
commit
0f80f793df
@ -4409,8 +4409,7 @@ class restore_create_categories_and_questions extends restore_structure_step {
|
||||
if ($backuprelease < 3.5 || $backupbuild < 20180205) {
|
||||
$before35 = true;
|
||||
}
|
||||
if (empty($mapping->info->parent) &&
|
||||
($before35 || $mapping->info->contextlevel == CONTEXT_MODULE)) {
|
||||
if (empty($mapping->info->parent) && $before35) {
|
||||
$top = question_get_top_category($data->contextid, true);
|
||||
$data->parent = $top->id;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user