Difference in class activity notifications after full facility import
Observed behavior
In a recent test I noticed some differences between class activity notifications displayed between two devices after the full facility import. Today I could not replicate the 'need help' status disappearance after full facility import from Win11 (0.16b10) to Win7 (0.16b13), howver, the class activity notifications continue not to display on the source (Win11) device anymore. The last syncing activity on that Win11 server was 5-6 days ago.
Errors and logs
Logs and dbs for both servers.
Expected behavior
Consistent display of class activity on both devices
User-facing consequences
Confusing and inconsistent information presented to the coach.
Steps to reproduce
Import the full facility (with some class interactions and notifications) from one server to another.
Context
- Kolibri version: Windows 11 (0.16b10) and Windows 7 (0.16b13)
As discussed during the planning meeting, we'll downgrade to P1, but if we can possibly fit it in before 0.16.0 we will
Looking at the notification databases, this is not an issue with the notifications being properly generated, but rather that our code at some point is implicitly relying on the auto-incrementing integer id order to be indicative of the timestamp ordering for the notification. When we were generating the notifications just after the activity, this assumption held true, but now with the bulk creation after sync, it is no longer the case.
This can be fixed by ensuring that we always order the LearnerProgressNotifications by their timestamp field, not the id field.
Possibly related issue noted by @jredrejo in the 0.17.0-alpha0 bug bash:
Notifications don’t appear in the coach panel after failing 7 responses in a row
Fixed in #12386