Creating a Plone integration and server-side Python module
Submitted by tobiasherp on Tue, 02/21/2017 - 13:01
Forums:
I'm quite new to H5P, and I'd like to create a Plone integration for H5P (viewing only would be sufficient, for the first shot).
In my current understanding, for integration of H5P it is needed to
- create a .../h5p/... directory structure
which contains .h5p files, - re-implement the server side code (for non-PHP-based servers),
and - generate the HTML integration code in pages wherever an H5P object is inserted.
Plone is based on Python, thus it could share a server-side Python library with Django, Turbogears, Flask etc.
Plone has a convention for resource directories which are prefixed by /++resource++, so e.g. the window.H5PIntegration.url could be /++resource++h5p, right? I could exclude this from Apache rewriting and let this path point to a physical directory on the server.
Any comments, hints, additions, corrections? Thanks!
tomaj
Wed, 02/22/2017 - 08:37
Permalink
Cool!
Hi,
I know there are some people looking into a Django integration. Maybe you should get in touch with them, to see if they have any code out to help you get started.
Start by commenting on this forum post.
Good luck!
- Tom
tomaj
Wed, 02/22/2017 - 08:39
Permalink
Documentation
I guess you saw the documentation already?
- Tom
tobiasherp
Wed, 02/22/2017 - 08:45
Permalink
Server-side part in mapped directory?
tomaj
Wed, 02/22/2017 - 09:01
Permalink
Suggestion
Hi Tobias,
I don't know if anyone did some hybrid solution like you are describing.
If you create the .h5p-file with the editor in Moodle or Drupal, it shouldn't be too difficult for you to just display an H5P using only python for your backend, and JS for your frontend.
Just use unzip on the .h5p-file to get to the files inside. And you have to pipe some of the json configuration into the JavaScript parts, and set a few global variables, and that's pretty much it.
Then you can listen to xAPI-events being fired to track user progress.
- Tom