--- restore_stepslib.php 2010-09-21 12:04:09.000000000 +0200 +++ restore_stepslib.php.new 2010-09-21 12:03:22.000000000 +0200 @@ -1062,7 +1062,7 @@ } else if ((strpos($data->component, 'enrol_') === 0)) { // Deal with enrolment roles - if ($enrolid = $this->get_mappingid('role', $data->itemid)) { + if ($enrolid = $this->get_mappingid('enrol', $data->itemid)) { if ($component = $DB->get_field('enrol', 'component', array('id'=>$enrolid))) { //note: we have to verify component because it might have changed if ($component === 'enrol_manual') { @@ -1126,6 +1126,7 @@ if ($restoretype !== ENROL_RESTORE_EXACT and $restoretype !== ENROL_RESTORE_NOUSERS) { // TODO: add complex restore support via custom class debugging("Skipping '{$data->enrol}' enrolment plugin. Will be implemented before 2.0 release", DEBUG_DEVELOPER); + $this->set_mapping('enrol', $oldid, 0); return; }