...
This document details the design options for introducing scores as part of group aggregate API and reports.
Design
Option1: Assessments as individual activity
Currently, only trackable collections and their progress are stored in user_activity_agg
table.
AssessmentAggregator job changes:
For score aggregates, store Create a new process function to compute the best attempted score of each assessment as a separate activity in the below formatand store it in user_activity_agg
table in below format.
activity_type | activity_id | user_id | context_id | agg | agg_last_updated |
---|---|---|---|---|---|
Assessment | do_123(assessmentId) | user_123 | cb:batch_123 | {'score': <best attempted score>} | {'score': ‘timestamp’} |
...
Code Block |
---|
POST: /v2/group/activity/agg { "request": { "groupId": "groupId", "activityId": ["activityIdassessmentId_1","activityIdassessmentId_2"], "activityType": "Assessment" } } |
...