Arithmetic Quiz error: Unable to find constructor for: H5P.ArithmeticQuiz 1.1

Hi,

I’m using Moodle 3.5. The h5p plugin version is 1.17.2 and the Arithmetic Quiz is 1.1.8.

Only the Arithmetic Quiz is returning error, all the other contents are working fine.

I think the error starts to happen when I updated the Arithmetic Quiz, not sure.

When I try to perform an “Arithmetic Quiz” activity, nothing is shown in the page and the following error is shown in the browser console:

h5p.js?ver=2019031301:876 Unable to find constructor for: H5P.ArithmeticQuiz 1.1

H5P.error @ h5p.js?ver=2019031301:876

h5p.js?ver=2019031301:2137 Uncaught TypeError: Cannot read property 'on' of undefined

    at Object.H5P.on (h5p.js?ver=2019031301:2137)

    at HTMLDivElement.<anonymous> (h5p.js?ver=2019031301:211)

    at Function.each (jquery.js?ver=2019031301:2)

    at init.each (jquery.js?ver=2019031301:2)

    at Object.H5P.init (h5p.js?ver=2019031301:93)

    at HTMLDocument.<anonymous> (h5p.js?ver=2019031301:2716)

    at c (jquery.js?ver=2019031301:2)

    at Object.fireWith [as resolveWith] (jquery.js?ver=2019031301:2)

    at Function.ready (jquery.js?ver=2019031301:2)

    at HTMLDocument.H (jquery.js?ver=2019031301:2)

 

Could you please help?

Kind regards,

Lucas

Hi,

It works with this: $CFG->mod_hvp_aggregate_assets = '0';

However, if I remove the line, it does not work, even following the steps below:

1. Put the following in config.php

$CFG->mod_hvp_dev = true;$CFG->mod_hvp_aggregate_assets = '0';

2. Go to your Moodle's /mod/hvp/library_list.php page. Here there's a form when you can upload the example content file

Any idea?

icc's picture

Hi,

I believe this should be fixed in the latest version. You should make sure you are running the latest moodle plugin and then press the update button on the content type when creating content.