From 34bdef0b6278546b5a3300d98ff0bf2f6dcd3dfb Mon Sep 17 00:00:00 2001 From: Dan Marsden Date: Thu, 5 Nov 2020 12:15:19 +1300 Subject: [PATCH] MDL-70006 analytics: Don't send notifications to suspended enrolments. --- analytics/classes/local/target/base.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/analytics/classes/local/target/base.php b/analytics/classes/local/target/base.php index b9f13a1cb86c1..c44e933bd88ad 100644 --- a/analytics/classes/local/target/base.php +++ b/analytics/classes/local/target/base.php @@ -279,7 +279,7 @@ public function get_insights_users(\context $context) { } else if ($context->contextlevel >= CONTEXT_COURSE) { // At course level or below only enrolled users although this is not ideal for // teachers assigned at category level. - $users = get_enrolled_users($context, 'moodle/analytics:listinsights'); + $users = get_enrolled_users($context, 'moodle/analytics:listinsights', 0, 'u.*', null, 0, 0, true); } else { $users = get_users_by_capability($context, 'moodle/analytics:listinsights'); }