mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 22:08:20 +01:00
MDL-51431 enrol_flatfile: Fix for startdate when updating users
This commit is contained in:
parent
f495510548
commit
7fca67ee29
@ -446,7 +446,7 @@ class enrol_flatfile_plugin extends enrol_plugin {
|
||||
$notify = false;
|
||||
if ($ue = $DB->get_record('user_enrolments', array('enrolid'=>$instance->id, 'userid'=>$user->id))) {
|
||||
// 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))) {
|
||||
role_assign($roleid, $user->id, $context->id, 'enrol_flatfile', $instance->id);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user