Question import improvements

Question import improvements

di Andreas Steiger -
Numero di risposte: 4

Dear all,

This will be my first MoodleMoot and I'm really excited to be a part of it!

Some background about me: I came here through the STACK question type, which I'm using heavily in my entry-level calculus courses here at ETH. We developed some tools to work with MoodleXML files and I'd love to see some progress for this issue here:

https://tracker.moodle.org/browse/MDL-74070

For example I'd love to enter some sort of question UUID into a MoodleXML file, and if I upload that, Moodle just updates the question contents instead of creating a new question. I realize that this is all still a bit vague, but I'm happy to commit more time into such a feature. While I never worked on the Moodle source, I have experience working with PHP and in software project design.

Best, Andreas

In riposta a Andreas Steiger

Re: Question import improvements

di Georg Osang -
For any kind of applications doing batch operations on exported MoodleXML questions, this sounds like a really useful feature.
There have been various bulk edits I've wanting to make in the past, but having to re-create all quizzes (because new questions getting created rather than the questions being updated) was too much of a blocker.
One other issue that has been nagging me in the past is how author and timestamp information gets lost; if the question history gets updated upon import, this is at least resolved when re-importing questions. (The question remains, should this information actually be part of the export in some shape or form?)

This also seems very useful in light of the applications from the recent stack conference (your integral trainer, "Modular database approach to manage a large set of STACK questions" and "Streamlining the translation and exchange workflow for STACK exercises" -- from what I gathered from the abstracts; unfortunately I wasn't able to attend the talks).
A major question that I see here is: Should the long-term aim be to integrate such desired features (more modular question structure allowing reuse of components, templating, versioning, etc) directly into Moodle/STACK, or to build toolchains to work with MoodleXML files? (The latter is obviously easier in the short-term, but risks code-duplication and desync/breakage whenever Moodle/STACK code gets updated).
In riposta a Georg Osang

Re: Question import improvements

di Andreas Steiger -

Given that Moodle 4 offers versioning features for questions, I think we should stick as much as possible to that framework. The MoodleXML file structure should then only be extended by what's needed to make this work.

As for breaking questions through updates, we should probably use the "old versions" which Moodle already has when you try to delete a question which is in use. We'll definitely need someone with knowledge about the inner workings of the Moodle question bank to make this project fly, though...

In riposta a Andreas Steiger

Re: Question import improvements

di Tim Hunt -
Yes, enhancements to import should work with versionning. I don't think that requires chagnes to the file format, but I might be missing something.