diff --git a/course/report/participation/index.php b/course/report/participation/index.php index 659b198559f..d66fd7944cf 100644 --- a/course/report/participation/index.php +++ b/course/report/participation/index.php @@ -223,6 +223,7 @@ $countsql = "SELECT COUNT(DISTINCT(ra.userid)) FROM {role_assignments} ra + JOIN {user} u ON u.id = ra.userid WHERE ra.contextid $relatedcontexts AND ra.roleid = :roleid"; $totalcount = $DB->count_records_sql($countsql, $params);