Skip to content

Commit

Permalink
Merge branch 'MDL-31532_21' of git://github.com/stronk7/moodle into M…
Browse files Browse the repository at this point in the history
…OODLE_21_STABLE
  • Loading branch information
Sam Hemelryk committed Feb 20, 2012
2 parents 3921c72 + 7116d8d commit f2f3078
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions backup/moodle2/restore_stepslib.php
Original file line number Diff line number Diff line change
Expand Up @@ -1121,6 +1121,12 @@ public function process_course($data) {
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';

Expand Down

0 comments on commit f2f3078

Please sign in to comment.