Uploading content impossible in certain situations

serettig's picture


I've noticed a bug caused by the way content is automatically updated when it is uploaded through a h5p file from a local machine. I've encountered this bug when running automatic tests with h5p-nodejs-library, but I don't think it is caused by our unofficial implementation but by the way H5P dependencies work.

Steps to reproduce:

  1. Start with a clean libraries directory.
  2. Upload a package with H5P.Column in version 1.12 that only includes H5P.Blanks. The libraries will install properly.
  3. Upload a package with H5P.Column in version 1.11 that also includes H5P.InteractiveVideo. H5P.Column will try to update to 1.12, which has a new version of H5P.InteractiveVideo in its options. As the newer version of H5P.InteractiveVideo isn't installed, the upgrade of H5P.Column fails and it's impossible to use the content.

I don't think it's easy to fix this problem, as it is caused by the fact that H5P.Column doesn't include its theoretically possible dependencies in the preloaded dependencies list but only in the options in the semantics. This means that it's caused by a design decision and not a programming error.

The only way I currently see around this is to make sure that there all up-to-date-libraries are fully installed at all times.