coursemology2
coursemology2 copied to clipboard
Trigger Saving Answer when Toggling to Other Question in Submission
Issue
Continuation of https://github.com/Coursemology/coursemology2/pull/7278, this issue is happens when the autosave is not yet triggered while the user has already switched to another question in stepped-format assessment. As such, the autosave won't be triggered and the answer is lost when the page is refreshed or the user navigates to another page.
Solution
Under normal circumstances, there is a prompt showing up to user when there's unsaved answers. However, it would be better to trigger the saving when the user navigates to another question. Here, we trigger the autosaving when the user clicks another bubble/step to navigate to another question
https://github.com/Coursemology/coursemology2/assets/16359075/b9f126f2-8d88-46de-9927-5a17a0503bc7