-
Notifications
You must be signed in to change notification settings - Fork 738
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix list activity notifications #12386
Fix list activity notifications #12386
Conversation
Build Artifacts
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A good start, but I think we can make the changeover to timestamp a bit more systematically.
One other thing that would be important to investigate in this changeover, is whether we need to add a db_index to the timestamp field: https://github.com/learningequality/kolibri/blob/develop/kolibri/core/notifications/models.py#L117 the primary key (id) is indexed by default, so querying solely by timestamp may be considerably less performant.
kolibri/plugins/coach/assets/src/modules/coachNotifications/index.js
Outdated
Show resolved
Hide resolved
@@ -154,9 +154,6 @@ | |||
const params = { | |||
...this.filterParam, | |||
}; | |||
if (this.notifications.length) { | |||
params.before = this.notifications.slice(-1)[0].id; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why has this been removed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The before
param is already set inside the moreNotificationsForClass
action https://github.com/AlexVelezLl/kolibri/blob/cdb559e453c0c6468ef95d4c97ad7bfdb342d9ec/kolibri/plugins/coach/assets/src/modules/coachNotifications/index.js#L104. So it was repeated code and thought it was better to keep the one in the moreNotificationsForClass
action,
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few more things that seem important here:
- Clearly defining the role of the masterylogs for the retry behaviour completion notification generation
- Reverting the change from 3 incorrect attempts on the same question to 4
- Reverting the change from setUpTestData to setUp if at all possible
One tiny nit about variable name/casing - but this is not blocking.
Thank you @rtibbles! I have updated the PR :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good to go from the code side @radinamatic if you could do final QA to confirm that the issue you reported is fixed, then we can merge this.
Hi @AlexVelezLl @radinamatic - the only issue I was able to identify while testing this is the following error in the console, with seemingly no user facing consequences but I'm going to mention it to be on the safe side:
Logs: LogsAndDB.zip Other than that everything else is working properly and I am seeing all of the notifications. |
Looking at the component in question, this looks like an attemptLog was somehow undefined? https://github.com/learningequality/kolibri/blob/develop/kolibri/core/assets/src/views/AttemptLogItem.vue#L83 This is probably not caused by the changes here - @AlexVelezLl if you feel like chasing this down, please do, otherwise we can file a follow up issue. |
Im gonna give a try @rtibbles. If it becomes something too big we can file a follow up issue :) |
I did a little research, and this issue is happening in the ExamReport page of exercise resources because in the AttemptLogList we iterate through the section.questions, but for a practice resource we dont have attemptLogs for every question, since we dont necessarily have attempted every question, so that why this attemptLog is undefined here https://github.com/AlexVelezLl/kolibri/blob/17ab6f78c8808dbd7ae2f40b49b9b16a1582fc03/kolibri/core/assets/src/views/AttemptLogList.vue#L135. Im not sure what the order should be in the exercises attemptLog and how should it be iterated. So it will be better to file a new issue to solve Exam Reports of exercise resources @rtibbles @pcenov @radinamatic. |
Thanks, @AlexVelezLl - seems like this is likely a regression from the EQM work. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unrelated regression has been filed as a follow up. This is good to go!
Summary
There have been a large number of inconsistencies between generating notifications on an original device, and creating notifications when a device is importing a facility from another device. Mainly because the notifications are not created in chronological order, but are created as the log records are imported. Which leads to the main assumption that notifications are created in a chronological order being incorrect. This PR fixes the following:
timestamp
field of thelearnerprogressnotification
table.ClassroomNotificationsFilter
class was created to update the way to filter records to use filtersets.notifications
,allNotifications
by timestamp.Answered
notifications, an empty notifications list was rendered without option for the user to see more notifications. So now we load more notifications until the user could see the latests notifications.References
Closes #11782.
Reviewer guidance
Set up a device with multiiple lessons/resources/quizes and play with it to have different types of notifications. Then import the facility to a new device and check that notificatoins match.
Testing checklist
PR process
Reviewer checklist
yarn
andpip
)