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

Support cloning of H5P activities #1529

Closed
greatislander opened this Issue Dec 20, 2018 · 0 comments

Comments

2 participants
@greatislander
Copy link
Member

greatislander commented Dec 20, 2018

Feature Description

Cloning operations should include the cloning of H5P activities.

Feature Use Case

H5P activities are often an integral part of open textbooks created on Pressbooks and as such it should be included when cloning these books.

Implementation Notes

  • Depends on the production release of changes currently in the H5P WordPress plugin's master branch which address h5p/h5p-wordpress-plugin#63
  • H5P cloning will only work from networks running a supported version of the H5P plugin (which exposes REST API endpoints for H5P activities); if content is found but the H5P endpoints aren't available, we need to notify the user
  • The H5P plugin needs to be active in the target book in order to create the H5P activities; if it is not installed we need to notify the user
  • Initial activation of the H5P plugin involves showing a privacy/welcome notice et cetera, so this is an expectation we should set with users when they navigate to a freshly-cloned book

Maybe something like this?

  1. Look for H5P endpoints on source book when setting up clone data, set $this->sourceHasH5pApi accordingly;
  2. Check for substring [h5p id= to the cloner's processing of post content; the first time it detects that, set $this->sourceHasH5p to true;
  3. If $this->sourceHasH5p === true but $this->sourceHasH5pApi === false, add a notice to the user indicating that the H5P could not be cloned and why.
  4. If $this->sourceHasH5p === true and $this->sourceHasH5pApi === true, activate the plugin so content can be cloned properly.
  5. If the plugin is not locally available, add a notice to the user indicating that the H5P could not be cloned and why.

System Information

H5P: master
Pressbooks: 5.7.0-dev

@greatislander greatislander added this to the 5.7.0 milestone Dec 20, 2018

@greatislander greatislander added this to To do in Pressbooks 5.7.0 via automation Dec 20, 2018

@greatislander greatislander moved this from To do to In progress in Pressbooks 5.7.0 Dec 20, 2018

Pressbooks 5.7.0 automation moved this from In progress to Done Feb 1, 2019

greatislander added a commit that referenced this issue Feb 6, 2019

Fix: Sometimes H5P cloning will fail and we can't do anything (fixes #…
…1529) (#1586)

* Fix: Sometimes H5P cloning will fail and we can't do anything

Related to: h5p/h5p-wordpress-plugin#83

* Fix typo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment