MDL-46697 gradebook: Only count active users when needed (and only id)
MDL-46697 gradebook: Only count active users when needed (and only id)

The code only needs the id column to perform its count. On courses with a lot of users
fetching the whole user record for them all easily adds up to several hundred MB of
memory.

dilawar/moodle