Permalink
Browse files

Merge branch 'MDL-31532_21' of git://github.com/stronk7/moodle into M…

…OODLE_21_STABLE
  • Loading branch information...
2 parents 3921c72 + 7116d8d commit f2f3078cd3281daa3e0fab6f1d566ef4af94e1af Sam Hemelryk committed Feb 20, 2012
Showing with 6 additions and 0 deletions.
  1. +6 −0 backup/moodle2/restore_stepslib.php
@@ -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';

0 comments on commit f2f3078

Please sign in to comment.