Skip to content
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

Save content state in browser local storage (settings) #112

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

otacke
Copy link
Contributor

@otacke otacke commented Mar 27, 2020

Pull request h5p/h5p-php-library#81 will allow H5P to store the current content state in the browser's local storage. It needs to be turned on though.

When merged in, admins can set the current state to also be stored in the browser local storage, so student can resume their exercises even if they are not logged in.

Requires h5p/h5p-php-library#81 to take effect.

Implementation details

  • Add select field to WordPress options labeled "Users who may resume tasks" with options
    • "Only users who are logged-in" (= current behavior when "save content state" is activated; default)
    • "All users" (= storing in database and local storage)
  • New option will only be visible when "save content state" is activated
  • Bonus: Frequency for saving option will also only be visible when "save content state" is activated

otacke and others added 3 commits March 12, 2020 18:48
Requires changes in h5p-php-library to take effect
Some identifier for localStorage items is necessary because
there may be multiple sites on the same domain
@otacke otacke mentioned this pull request May 13, 2020
@bernhardkaindl
Copy link

@icc, can you review this or somebody else?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants