CoderDojo / community-platform

Zen, the CoderDojo Community Platform!
https://zen.coderdojo.com
MIT License
121 stars 55 forks source link

Ability to query user list for attendance #1225

Open sandrobonazzola opened 6 years ago

sandrobonazzola commented 6 years ago

We have ninja attending to different dojos in the area. When we get a request for a white belt from a ninja we should be able to check if the ninja attended at least 5 dojo sessions, summing the attendance to the dojo in the area.

If we can't get the aggregated data from all the dojo a user is registered to, it would be enough to get the number of the events attended within a single dojo, we can then correlate the data between champions.

This would allow to have also a "score" table listing top attendant to dojos...

Wardormeur commented 6 years ago

Apologies for the late response : I've had it open for a draft response and closed it at some point, leaving me without notifications. Grouping of Dojo is being thought of due to regional bodies (RB) but I guess we could consider a smaller representation than RB (cc @conoramurphy). That's not in the pipeline yet, though; and it is the first time we hear of a contest-like you're designing it :+1: In your scenario, each champion should be able to get the attendances of any of their users (that's what you see in the "Manage applications" page). To get all attendances of an event should be possible, but It's very unlikely to be able to get all attendances of all events of a Dojo in one request. You'll very likely need to loop over the Dojo's events to get that. The reason behind is mostly the design of the API: it's REST-ish, meaning you can mostly request only one "table" at a time (exceptions to sessions because they don't exist without the event). The other reason is permissions. Only dojo-admin/ticketing admin have access to attendances, and there is no way at the moment to share those with someone else. If you want me to help you create a small bash-script to do that, I'd be happy to :]