kolibri
kolibri copied to clipboard
Exam report: Avoid loading on question change
Summary
Avoid fetching exam resources again if they are already loaded.
References
Closes #12062
Screenshots
https://github.com/learningequality/kolibri/assets/51239030/954b6fe8-de64-4dec-b425-2f3589e9fe6b
Reviewer guidance
- Take an exam as a learner.
- Review different exam reports and check that everything is loading correctly.
- Switch between questions, attempts and question interactions and the loading state should not appear
Testing checklist
- [x] Contributor has fully tested the PR manually
- [x] If there are any front-end changes, before/after screenshots are included
- [ ] Critical user journeys are covered by Gherkin stories
- [ ] Critical and brittle code paths are covered by unit tests
PR process
- [x] PR has the correct target branch and milestone
- [x] PR has 'needs review' or 'work-in-progress' label
- [x] If PR is ready for review, a reviewer has been added. (Don't use 'Assignees')
- [ ] If this is an important user-facing change, PR or related issue has a 'changelog' label
- [ ] If this includes an internal dependency change, a link to the diff is provided
Reviewer checklist
- Automated test coverage is satisfactory
- PR is fully functional
- PR has been tested for accessibility regressions
- External dependency files were updated if necessary (
yarn
andpip
) - Documentation is updated
- Contributor is in AUTHORS.md
Build Artifacts
Asset type | Download link |
---|---|
PEX file | kolibri-0.16.1a0.dev0_git.10.ge5d03fc7.pex |
Windows Installer (EXE) | kolibri-0.16.1a0.dev0+git.10.ge5d03fc7-windows-setup-unsigned.exe |
Debian Package | kolibri_0.16.1a0.dev0+git.10.ge5d03fc7-0ubuntu1_all.deb |
Mac Installer (DMG) | kolibri-0.16.1a0.dev0+git.10.ge5d03fc7-0.4.0.dmg |
Android Package (APK) | kolibri-0.16.1a0.dev0+git.10.ge5d03fc7-0.1.1-debug.apk |
TAR file | kolibri-0.16.1a0.dev0+git.10.ge5d03fc7.tar.gz |
WHL file | kolibri-0.16.1a0.dev0+git.10.ge5d03fc7-py2.py3-none-any.whl |
Thanks @AlexVelezLl I confirm that the loading state of the quiz report when viewed as a learner is fixed now. However, while regression testing I noticed that this is not fixed at Coach > Reports so it will be great if you could fix it there as well:
https://github.com/learningequality/kolibri/assets/79847249/790c7c74-74f9-4fe5-9bad-38cfb161bddf
Hi @marcellamaki. This regression comes from here. The reason why the scroll is reset is because we have this conditional rendering, this way the ExamReport
is unmounted from the DOM and mounted again.
Previously, although the data was reloaded and the references were updated, the ExamReport was always visible. And since we loaded the same data it still looked the same.
We could keep the same behavior of reloading the data, and make the ExamReport always visible, but perhaps with some opacity while the circular loader is shown, and revert the change to look if it is loaded in vue, If that is safer.