by Martin Breuss.
Sorry, I didn't manage to find anything useful. There are two alternatives, both not great IMO:
- Understand the Database structure and directly insert your content into the SQLdatabase
- Understand how Moodle's `.mbz` (= ZIP) exports are structured, recreate such a structure from your content locally, compress it, and upload it to Moodle
I haven't done either because:
- seems pretty insecure and I don't want to mess with the database directly, plus the table relations for some of the resources are pretty confusing for me...
- the file structure and partial files look quite messy, they're all in XML, and it just sounds like a huge workload to build something custom that recreates that
Maybe someone smarter than me who has experience with PHP could fetch the code from Moodle's codebase that does the compression (when creating a course export) and could repurpose it as a stand-alone script that takes a folder with Markdown files as input. That'd be great But sorry, I don't have anything useful myself.