Cannot embed H5P content

Moodle 3.5

H5P plugin - latest version

After upgrade h5p plugin to latest version, we cannot embed h5p content. Error message:

 

Exception - Too few arguments to function page_requirements_manager::js_call_amd(), 1 passed in [dirroot]/mod/hvp/embed.php on line 94 and at least 2 expected

 

What to do?

 

 

 

Normal 0 false false false EN-GB X-NONE X-NONE /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-parent:""; mso-padding-alt:0cm 5.4pt 0cm 5.4pt; mso-para-margin:0cm; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-fareast-language:EN-US;}

We have same situation 

Moodle 3.5 AND Moodle 3.9

Pierre-Olivier Vallès's picture

We are now facing the same situation on Moodle 3.5, while it was working fine a few weeks/days ago.
Moodle version has not changed over the last semesters.
I'm still investigating to find out was has been updated - most probably H5P's Moodle plugin.
I'll come back here once I can confirm that.

Moodle 3.5, all plugins updated.

otacke's picture

Hi all!

I just checked the github repository. It seems that jamie-catalyst contributed that change, cmp. https://github.com/h5p/moodle-mod_hvp/commit/90ddb95999395aa0928518f013069049bc786100. You might want to get in touch with him/her. Unfortunately there's no contact info on github, but you could add a comment to the respective line of code and mention him/her.

Best,
Oliver

Ist there an systematic update on the way?

Does anyone know?

Looks like this is a backward compatibity issue which we came across in Totara 12 which uses Moodle 3.3.9 under the bonnet so to speak.

In Moodle version v3.7+ method `js_call_amd` expects one mandatory param ($fullmodule) - https://github.com/moodle/moodle/blob/MOODLE_37_STABLE/lib/outputrequire...

In Moodle version v3.6 and lower versions, that method expects two mandatory params ($fullmodule, $func) - https://github.com/moodle/moodle/blob/MOODLE_36_STABLE/lib/outputrequire...