Saving Content failing because of the Back button or Multiple Devices
We have a wordpress based LMS where saving student answers is very important. Users are reporting that sometimes their answers are being not being saved or even removed.
Decreasing the save content rate from the default of 30 seconds to 5 seconds helped.
It has not resolved the issue for everyone.
The problem happens in this scenario:
- User goes to a new page with h5p content
- They update some of the questions
- They navigate to another page using a link
- They use the BACK button on the browser to return to the original page (with blank fields)
- Questions are blank! If they don't do anything, original responses are overwritten
We believe this is what is happening behind the scenes:
1. User goes to a new page with h5p content
AJAX call does an initial user content save of blank answers to questions
2. They update some of the questions
AJAX calls user content update to save changes to the answers
3. They navigate to another page using a link
Navigation to other page is fine, as answers have been saved
4. They use the BACK button on the browser to return to the original page (with blank fields)
Page is retrieved from browser cache, with blank fields
5. Questions are blank! If they don't do anything, original responses are overwritten
AJAX calls user content update to save changes to the answers
i.e. Blank fields overwrite original field values
The same scenario can occur when a student uses multiple devices (which increasingly they do).
As a workaround we are looking at solutions that force page reload when the back button is used like this:
Any other suggestions?
Unfortunately this won't help all scenarios such as having multiple devices and update content on the same page interchangeably. Users have an expectation (set by modern web applications such as Google Sheets and even Facebook) that this kind of data entry conflict will be resolved.
Ultimately this needs to be solved at the h5p infrastructure level I think? Any comments?