Skip to content

Commit

Permalink
MDL-66213 report_loglive: Show anonymous events when capability allows.
Browse files Browse the repository at this point in the history
  • Loading branch information
David Balch committed Jan 10, 2020
1 parent 51c4efa commit 9cce071
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion report/loglive/classes/renderable.php
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,11 @@ protected function setup_filters() {
$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;
}
Expand Down

0 comments on commit 9cce071

Please sign in to comment.