Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

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]

Code Block
languagejs
{
    "userid": "<<userid>>",
    "courseid": "<<contentid>>",
    "batchid": "<<contentid>>",
    "contentid": "<<contentid>>"
}

WHERE userid='<<userid>>' and courseid ='<<contentid>>'

2
user

User consuming

content by enrolling to collection through batch

{

“userid”: <<userid>>,

“contentid” : <<contentid>>,

“collectionid” : <<courseid>>,

“batchid” : <<batchid>>

}

a content with in a collection. [Existing]

  • Don’t carry forward content consumption (The content consumed in other context not considered for marking as complete).

Code Block
languagejs
{
    "userid": "<<userid>>",
    "courseid": "<<courseid>>",
    "batchid": "<<batchid>>",
    "contentid": "<<contentid>>"
}

WHERE userid='<<userid>>' and

contentid

courseid ='

<<contentid>>

<<courseid>>' and

courseid

batchid ='

<<courseid>>

<<batchid>>' and

batchid

contentid='

<<batchid>>

<<contentid>>'

3
user

User consuming

content which can be carried forward by enrolling to collection through program

{

“userid”: <<userid>>,

“contentid” : <<contentid>>,

“collectionid” : <<courseid>>

}

a content with in a collection. [New]

  • Carry forward content consumption

Code Block
languagejs
{
    "userid": "<<userid>>",
    "courseid": "<<courseid>>",
    "batchid": "<<batchid>>",
    "contentid": "<<contentid>>"
}

Note: When it is consumed with in this context.

WHERE userid='<<userid>>' and

contentid

courseid ='<<contentid>>

' and courseid ='<<courseid>>' and batchid ='<<programid>>

'

4

user consuming content which cannot be carried forward by enrolling to collection through program

{

“userid”: <<userid>>,

“contentid” : <<contentid>>,

“collectionid” : <<courseid>>,

“batchid” : <<programid>>

}

OR
WHERE userid='<<userid>>' and

contentid

courseid ='

<<contentid>>

<<courseid>>' and

courseid

batchid ='

<<courseid>>

<<batchid>>' and

batchid

contentid='

<<programid>>

<<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.

...