catalyst / moodle-auth_outage

Planned, graduated user and admin friendly moodle outages
https://moodle.org/plugins/auth_outage
17 stars 32 forks source link

Embed H5P content is not showing when outage is active in Moodle 4.1 #338

Closed golenkovm closed 1 month ago

golenkovm commented 1 month ago

In Moodle 4.1 whne ouatge is active the H5P activities loaded in iframe seem to be broken.

URL example: /mod/hvp/embed.php?id=123456789

Error in browser console:

Uncaught SyntaxError: Unexpected token '<' (at a0e3ac64b93f8fdde53eb3fe9d87bee8d6fc8777.js:2:1)
h5p.js:56 Unable to find constructor for: H5P.DragQuestion 1.14

jquery.js:2 Uncaught TypeError: Cannot read properties of undefined (reading 'on')
    at H5P.on (h5p.js:134:279)
    at HTMLDivElement.<anonymous> (h5p.js:9:97)
    at Function.each (jquery.js:2:2976)
    at S.fn.init.each (jquery.js:2:1454)
    at H5P.init (h5p.js:5:57)
    at HTMLDocument.<anonymous> (h5p.js:170:26)
    at e (jquery.js:2:30005)
    at t (jquery.js:2:30307)
golenkovm commented 1 month ago

Potentially could be related to #298

golenkovm commented 1 month ago

Workaround instructions: