mirror of
https://github.com/moodle/moodle.git
synced 2025-08-06 01:16:44 +02:00
Merge branch 'MDL-31532_22' of git://github.com/stronk7/moodle into MOODLE_22_STABLE
This commit is contained in:
commit
cf6fa5025d
1 changed files with 6 additions and 0 deletions
|
@ -1124,6 +1124,12 @@ class restore_course_structure_step extends restore_structure_step {
|
|||
unset($data->idnumber);
|
||||
}
|
||||
|
||||
// Any empty value for course->hiddensections will lead to 0 (default, show collapsed).
|
||||
// It has been reported that some old 1.9 courses may have it null leading to DB error. MDL-31532
|
||||
if (empty($data->hiddensections)) {
|
||||
$data->hiddensections = 0;
|
||||
}
|
||||
|
||||
// Only restrict modules if original course was and target site too for new courses
|
||||
$data->restrictmodules = $data->restrictmodules && !empty($CFG->restrictmodulesfor) && $CFG->restrictmodulesfor == 'all';
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue