I have tried from the url of the h5p file, for example in gamipress and it registers points for me. It is not necessary to embed the shortcode in a post.
With your plugin I have to add the h5p shortcode to a post for it to register.
I use the url because I share this in google classroom directly.
Thanks in advance for your help.
This topic was modified 1 year, 11 months ago by jlop77.
I am still not sure if I understand you correctly. How do you add an .h5p file to a post or page and let it run? That’s not a feature that H5P brings you to the best of my knowledge.
I am using the mechanism to add custom code to H5P content that the H5P core team provides for this purpose. It is called “alter_scripts hook”.
I think if GamiPress or some other plugin adds a custom way to run H5P content (from an H5P file), then that plugin should make sure to do it in a way that’s compatible with how H5P would instantiate content – or all other customizations (like my plugin) that rely on the alter_scripts hook (or other things that H5P would normally do) won’t work.
I do not precisely want to add h5p to a post or page, since I am going to use it in Google classroom and I do not want to add an additional step to the teacher.
That’s not using an .h5p file, but using the H5P embed link.
If you access H5P content this way, then your are bypassing WordPress. If you bypass WordPress, then the server side of the H5PxAPIkatchu plugin is not started, only the client side (in the browser). If the server side is not started, then the client side does not receive the plugin options and the client side does not know where to send the data to. That’s why this approach is not working.
Sorry, I don’t have the free time currently to come up with a different way to handle this.
Feel free to try the latest update. You’ll have to activate that “embed supported” behavior in the settings though. I will not make this the default behavior.