-
Notifications
You must be signed in to change notification settings - Fork 716
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
Encapsulate progress tracking logic in a composable to prevent content pages crossing their streams #8898
Encapsulate progress tracking logic in a composable to prevent content pages crossing their streams #8898
Conversation
…composable for updating frontend cache.
When doing manual QA based on the Reviewer Guidance above, the tracking in the UI was fine, but in the console, there were some errors: Take a coach assigned quiz
When testing by doing an exercise and then a video, also received 403 errors |
Tested with the latest Buildkite deb build:
|
I can't imagine how my progress tracking PR might have affected this, but I'll take a closer look as we want this to be fixed regardless.
This is pre-existing to this PR.
I think this may be new, because I think the quiz renderer was failing to call stop tracking after submission. I can fix this.
Looking at the screenshot, this is also a consequence of the failure to call stop tracking - it is repeatedly trying to make updates to the progress of the closed quiz, even though it is closed! So, I will make sure we call stop tracking before tear down, and also add some guard logic to the composable to prevent us trying to continue tracking user progress when they are no longer on the page.
Hrm, this sounds like a timing issue - where we're not ensuring that progress data is saved quickly enough. I think adding some guard logic to ensure that the progress tracking data is finalized would help here.
Excellent - this is one of the things this PR should be addressing!
I think this is a regression in the perseus viewer plugin after recent updates, can fix. |
@jredrejo I think it may well do that, looking at the errors in there! Thanks, I knew there were some other issues out there like this. |
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.
It's a lot of changes, but the tests are very helpful both for catching things and for understanding what the intended behaviors are. I'm going to do some manual testing and another read through after the updates for the issues mentioned previously during QA.
kolibri/plugins/learn/assets/src/composables/useProgressTracking.js
Outdated
Show resolved
Hide resolved
Note: this was actually an issue with a typo - I was referring to |
Replace original urls with blob urls when restoring state.
Manual QA after the latest changes:
One error that I still see that @pcenov maybe was referencing is after completing an exercise in a lesson, when clicking "move on" I get a 503 error. First, this seems to not do anything (i.e. the page does not "move on" but continues to show the completed resource after the modal has closed), then there is a long loading spinner, then the content loads, after ~10 seconds...? (trying to replicate for more details) Error is |
This is one of those cases where a properly handled API error is part of expected behaviour. This happens when the request receives a database locked error - it then waits 10 seconds before retrying. The user experience of this could be better, but would probably require strings. The alternative, as @pcenov noted is a big fat error page and not actually saving the data. |
Got it - thanks for clarifying. Code read through makes sense with that, and I don't see any blockers with the new changes |
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.
With updates, looks good to me
Summary
References
Fixes #8776
Fixes #8848
Reviewer guidance
Take a coach assigned quiz
Engage with an exercise
Watch a video
Does progress all get saved and tracked properly?
This will necessitate small tweaks to the QuizRenderer in develop - but they will be quick to implement.
Testing checklist
PR process
Reviewer checklist
yarn
andpip
)