MDL-53977 enrol_lti: a hack to workaround a hack to utilise DB caching

This commit is contained in:
Mark Nelson
2016-05-06 09:27:34 +08:00
committed by Andrew Nicols
parent c0dd0e3543
commit d066ed8db0
+4 -1
View File
@@ -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;