Permalink
Browse files

Merge branch 'MDL-33916-MOODLE_22_STABLE-1' of git://git.luns.net.uk/…

…moodle into MOODLE_22_STABLE
  • Loading branch information...
2 parents 8c4489c + 83d3858 commit 041a4a7d94be504184b126bfaa697bc40c78978e @danpoltawski danpoltawski committed Jul 2, 2012
Showing with 3 additions and 0 deletions.
  1. +3 −0 lib/accesslib.php
View
@@ -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;
}
}

0 comments on commit 041a4a7

Please sign in to comment.