Versions Compared

Key

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

...

Info
  • The event is just a trigger to initiate the computation of the collection progress. The job uses DB and fetch the raw data to compute the progress.

  • When an assessment type content (Ex: QuestionSet) view ends, it is required to send the ASSESS events data in the request.

...

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
  • View Start API should insert the row only if the row not exists.

  • View Update and End API should update the row only if the row exists.

...

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
  • View Start API should insert the row only if the row not exists.

  • View Update and End API should update the row only if the row exists.

...

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.

...