mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 00:46:50 +02:00
Merge branch 'MDL-51431' of https://github.com/andrewhancox/moodle
This commit is contained in:
commit
4b65342dba
1 changed files with 1 additions and 1 deletions
|
@ -441,7 +441,7 @@ class enrol_flatfile_plugin extends enrol_plugin {
|
||||||
$notify = false;
|
$notify = false;
|
||||||
if ($ue = $DB->get_record('user_enrolments', array('enrolid'=>$instance->id, 'userid'=>$user->id))) {
|
if ($ue = $DB->get_record('user_enrolments', array('enrolid'=>$instance->id, 'userid'=>$user->id))) {
|
||||||
// Update only.
|
// Update only.
|
||||||
$this->update_user_enrol($instance, $user->id, ENROL_USER_ACTIVE, $roleid, $timestart, $timeend);
|
$this->update_user_enrol($instance, $user->id, ENROL_USER_ACTIVE, $timestart, $timeend);
|
||||||
if (!$DB->record_exists('role_assignments', array('contextid'=>$context->id, 'roleid'=>$roleid, 'userid'=>$user->id, 'component'=>'enrol_flatfile', 'itemid'=>$instance->id))) {
|
if (!$DB->record_exists('role_assignments', array('contextid'=>$context->id, 'roleid'=>$roleid, 'userid'=>$user->id, 'component'=>'enrol_flatfile', 'itemid'=>$instance->id))) {
|
||||||
role_assign($roleid, $user->id, $context->id, 'enrol_flatfile', $instance->id);
|
role_assign($roleid, $user->id, $context->id, 'enrol_flatfile', $instance->id);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue