Allow user’s to resume their H5P exercises without login

H5P has a nice “resume” feature. It allows your visitors to do an exercise, then take a break, and maybe resume where they left off the next day. That’s pretty neat!

If you need more details on H5P’s resume feature in general, I recommend checking out “How does resuming an exercise work in H5P?”

However, there’s a catch: Users need to be logged into your platform, or otherwise H5P can’t store the state and restore the state later when users return. What, for instance, if you don’t want users to be logged in, but still want them to be able to finish their crossword puzzle that they’ve started earlier? There’s a solution now, at least for WordPress. A tiny, free, openly sourced plugin can maybe help you out: SNORDIAN’s Local User Data for H5P.

What does the plugin do?

The name SNORDIAN’s Local User Data for H5P is quite clumsy, but necessary to comply with both H5P Group’s trademark rules and WordPress’ policies for plugin names. But this does not diminish its qualities.

Simply install SNORDIAN’s Local User Data for H5P in in addition to the H5P plugin. It does not require any additional setup. However, you must set the H5P plugin to store the content state in its settings.

screenshot of the settings of the H5P plugin for WordPress showing the

In general, this setting activates the resume feature for all logged-in users. With SNORDIAN’s Local User Data for H5P resuming will now work for any user regardless of whether they are logged in.

If users can log in and are logged in, then the H5P plugin will take over.

Where is the data stored?

SNORDIAN’s Local User Data for H5P stores user data in the user’s browser, in its so called “local storage”. That means that the data is neither stored notr processed on your server which is beneficial for data privacy. However, be aware that if users can log in and are logged in, the H5P plugin will send the information to your server which may or may not be relevant to you depending on your local privacy laws.

Are there any other limitations?

Yes, unfortunately.

  1. Users cannot continue an exercise on their desktop browser if they start it on their smartphone unless they are logged in. Or vice versa – data is stored in the browser’s storage. In that case, the H5P plugin makes it possible.
  2. Browsers limit the amount of local storage available per domain to 5MB or 10MB. This means that if users access a lot of H5P content, if H5P content stores a lot of data, or if other parts of your site use the local storage, space may run out and data may be lost.
  3. Similar to H5P itself, the plugin cannot store the state of content embedded with embed codes rather than WordPress shortcodes.

Can I get the source code?

Of course! Please find the plugin’s source code on github. It is licensed under the beautiful MIT license, so feel free to check it, use it, learn from it, share it, modify it, …

Sponsor note

The plugin was developed by Sustainum within the XR Energy project. Development work was carried out by Snordian as a contractor.

“Funded by the European Union. Views and opinions expressed are however those of the author(s) only and do not necessarily reflect those of the European Union or the European Education and Culture Executive Agency (EACEA). Neither the European Union nor EACEA can be held responsible for them.”