Overview
To organise the any order of tractable collection w.r.t user’s last access date and time on the user enrolment list . We have two solution approach.
...
User is a logged in user and has enrolled into at-least one trackable collection
Solutions:
Adding new metadata to User’s enrolment
Re-using last access time from User content consumption
Option 1: Adding new metadata to User’s enrolment :
Adding a metadata to User’s enrollment component as last access timestamp. This metadata needs to updated while updating last accessed content id for a user. Also for the old records for this metadata requires a migration.
...
Duplicate data in multiple tables
Migration is required for existing enrolments.
Option 2: Re-using last access time from User content consumption:
While fetch list of user enrolments join user content consumption by the last access content id to get the last access timestamp filter by the user id, course id, batch id and last access content id and formulate the response accordingly. This approach would not require the migration steps
...