Course presentation scripting



in order to make it easier for teachers to migrate from PowerPoint to h5p in Moodle, I would like to automate the creation of a course presentation .h5p content package. It would be feasible to download an empty course presentation as .h5p archive as input for the script. Desired workflow is

  1. A teacher exports his power point slides as .png files.
  2. He creates an h5p activity in moodle, selects type course presentation, provides a title and just saves it (empty presentation).
  3. He downloads the .h5p archive.
  4. He runs the script with all the .png files as image-input & with the .h5p-archive as package basis.
  5. The script puts all images in content/images.
  6. The script reads content/content.json and adds a slide element for each image.

The important part is, how to generate valid subContentIds for the element actions. Can someone provide clarification on that? Happy to hear your thoughts. Thanks in advance,

Content types: