Automatically parse question category and variants from YAML
Currently, moodletools simply converts all questions within a single file to a Moodle XML. However, according to the Moodle XML Spec → Overall Structure of XML file it is possible to directly define the Category of a question within the XML file. This would be handy, as currently the user needs to specify which category they want to use prior to upload, which can become messy in large question banks.
To simplify things, I could imagine the following structure:
Each folder contains questions that belong to the same overarching task as the overarching category. Within this folder, each file presents a kind of question (e.g. "solve k-means" or "do this modelling task") modeled as a sub-category. This question / sub-category then contains variants, thus the actual questions.
As we want to be able to reuse questions, this approach would probably require the CLI (see #12 (closed)) to also take a "question prefix path"-parameter allowing the user to specify where within the question tree the question should sit. This parameter could also be derived from some metadata the user supplies such that moodeltools can create a valid path automatically.