MDL-48572 integration I've realised that site-wide suspended users are not being filtered, I am not 100% that it is expected that get_enrolled_users and count_enrolled_users are not filtering site suspended users when asking for $onlyactive.
To reproduce the problem:
- Go to a course with manual enrolments (students)
- Go to the gradebook, you can see all the students
- Go to one of the students profile page and edit it as admin, setting suspended to 1
- Return to the gradebook, the user is still there