Custom Question creation

Forums: 

Hi,
Hope this message finds you well. 

I have created the custom feature to create the questions in H5p plugin via CSV file import. 
It's working fine but could you please guide me how I can save the image as well. If you have the sample code please share it with me. 

Also could you please confirm can I import the "cent"  symbol using CSV? Such as I wants to add the cent Symbol in question title.

otacke's picture

Hi!

You don't mention whether you're import to the H5P integration directly or whether you're creating an H5P content file that is then uploaded to the platform.

If the former, you'll need to implement an upload mechanism that fetches the image from a URL/path given in the CSV file and puts it to where it needs to be on the platform that hosts H5P. The location and the way to put it there may vary from platform to platform, so you'd customize that for every platform (or stick with whatever you are using).

The latter is a more general approach that will work on any H5P integration and that only requires you to follow the H5P specification (see https://h5p.org/documentation/developers/h5p-specification). You could simply have a look at Sebastian Rettig's implementation of a fully working proof-of-concept for CSV importing that way (see https://github.com/sr258/h5p-cli-creator).

H5P itself does not limit the characters that you can use in the title. Your platform (or rather the database setup) may prevent you from using certain symbols though.