Not all libraries are loading - Moodle module
I have a fairly complex interactive video, using several of the libraries. When I don't aggregate assets I can see that not all of the libraries I need are getting loaded, and that's causing JS errors.
I have updated to the latest code from Github for the module. Haven't updated all of the libraries yet (from github) because we are modifying a number of them for custom functionality. The ones it's complaining about are not ones we're changing. Those changes all work and load in videos when there are just a few interactions.
Currently getting: Unable to find constructor for: H5P.Image 1.0
But this hops around between a couple of my interaction types. I have the image library installed, and when I put together an interactive video using just that interaction it works fine.
When I look at my sources I can see that the library isn't being loaded. Only 15 are, and they are all ones that are used. I don't know if there is significance to that number though. Attached a screenshot of that.
Any pointers on what to look for?
keliix06
Tue, 05/08/2018 - 21:53
Permalink
An update after more research
An update after more research. 2 of the libraries that were used for interactions had dependency_type set to editor in hvp_contents_libraries. I switched those over to preloaded and it started working. I'm going to do some more digging on why that happened, may end up putting in a PR.
BV52
Wed, 05/09/2018 - 08:30
Permalink
Hi keliix06,I'm glad you
Hi keliix06,
I'm glad you found what you are looking for. If you need further assistance or have additional questions feel free to post in the forums.
-BV52
keliix06
Wed, 05/09/2018 - 15:15
Permalink
I figured out the issue, and
I figured out the issue, and it's not a problem anyone else will run into. I removed the call to getfilteredparameters() because it was filtering out HTML in some fields that I need, and I trust the source of data 100% so I'm not worried about things like XSS attacks (teachers will not have the ability to create their own). In doing that I removed the call to filterParameters() which is what updates the libraries.
BV52
Thu, 05/10/2018 - 01:50
Permalink
Hi kellix06,You never know :-
Hi kellix06,
You never know :-) but in any case thank you for coming back with your findings.
-BV52