Permalink
Browse files

Merge branch 'MDL-26513_restrict_modules' of git://github.com/stronk7…

…/moodle
  • Loading branch information...
2 parents 9da0fc1 + e4f72d1 commit 5df4d6ccab0fe0ba327c1dd510f379ced1507752 @stronk7 stronk7 committed Feb 22, 2011
Showing with 3 additions and 2 deletions.
  1. +3 −2 backup/moodle2/restore_stepslib.php
@@ -1021,8 +1021,6 @@ public function process_course($data) {
global $CFG, $DB;
$data = (object)$data;
- $coursetags = isset($data->tags['tag']) ? $data->tags['tag'] : array();
- $coursemodules = isset($data->allowed_modules['module']) ? $data->allowed_modules['module'] : array();
$oldid = $data->id; // We'll need this later
$fullname = $this->get_setting_value('course_fullname');
@@ -1038,6 +1036,9 @@ public function process_course($data) {
$data->shortname= $shortname;
$data->idnumber = '';
+ // Only restrict modules if original course was and target site too for new courses
+ $data->restrictmodules = $data->restrictmodules && !empty($CFG->restrictmodulesfor) && $CFG->restrictmodulesfor == 'all';
+
$data->startdate= $this->apply_date_offset($data->startdate);
if ($data->defaultgroupingid) {
$data->defaultgroupingid = $this->get_mappingid('grouping', $data->defaultgroupingid);

0 comments on commit 5df4d6c

Please sign in to comment.