Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API endpoint for batch fetching student points #1360

Closed
no-comma opened this issue May 14, 2024 · 1 comment · Fixed by #1372
Closed

API endpoint for batch fetching student points #1360

no-comma opened this issue May 14, 2024 · 1 comment · Fixed by #1372
Assignees
Labels
area: API Issues that affect the API

Comments

@no-comma
Copy link

A+ has the following API endpoints for fetching points:

GET /courses/<course_id>/points/ - for fetching a list of students
GET /courses/<course_id>/points/<user_id>/ - for fetching the points of an individual student

In Grades, we want to fetch points for all students of a course. The only way to do that currently is to first fetch a list of students, and then for each student, individually fetch their points. Courses can have up to hundreds of participants, so this means there will be hundreds of API calls.

An API endpoint for fetching points for all students at once would be helpful. For each student, we need:

  • Their full points
  • Their points for each module
  • Their points by each difficulty level
@mikaelGusse
Copy link
Contributor

To me it looks like GET /courses/<course_id>/points/ returns the exact same list as GET /courses/<course_id>/students/ currently. With this PR#1372 I was able to fix it with a very small change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: API Issues that affect the API
Projects
Status: Done
3 participants