The API endpoint "Get Term Grades for a Class" with no explicit parameters only returns records of current students currently enrolled into the class. In other words, only term grade records for students who are not archived and still a member of the class are returned.
Additional parameters permit the fetching of students who are either archived, no longer a member of a class, or both. The logic table below demonstrates the conditions and what effect the parameters have.
A check indicates that the records will be included under the given condition with the given parameters passed in the query:
Condition | include_archived_students | unenrolled_only | include_archived_students + unenrolled only |
---|---|---|---|
Student removed from class | ❌ | ✔️ | ✔️ |
Student archived | ✔️ | ❌ | ❌ |
Student removed from class + archived | ❌ | ❌ | ✔️ |
The same endpoint requires the archived parameter to be passed for archived classes. Otherwise, there will be a 404 error.
Condition | archived not passed | archived passed |
---|---|---|
Class is not archived | ✔️ | 404 |
Class is archived | 404 | ✔️ |