apluslms / a-plus

A+ frontend portal - A+ LMS documentation:
https://apluslms.github.io/
Other
64 stars 72 forks source link

API endpoint for batch fetching student points #1360

Closed no-comma closed 1 month ago

no-comma commented 2 months ago

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:

mikaelGusse commented 1 month ago

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