Merge branch 'MDL-33916-MOODLE_22_STABLE-1' of git://git.luns.net.uk/moodle into MOODLE_22_STABLE
This commit is contained in:
@@ -1935,6 +1935,9 @@ function is_enrolled(context $context, $user = null, $withcapability = '', $only
|
||||
$coursecontext->reload_if_dirty();
|
||||
if (isset($USER->enrol['enrolled'][$coursecontext->instanceid])) {
|
||||
if ($USER->enrol['enrolled'][$coursecontext->instanceid] > time()) {
|
||||
if ($withcapability and !has_capability($withcapability, $context, $userid)) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user