The term grades in the Primary Years Program are a complex data structure. requiring the API responses need to have deeply properties. Thus, in order to extract the scores that are embedded in the response requires understanding how to unravel the nested structure. This article is intended to provide developers with a high-level overview in order to parse responses to extract scores.
Term Grade Entities
A term grade entity has three IDs that establish its uniqueness:
- Class ID
- Term ID
- Student ID
The API is accessed via a Class ID and Term ID passed as path parameters, and the responses is an array of records where the Student ID can be obtained:
- `/classes/:class_id/assessments/term/:term_id/term-grades`
Each record has nested keys that correspond to different sections on the term grade report, for example `atl_assessment`, `rubrics`, `subjects`, and `units`, highlighted here:
Nested Properties
When the above properties are expanded, the keys provided within each key can differ according to settings. For example, The units structure may have scores embedded inside of different areas of a unit, for example "overall_assessment".
These values correspond to the teacher evaluations entered into the term grade, if enabled. These evaluations can be done on a per-unit basis:
Other scores are deeply nested into the subjects structure. Depending on settings, it can have the path subjects -> stands -> standards -> standards -> criteria.
Other possible paths are:
- subjects -> strands -> criteria
- subjects -> phases -> criteria
- subjects -> strands -> standards -> criteria
- subjects -> strands -> standards -> standards -> criteria