Creating a Plone integration and server-side Python module

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's picture

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's picture

I guess you saw the documentation already?

- Tom

Zope/Plone runs an own server process; Apache rewrites the requests for the other port (and does some mangling for Zope's virtual hosting feature).As for Apache, it should be perfectly possible to exclude the path /h5p from this rewriting procedure and have a directory in which PHP code is executed. Would H5P join the game willingly?One idea would be to have a Moodle installation for H5P maintenance. Did anyone setup something like this for a non-PHP server?
tomaj's picture

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