H5P shortcodes are not working in ajax call

I am uploading H5P contents to my wordpress site which is made with WPLMS theme. The theme doesn't support H5P right now.

Therefore I make H5P contents in another wordpress site which supports H5P and then upload them onto my WPLMS site.

The problem is that H5P contents work OK in pages and posts which are not related with ajax calls as you can see here, http://smartvoca.com/unit/movie-english-3-annie/?id=2610

However, in WPLMS, in course units, the unit contents are loaded with AJAX and then H5P contents don't work.

In the course units of WPLMS, the contents are triggered by a jquery event "unit_traverse" when a unit is loaded.

How can I solve this problem? Can H5P shortcodes be made compatible with AJAX?

Or else if there's anything to solve this problem, please let me know.

 

falcon's picture

Yeah, we have it on the list. Currently there is no simple way to fix this, but we will change how H5Ps are initialized making it much easier to use H5P for content that are loaded via ajax. Thanks for reporting!

Thank you very much. I love H5P so much and want to make contents for my students on my site. I would really appreciate if you make H5P work for ajax call. H5P is the best!!.

falcon's picture

We will :) It might take a few weeks until we can start on this, but we'll get there :)

It means a lot to use H5P in my site. You have given me a lot of hope in building my site. Thanks a million again!!

falcon's picture

:)

Thank you for the release of H5P 1.4.0. I appreciate it. I like the the function of embedding. The embedded source code works perfect even in AJAX call. However, I found out that the shortcodes of H5P still doesn't respond to AJAX call which can be found in WPLMS course units. I know H5P team are doing their best to work it out. Thank you very much^^ 

 

falcon's picture

You are correct. We still haven't solved the WPLMS issue, but we will :)

I have the same issue , there is no fix done yet ??

Hi, any update on that issue?

falcon's picture

I thought we had fixed that problem. Adding a new issue so that it will be investigated this summer.

Hi!

You guys must be tired of the H5P /WPLMS issue by now :) Do I dare asking about the progress of making H5P and WPLMS compatible? We really would need your features by now..

Thanks

/Erik

 

fnoks's picture

Hi,

I would really like to say this is fixed, but I am afraid not. There is an issue in the H5P issue tracker about figuring out a generic way of loading H5Ps, so that it also works e.g. when loaded using ajax. I am not sure when we are able to prioritize that issue.

Hello!

Thank you for quick reply. Ok, got it! Is there perhps any module with wordpress that could help solving the problem?

/Erik

Hi again!

Just a comment to earlier post. The h5p works in the preview mode (inlogged in LMS)

/Erik