mirror of
https://github.com/moodle/moodle.git
synced 2025-02-08 09:02:07 +01:00
MDL-28156 restore - fix some notices restoring empty courses
This commit is contained in:
parent
c8fbcaab1d
commit
438606fca3
@ -153,7 +153,9 @@ abstract class backup_general_helper extends backup_helper {
|
||||
$rolemappings->modified = false;
|
||||
$rolemappings->mappings = array();
|
||||
$info->role_mappings = $rolemappings;
|
||||
|
||||
// Some initially empty containers
|
||||
$info->sections = array();
|
||||
$info->activities = array();
|
||||
|
||||
// Now the contents
|
||||
$contentsarr = $infoarr['contents'];
|
||||
@ -164,7 +166,6 @@ abstract class backup_general_helper extends backup_helper {
|
||||
}
|
||||
if (isset($contentsarr['sections']) && isset($contentsarr['sections']['section'])) {
|
||||
$sectionarr = $contentsarr['sections']['section'];
|
||||
$sections = array();
|
||||
foreach ($sectionarr as $section) {
|
||||
$section = (object)$section;
|
||||
$section->settings = array();
|
||||
@ -174,7 +175,6 @@ abstract class backup_general_helper extends backup_helper {
|
||||
}
|
||||
if (isset($contentsarr['activities']) && isset($contentsarr['activities']['activity'])) {
|
||||
$activityarr = $contentsarr['activities']['activity'];
|
||||
$activities = array();
|
||||
foreach ($activityarr as $activity) {
|
||||
$activity = (object)$activity;
|
||||
$activity->settings = array();
|
||||
|
Loading…
x
Reference in New Issue
Block a user