Is H5P appropriate for a custom differential equation solver?

I've created a custom javascript differential equation solver, and I want to include it in an OER Calculus textbook I'm creating.   However, I am not a professional software developer and I don't know how to host or otherwise include it in the OER textbook.   Would H5P be an appropriate platform to host and include this content?  I've included a screenshot and the javascript code in the attached txt file.  The code depends on math.js an plotly packages, which are under the MIT license.  It does involve user inputed functions which may be something of a security risk.   From what I can tell this sort of content is outside the scope of H5P, but I wanted to make sure.

 

otacke's picture

Hi Tyler!

Since H5P content types are written in JavaScript, there's no reason why that math.js library would not work in H5P content types. But: Someone will have to find the time/funding to create a content type around it.

Best,
Oliver

Hi, Tyler.

I'm not sure if this is the kind of thing you have in mind.  I use H5P for my online "textbook' to support my high school science teaching.  I embed javascript apps using the iframe embedder content type within a column.  My materials are on our private school Moodle server, but here is a simple example copied to my Wordpress site illustrative purposes.

Explore Projectile Motion - profferings

I use the H5P column as the overall container.  The introductory text is a "Text" content type and the guiding questions at the end use the "Question set" type.  The projectile grid and controls are a separate webpage inserted using the "iframe embedder".  That page is hosted separately on my personal website. 

The javascript apps are usually ones that I create myself.  Due to limitations of the iframe embedder, I have to design them carefully.  The iframe embedder allows for responsive widths but not heights.  I have found best results when the app is a fixed height (500px for the projectile example) and the "resize supported" option in the embedder controls is left unchecked.  I try to create apps that are either a fixed width, small enough for phones, or coded so that they respond to varying screen widths without altering the height, while remaining usable on any screen size.

I'm not familiar with a math.js but from your screenshot and code it looks like yours is just a webpage that could be emebedded within a larger h5P context in a similar way, particularly if it is a fixed height page. 

Having said all that, I recently encountered this post - Iframe embedder - no permissions, no relative paths | H5P - which makes me wondering if  I should continue using the iframe embedder.

Regards,

Chris

Oliver and Chris -- Thanks for the replies.  Creating a whole new H5P content type seems like quite a bit of work -- I don't know if I want to go that route.   I am too sad that the iframe embedder is no longer supported -- that seems like it would have worked.  Maybe I'll do that anyway.  Anyway, thanks for the valuable information!

otacke's picture

Hi Tyler!

Well, there's a boilerplate template for both, simple content types and question type content types at https://github.com/h5p/h5p-boilerplate in the respective branch. The templates provide you with a frame for H5P content types that you can fill and that saves quite some time.

But sure, as I mentioned, someone (you or someone else) will have to think that it's worth investing the time to solve one's own or others' problems. You could plead your case here and elaborate on why such a content type would be benefitial for many people, offer moral support, cookies, ... and maybe some people will say "Yes! I can do that or find some other people to do it!"

Best,
Oliver