This a utility for "transpiling" a bullet-point google docs quiz into a format that may be imported into moodle.
For more details on internals please see the docs/
folder.
This utility depends on lowriter
for conversion of RTF to HTML IR, there is a additional python dependancy on
beautifulsoup4
for working with the HTML.
- Install libreoffice
pip install -r requirements.txt
Each part of the compiler must be invoked sequentially. As running lowriter produces a substantial amount of garbage, it is recommended to run this in a empty directory.
- Export a google doc as a rtf file
- Run the normalizer
python /path/to/RTFNormalizer.py <RTF file> <output file name | e.g. ir.html>
- Run the compiler
python /path/to/compiler.py <IR HTML> <Quiz Name | e.g. Minerals Quiz>
- Save the output (or pipe it) and upload the resultant file to moodle.
- Images and tables are present within the IR, they are however stripped during the final production. Ideally these would be kept so Images do not need to be manually inserted.
- Currently the quiz itself is not generated, ideally a moodle backup just for the quiz could be generated and restored.
- The tagger is not implemented