Add 'Find Multiple Hotspots' to the AR Scavenger Interaction list

I would like to use the 'Find Multiple Hotspots' as one of the possible interactions when creating AR Scavenger content. 

I tried to add it by adding  "H5P.ImageMultipleHotspotQuestion-1.0", to the AR Scavenger 1.4 semantics.json interaction list in:

  "fields": [

                {

                  "name": "interaction",

                  "label": "Interaction",

                  "type": "library",

                  "options": [

 

but it didn't work out, and the 'Find Multiple Hotspots' content type is still unavailable in the Interactions list.

How to do it? Or is it a new feature?

Will appreciate any help or advice.

0
0
Supporter votes Members of the Supporter Network can vote for feature requests. When the supporter network has generated sufficient funding for the top voted feature request it will normally be implemented and released. More about the H5P Supporter Network
otacke's picture

The approach is correct, but you did not succeed because H5P does not use the semantics.json file once the content type has been installed. H5P generates a couple of database entries based on what it finds in the H5P file and uses those. Options are:

  1. Set your platform into development mode temporarily and upload an H5P file with your patched library (cmp. comments at https://peter.baumgartner.name/2021/04/12/h5p-library-installation/)
  2. Adjust the database manually (here adding the correct entry in libraries_libraries (somehing like that) should suffice) and ensure that H5P's caches are cleared (cachedassets folder on WordPress, dunno on moodle)
  3. Fork the ARScavenger content type by changing the machine name H5P.ARScavenger to something else where found and upload the respective H5P file.

Note though that for 1 and 2 there must not be a later version of AR Scavenger installed (1.6 is the latest). Otherwise, H5P will use that. Also note that any later official version of AR Scavenger that you install will override your changes. That's why 3 is the better approach despite obvious other downsides.

Please be very careful with what you do here. I'd not like to see the H5P community suffer because people tamper with H5P libraries without understanding consequences (see https://www.olivertacke.de/labs/2024/05/02/a-short-voluntary-h5p-fire-department-story-line).

Please also note that there is a reason why Find Multiple Hotspots is not found as a subcontent anywhere (see https://snordian.de/2023/11/16/why-isnt-h5p-content-type-x-available-as-a-subcontent-option-in-content-type-y/)

Thank you for the clarification. I plan to try option 3 and would like to use the newest version, AR Scavenger 1.6, as the base. How can I install it on WordPress? The Hub still shows version 1.4 as the latest available.

otacke's picture

There are plenty of outdated versions served on the H5P Hub, unfortunately, and others have been waiting in line for ages - you can grab mine from https://www.olivertacke.de/labs/h5p-content-types/

Alternatively, you can grab the source code from github (https://github.com/otacke)

Thank you for givinig acces to the IN-REVIEW content types on your webpage, it is tremendously helpful.

It seems that for the AR Scavenger the package which is available under the link is still the old version, though.

otacke's picture

No, just checked. https://www.olivertacke.de/labs/2020/08/02/arrrrrr-ar/ serves version 1.6. Please note that https://h5p.org/content-types/ar-scavenger is H5P Group's page which is fed by the H5P Hub.

Yes! Thank you very much. I appreciate your work a lot.

Thank you for the clarification. I plan to try option 3 and would like to use the newest version, AR Scavenger 1.6, as the base. How can I install it on WordPress? The Hub still shows version 1.4 as the latest available.