Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
integration
prechecker
Commits
210349f6
Commit
210349f6
authored
Sep 16, 2015
by
Andrew Hancox
Browse files
MDL-51431 enrol_flatfile: Fix for startdate when updating users
parent
e494078a
Changes
1
Hide whitespace changes
Inline
Side-by-side
enrol/flatfile/lib.php
View file @
210349f6
...
...
@@ -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
);
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment