MDL-66213 report_loglive: Show anonymous events when capability allows.

This commit is contained in:
David Balch
2020-01-10 13:48:59 +00:00
parent 51c4efa29f
commit 9cce07111e
+5 -1
View File
@@ -180,7 +180,11 @@ class report_loglive_renderable implements renderable {
$filter->logreader = $readers[$this->selectedlogreader];
$filter->date = $this->date;
$filter->orderby = $this->order;
$filter->anonymous = 0;
$context = context_course::instance($filter->courseid);
if (!has_capability('moodle/site:viewanonymousevents', $context)) {
$filter->anonymous = 0;
}
return $filter;
}