I wrote this script for a Moodle based LMS platform I'm working on as a software dev at ITI. It converts docx files to XML format which can be imported into moodle as MCQs and True/False questions.
At the time of writing this, the intention was to QUICKLY upload course content to the LMS. As a result, there might be a lot of room for improvement and optimization in this code. May return to this in the future to improve & build upon this.
Place your docx file inside the docx
directory and run main.py
. The resulting file can be found inside the xml
directory. These directories already contain example files to show case how the code works.