...
Info |
---|
|
...
Schema Updates:
To easily access the progress and score of individual contents at collection level we will store the content view status and best score in user_enrolments table.
We already have
contentstatus
column to store the view status of the content.Adding another column to store score details of the viewed content.
...
Column
...
DataType
...
Details
...
contentscore
...
map<string, user_score>
...
user_score
is a Cassandra UDT.
We use Cassandra UDT to store the score data of the content. This will enable us to easily enhance and add more score related metrics by altering it.
user_score
- Cassandra UDT:
...
Column
...
DataType
...
Details
...
score
...
double
...
Best score of the assessment type content.
...
max_score
...
double
...
Max score of the assessment type content
Note |
---|
This format is not same as activity_agg data format. There we are prepending metric name with content identifier to construct the key. Two different formats are acceptable? |
Content View Lifecycle:
When the user view the content in context of a collection and batch, for the first time its start, progress update and end triggers are processed. Revisit (2nd - nth view) of the content will be ignored to process and update the DB.
Note |
---|
Shall we enable force ‘view end’ to handle the collection progress update sync issues? |
Info |
---|
|
...
Content View Lifecycle:
When the user view the content in context of a collection and batch, for the first time its start, progress update and end triggers are processed. Revisit (2nd - nth view) of the content will be ignored to process and update the DB.
Note |
---|
Shall we enable force ‘view end’ to handle the collection progress update sync issues? |
Info |
---|
|
...
Handling collection and batch dependencies
For view start, end and update, courseId and batchId are non-mandatory. This would enable to track the progress for any content which is not part of a course.
This is handled in two ways:
If, collectionId and batchId are part of the request, then, individual content progress and overall collection progress is captured and computed.
...
In case of only userId and contentId, the progress is captured only for that content
...
V1 vs V2 APIs:
We will create a version column for course_batch table and update the default value (1) for all the existing rows.
...