From 93e071c8ec1e7fd96b3a9b50480da6cc7e241edf Mon Sep 17 00:00:00 2001 From: Josh Ebarvia Date: Fri, 11 Aug 2017 13:01:50 +0930 Subject: [PATCH] MDL-57611 report_log: Fix capability checks for viewing logs --- report/log/lib.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/report/log/lib.php b/report/log/lib.php index 50438409f36..6a53182a78e 100644 --- a/report/log/lib.php +++ b/report/log/lib.php @@ -92,10 +92,10 @@ function report_log_can_access_user_report($user, $course) { $today = false; $all = false; - if (has_capability('report/log:view', $coursecontext)) { + if (has_capability('report/log:viewtoday', $coursecontext)) { $today = true; } - if (has_capability('report/log:viewtoday', $coursecontext)) { + if (has_capability('report/log:view', $coursecontext)) { $all = true; }