Change label on content

Hello, i'm a developer with experience in javascript.

I'm using the multiple hotspot content, and I want to change one of the inputs to use a textarea instead of an input, but I'm having a weird issue because I can modify the content in the unzipped h5p but when I upload it the changes are not present. 

Using Lumi client.

Steps:

  • 1 - select the content type, save it and download it.
  • 2 - Uncompress the h5p
  • 3 - Edit /H5P.ImageMultipleHotspotQuestion-1.0/semantics.json - changing any description or tile with random text just to see if it works
  • 4 - Compress the file and upload it

 

  • Expected behavior: see the changes made previously
  • Current behavior: No changes happen
H5P file: 
Summary: 
Error editing content
Content types: 
otacke's picture

Hi!

An H5P integration (such as Lumi or one of the plugins) does not use a library file that you find in a content file if the library file is already installed on the platform (and the development mode is not active). The library files inside a content file archive are only relevant if you want to upload that archive to an H5P platform and the library that's required for using the content is not yet installed on the platform. In that case, H5P can install the missing library from the content file archive if the user who is uploading the content has the necessary permissions.

If you want to patch libraries (know what you're doing! Sharing of content may become a no-no!), then you'll have to do change the libraries on the platform (and take care of caches).

Best,

Oliver 

otacke's picture

Addendum: If you only want to change the labels, you'd want to use the alter_semantics hook that H5P offers for that purpose: https://h5p.org/node/2692