mirror of
https://github.com/moodle/moodle.git
synced 2025-03-14 04:30:15 +01:00
MDL-35071 fix plugins typo which was breaking roles restore for some plugins
Thanks Eloy for spotting this!
This commit is contained in:
parent
7a7b8a1f19
commit
2fbfdfd005
@ -1466,12 +1466,12 @@ class restore_ras_and_caps_structure_step extends restore_structure_step {
|
||||
// Deal with enrolment roles - ignore the component and just find out the instance via new id,
|
||||
// it is possible that enrolment was restored using different plugin type.
|
||||
if (!isset($this->plugins)) {
|
||||
$this->plguins = enrol_get_plugins(true);
|
||||
$this->plugins = enrol_get_plugins(true);
|
||||
}
|
||||
if ($enrolid = $this->get_mappingid('enrol', $data->itemid)) {
|
||||
if ($instance = $DB->get_record('enrol', array('id'=>$enrolid))) {
|
||||
if (isset($this->plguins[$instance->enrol])) {
|
||||
$this->plguins[$instance->enrol]->restore_role_assignment($instance, $newroleid, $newuserid, $contextid);
|
||||
if (isset($this->plugins[$instance->enrol])) {
|
||||
$this->plugins[$instance->enrol]->restore_role_assignment($instance, $newroleid, $newuserid, $contextid);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user