Uploading H5P course presentation file into Moodle H5P

ACERlearning's picture

I have a number of existing Course Presentations created on the H5P.org platform. I have downloaded these and tried unsccessfully to upload them into a new H5p within the Moodle platform.  I am able to upload and view the file, but when I try to save I am asked to select a content type. If I select Course Presentation, I am presented with a blank course presentation, and lose the uploaded file. 

I am able to successully upload interactive video and drag and drop files, but not course presentations. Is this a known bug? Any workarounds?



Upload error
Content types: 
BV52's picture

Hi Lillian,

Please provide the following:

  1. What is your Moodle version?
  2. H5P version
  3. sample content that you cannot upload



ACERlearning's picture

Hi there, 

Our Moodle version is 3.7.  I'm not sure how to work out the version of H5P.  Is there an easy way to check this?

Not only have I not been able to upload my own created Course Presentations, but I tried to upload the sample one(Cloudberries) from the H5P site. Same issue. My technical support colleague experienced the same issue, but was able to uplaod it to another Moodle site that he has access to which is running an older version of Moodle and H5P.  

serettig's picture

Have you used the Copy.& Paste feature to insert images in the Course Presentation, by any chance? I've noticed a bug on h5p.org that makes downloaded Course Presentations (and possibly other content types) unusble on other servers. In these cases it is possible to upload them and view the editor, but you can't save them.

I've investigated the cause and in my case it was caused by broken relative links in the paramters. Here's an explanation for the devs: 

There are relative path references in the broken package's content.json file. They look like this '../1234/images/image.png'. (1234 being the id of another h5p content object) They are artifacts of the copy & paste mechanism and it looks like the H5P server was unable to duplicate the source file from a copy and paste operation while saving the Course Presentation for the first time (on h5p.org). Thus, the relative link was left in place, even though it shouldn't. Now the new server the h5p package is uploaded to tries to duplicate the file from content object 1234, but this object doesn't exist on the new server, as the id is from the h5p.org server. That's why the save operation fails and you see an error. I'm not sure why duplication of the image file didn't work on h5p.org but the server should simply remove the path in this case to avoid breaking the package when downloaded later.

The same thing apprently can also happen with images in temporary files (there are paths in content.json that end with #tmp and break uploads).

It would be great if the devs could have look at this bug. Unfortunately, I can't provide demo files, as the problem occured with someone else's files and I can't give out their content.

ACERlearning's picture

No I don't use copy and paste in these interactions. The images are uploaded. 

This is not just an issue with presentations I have developed myself. I tried downloading the sample presentation from the H5P examples page (strawberry) and it also will not load. Other activity types are working. 

ACERlearning's picture

We have now discovered that additional types of interactions are not uploading. They include question sets and hotspots. We are getting error messages about the question types not being available on the server but technical staff tell me they are. 

We are also now unable to edit course presentations, question sets created on our own server.  

BV52's picture

Hi ACERlearning,

I think these are 2 different issues. For the Question set issue I think this can be resolved if you upload an updated content, you can try this using my test content.

For the other issue can you check if there are errors in the browser console when saving the content.