MDL-70099 enrol: increase accuracy of current enrolments by date.
By rounding the current time it was possible that the most recently created user enrolments (e.g. self enrolments) were being excluded. This would manifest itself in a user being enrolled on a course, but it not appearing under "My courses" navigation or on their own Dashboard until the rounded time had caught up with the current time.
This commit is contained in:
@@ -3670,7 +3670,8 @@ class navbar extends navigation_node {
|
||||
}
|
||||
|
||||
// Don't show the 'course' node if enrolled in this course.
|
||||
if (!is_enrolled(context_course::instance($this->page->course->id, null, '', true))) {
|
||||
$coursecontext = context_course::instance($this->page->course->id);
|
||||
if (!is_enrolled($coursecontext, null, '', true)) {
|
||||
$courses = $this->page->navigation->get('courses');
|
||||
if (!$courses) {
|
||||
// Courses node may not be present.
|
||||
|
||||
Reference in New Issue
Block a user