Unable to Upload to Moodle
H5P is an awesome concept and we're happy to have the opportunity to join and contribute to the community.
We're working on a "Code Explorer". The source is available here: https://github.com/TheCoderMerlin/H5P.CodeExplorer/tree/single-library
While it doesn't do much yet it does function fine in Drupal using "Development" mode. We attempt to package it with "h5p pack":
h5p pack H5P.CodeExplorer-1.0 code-explorer-1.0.h5p
This succeeds without issue:
Packing 1 library to file... H5P.CodeExplorer-1.0 OK 1.0.1001
However, when we attempt to upload the file to Moodle, we receive the following messages:
* invalid-content-folder : A valid content folder is missing
* invalid-h5p-json-file : A valid main h5p.json file is missing
Any help, hints, or ideas that would help us to correct our mistakes will be greatly appreciated.
Sincerely,
Yong
otacke
Fri, 06/30/2023 - 22:57
Permalink
Hi!You're trying to upload a
Hi!
You're trying to upload a mere library file in the H5P Hub/moodle upload form. Libraries are not content files and need to be uploaded on the library settings page of the H5P plugin for moodle/moodle's own H5P settings - depending on what H5P integration you're using.
Best,
Oliver
p. s.: I really just glanced at your repo, but I feel you could have saved quite some time and made your repository much simpler to maintain if you had used bootstrap/codemirror as npm modules instead of shipping the code yourself.
Yong-Yan
Sun, 07/02/2023 - 02:40
Permalink
Oliver,I appreciate your help
Oliver,
I appreciate your help. I added a content folder and was able to upload and use it correctly.
Thanks,
Yong