Versions Compared

Key

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

...

Scenario

Write Request

Read Request(Condition)

Read Query

1

User consuming individual content. [New]

Code Block
languagejs
{
    "userid": "<<userid>>",
    "collectionid": "<<contentid>>",
    "contextid": "<<contentid>>",
    "contentid": "<<contentid>>"
}
Code Block
languagejs
{
    "userid": "<<userid>>",
    "contentid": "<<contentid>>"
}

WHERE userid='<<userid>>' and collectionid ='<<contentid>>' and contentid = <contentid> and contextid = <contentid>

2

User consuming 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>>",
    "collectionid": "<<courseid>>",
    "contextid": "<<batchid>>",
    "contentid": "<<contentid>>"
}

WHERE userid='<<userid>>' and collectionid ='<<courseid>>' and contextid ='<<batchid>>' and contentid='<<contentid>>'

3

User consuming a content with in a collection. [New]

  • Carry forward content consumption

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

Note: When it is consumed with in this context.

WHERE userid='<<userid>>' and collectionid ='<<courseid>>'
OR
WHERE userid='<<userid>>' and collectionid ='<<courseid>>' and contextid ='<<courseid>>' and contentid='<<contentid>>'

4

User consuming a content within a course part of a program

  • Don't carry forward content consumption

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

WHERE userid='<<userid>>' and collectionid ='<<courseid>>' and contextid in (select batchId from program where collectionid='<<courseid>>')

5

User consuming a content within a course part of a program

  • Carry forward content consumption

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

WHERE userid='<<userid>>' and collectionid ='<<courseid>>' and contextid = ='<<courseid>>'

...