Moodle will not accept .glb files

  1. Tried to upload the ScavengerAR example from h5p.org to my own moodle and I receive the error mesage below.
  2. Moodle 3.9.13.
  3. Desktop
  4. Browser: Chrome
  5. H5P plugin version
  6. AR Scavenger (beta) (1.2.9)
  7. "Validating h5p package failed. File "content/files/file-621530699d69d.glb" not allowed. Only files with the following extensions are allowed: json png jpg jpeg gif bmp tif tiff svg eot ttf woff woff2 otf webm mp4 ogg mp3 m4a wav txt pdf rtf doc docx xls xlsx ppt pptx odt ods odp xml csv diff patch swf md textile vtt webvtt."

I have added .glb and .gltf to the list of filetypes in Moodle (/admin/tool/filetypes/index.php) but still receive the error message.

Any assistance how to make the ScavengerAR tool available would be awesome. Thank you!

otacke's picture

https://h5p.org/comment/45030#comment-45030

lizzie's picture

Hello!

I am getting the same issue on Moodle, with both glb and gltf files.
The solution linked to above is for Wordpress, does anyone have any advice how to fix this for Moodle please? Thanks!

otacke's picture

Hi lizzie!

The procedure is the same:

  • Locate the h5p.classes.php file. It should be located at your-moodle-path/mod/hvp/library/h5p.classes.php. If you’re using moodle 3.9 and above including moodle’s H5P integration, it should be located at your-moodle-path/h5p/h5p/lib/joubel/core/h5p.classes.php. If you're using both, the official H5P plugin for moodle and moodle's custom integration, you'll want to change both.
  • Find the line that contains the list of allowed file types.
  • Add glb and gltf to the list and save the files.
  • Rebuild caches if necessary.

Best,
Oliver

Hi Oliver and Lizzie

Our Moodle-hosting company tells me that changing the code directly isn't recommended and will cost us a service fee of several hundred euros.

Could these changes to to these .php files be included in a future h5p moodle-plugin update instead of requiring manual php file updates?

otacke's picture

Hi!

They already are in the latest version of H5P core, but the H5P core team will need to release an update of the plugin. That's out of my control.

Best,
Oliver

Understood. Thank you so much for your support.

Thank you Oliver, I will try this and respond. :)