...
With Viewer-Service, we will support tracking individual content consumption also. Below details explain how the data will be stored for a content consumption in different scenarios.
...
...
User
...
Accessing Content
The below table has various scenarios considering the current and future use cases. Here we defined the database read/write logic to support these use case and fetch the save or fetch the required data from user_content_consumption
table.
Table - user_content_
...
A
...
class-1-maths (Collection)
single-digit-addition (Content)
<By enrolling to Collection>
...
userId: A
collectionId: class-1-maths
batchId: class-1-maths
contentId: single-digit-addition
...
A
...
single-digit-addition (Content)
<By using platform search>
...
userId: A
collectionId: single-digit-addition
batchId: single-digit-addition
contentId: single-digit-addition
...
Use Case
...
Write Request
...
Read Request(Condition)
...
user consuming individual content by program search
...
{
“userid”: <<userid>>,
“contentid” : <<contentid>>
}
...
counsumption
PRIMARY KEY (userid, courseid, batchid, contentid)
Key words used in below table:
Carry forward content consumption - Considering the content consumed in any context to compute the progress or completion percentage (any collection, batch or individual content consumption).
Scenario | Write Request | Read Request(Condition) | ||||||
---|---|---|---|---|---|---|---|---|
1 | User consuming individual content. [New] |
| WHERE userid='<<userid>>' and courseid ='<<contentid>>' | |||||
2 |
User consuming |
{
“userid”: <<userid>>,
“contentid” : <<contentid>>,
“collectionid” : <<courseid>>,
“batchid” : <<batchid>>
}
a content with in a collection. [Existing]
|
| WHERE userid='<<userid>>' and |
courseid =' |
<<courseid>>' and |
batchid =' |
<<batchid>>' and |
contentid=' |
<<contentid>>' |
3 |
User consuming |
{
“userid”: <<userid>>,
“contentid” : <<contentid>>,
“collectionid” : <<courseid>>
}
a content with in a collection. [New]
|
Note: When it is consumed with in this context. | WHERE userid='<<userid>>' and |
courseid ='<<contentid>> |
' |
user consuming content which cannot be carried forward by enrolling to collection through program
{
“userid”: <<userid>>,
“contentid” : <<contentid>>,
“collectionid” : <<courseid>>,
“batchid” : <<programid>>
}
OR |
courseid =' |
<<courseid>>' and |
batchid =' |
<<batchid>>' and |
contentid=' |
<<contentid>>' |
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.
...