h5p / h5p-cli

Command Line Interface
MIT License
60 stars 25 forks source link

Cannot Re-use content on another platform #102

Open rezeau opened 1 month ago

rezeau commented 1 month ago

the CLI interface offers to Reuse Content as Download etc but it does not work: when importing the saved content into another platform! I get error message "A valid content folder is missing". Same problem if I use the CLI Export content command.

otacke commented 1 month ago

You may want to leave some more information. I can't reproduce/confirm this issue.

otacke commented 1 month ago

I'd just like to add a word of advice here. Be aware that the H5P CLI tool, when using the setup command, will use the sources of the master branches of the github repositories. That's usually not the release version, but a development version. If you use the H5P CLI tool blindly to build H5P files in order to install these on some other H5P integration, you risk installing untested buggy code on that platform and potentially even spread it if people download the respective content and upload it on their system. See also https://github.com/h5p/h5p-cli/issues/55

So, if that applies to your case, please rather pack the libraries that you have been working on, and then install only those on the other platform, and then create demo content or whatever on that platform.

rezeau commented 1 month ago

Thanks for the advice, @otacke ! I will be careful with contents created with the H5P CLI tool...

rezeau commented 1 month ago

Here is more information as requested by @otacke Scenario to test issue with a simple H5P content

  1. download True/False Question number 1 "Oslo is the capital of Norway" from https://h5p.org/true-false
  2. saved as true-false-question-34806.h5p
  3. in localhost CLI tool Import it, entitle it "Oslo true-false"
  4. View it and export it with Reuse button -> Download as an .h5p file
  5. Check that you've got the file Oslo-true-false.h5p in your Downloads folder on your computer
  6. Go to any one of these 3 platforms (local or online): Moodle, Drupal7 or WordPress
  7. and Download/Import the file Oslo-true-false.h5p
  8. Check that you get error message: A valid content folder is missing
  9. Open Lumi: Open Existing H5P -> Oslo-true-false.h5p
  10. Check that you can import it without errors
  11. In Lumi: Save As "Oslo-true-false-from-Lumi"
  12. Go back to any one of these 3 platforms (local or online): Moodle, Drupal7 or WordPress
  13. and Download/Import the file Oslo-true-false-from-Lumi.h5p
  14. Check that it is imported with no errors!
otacke commented 1 month ago

Still cannot reproduce this. Might be an issue with running adm-zip inside the H5P CLI tool on Windows (?) only.

devland commented 1 month ago

I cannot reproduce this either. On Windows it is recommended that you run the h5p-cli commands inside git bash.