Error in Moodle: Unable to find Constructor

I have created content using the Personality Quiz. The activity runs fine on H5P.org and it also renders in Moodle when I am building the course (I use the Chrome browser for development).

When I attempt to load the content in a course (in Firefox) under Guest access, the module doesn't appear. The description displays, but there is nothing after that. I turned on Firebug and two errors appear in the console:

     Unable to find constructor for: H5P.PersonalityQuiz 1.0
     TypeError: instance is undefined

I  have attached a screenshot with the details from Firebug.

*** New Information:  If I log in and then try to run the H5P content, it works. So the Guest account doesn't have the appropriate permissions? Anyone know how that might be rectified?

Content types: 
icc's picture

Hi! This appears to be a bug in the plugin. Users require the system permission 'Get cached H5P content assets' (mod/hvp:getcachedassets) to be able to view H5P content. This should have been enabled/allowed by default but for some reason, it's not. 

To get around this you need to edit the Guest role and allow the said permission.

We will fix this in the next version of the Moodle plugin.
Thank you for letting us know!

When I open to this all H5P content the error occurs " Cannot find H5P content"

papi Jo's picture

Where do you get that "personality quiz" from? I don't see it in the H5P dropdown activity list on my drupal or moodle sites!

tomaj's picture

Hi Joseph,

It's a little bit wierd, but you actually would have to download the demo content to get it today. It's just temporary, and there will be a much better way to get content types in an upcoming release.

- Tom

papi Jo's picture

Got it! I have downloaded and started experimenting with it. I find this activity amusing but not very convincing.