Home
Documentation
Downloads
Demo
Tracker
Development
Translation
Moodle.net
Search
projects
/
moodle.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c0dd0e3
)
MDL-53977 enrol_lti: a hack to workaround a hack to utilise DB caching
author
Mark Nelson
<markn@moodle.com>
Mon, 2 May 2016 07:34:15 +0000
(15:34 +0800)
committer
Andrew Nicols
<andrew@nicols.co.uk>
Fri, 6 May 2016 01:27:34 +0000
(09:27 +0800)
enrol/lti/classes/helper.php
patch
|
blob
|
blame
|
history
diff --git
a/enrol/lti/classes/helper.php
b/enrol/lti/classes/helper.php
index
f6a006a
..
d2d6336
100644
(file)
--- a/
enrol/lti/classes/helper.php
+++ b/
enrol/lti/classes/helper.php
@@
-267,7
+267,10
@@
class helper {
$instance->enrol = 'lti';
$instance->status = $tool->status;
$ltienrol = enrol_get_plugin('lti');
- $ltienrol->enrol_user($instance, $userid, null, time(), $timeend);
+
+ // Hack - need to do this to workaround DB caching hack. See MDL-53977.
+ $timestart = intval(substr(time(), 0, 8) . '00') - 1;
+ $ltienrol->enrol_user($instance, $userid, null, $timestart, $timeend);
}
return self::ENROLMENT_SUCCESSFUL;