$data->hiddensections = 0;
}
- // Only restrict modules if original course was and target site too for new courses
+ // Set legacyrestrictmodules to true if the course was resticting modules. If so
+ // then we will need to process restricted modules after execution.
$this->legacyrestrictmodules = !empty($data->restrictmodules);
$data->startdate= $this->apply_date_offset($data->startdate);
array('course' => $courseid), 'module', 'module, 1');
if (empty($allowedmoduleids)) {
// This seems to be the best match for backwards compatibility,
- // Non necessrily with the old code in course_allowed_module function,
+ // not necessarily with the old code in course_allowed_module function,
// but with the code that used to be in the coures settings form.
$allowedmoduleids = explode(',', $CFG->defaultallowedmodules);
$allowedmoduleids = array_combine($allowedmoduleids, $allowedmoduleids);