You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When Lesson and Exam models were first created, their infer_dataset method referred to the user that it was assigned by using the assigned_by ForeignKey.
In a scenario where only a limited subset of a facility's data is synchronized to a device, such as in a single learner syncing scenario, this would cause Lessons and Quizzes to remain forever serialized in the Morango store, as the data for the assigning user would be absent, as outside the partition of data that would be synced for a single user.
In order to ensure that Lesson and Exam models can be properly deserialized, their infer_dataset method should instead rely on the collection ForeignKey, as the full Collection hierarchy of the Facility will be shared during a single user sync.
The text was updated successfully, but these errors were encountered:
rtibbles
changed the title
Update Lesson and Quiz infer_dataset method to use the collection rather than assigned_by foreign key
Update Lesson and Exam model infer_dataset method to use the collection rather than assigned_by foreign key
Mar 15, 2021
I have raised PR for this in the Draft mode as I wanted to know if you would like me to add test cases for this. I was thinking of adding test case to check whether the output of cached_related_dataset_lookup(created_by) is equal to cached_related_dataset_lookup(collection).
When Lesson and Exam models were first created, their
infer_dataset
method referred to the user that it was assigned by using theassigned_by
ForeignKey.In a scenario where only a limited subset of a facility's data is synchronized to a device, such as in a single learner syncing scenario, this would cause Lessons and Quizzes to remain forever serialized in the Morango store, as the data for the assigning user would be absent, as outside the partition of data that would be synced for a single user.
In order to ensure that Lesson and Exam models can be properly deserialized, their
infer_dataset
method should instead rely on thecollection
ForeignKey, as the full Collection hierarchy of the Facility will be shared during a single user sync.The text was updated successfully, but these errors were encountered: