Skip to content

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

Open
otacke wants to merge 3 commits intoh5p:masterfrom
otacke:save-content-state-local-storage
Open

Save content state in browser local storage (settings)#112
otacke wants to merge 3 commits intoh5p:masterfrom
otacke:save-content-state-local-storage

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.

2 participants