Howard has put an interesting MDL_8838 improvment proposition:
- What is a quiz import failure?
- If I import 100 question and one failed, should the Moodle code remove the other 99 questions?
- Should this be an option?
- Etc.
Howard has put an interesting MDL_8838 improvment proposition:
I've been working quite a bit with Moodle's import feature recently, and running into failures everywhere (partly with intent), so here's my two euro-cents from a perspective of an experienced failure...
The most probable reason for an import failure is some kind of format problem. Users get very puzzled about these kinds of thing. What the user most needs to know is where the problem is in their import, so they can weed it out.
With the current "stop-at-point-of-failure" system, the user gets a pretty good clue where the problem is, though the clues could generally be improved.
So if you take away the "stop-at-point-of-failure" system, you need to leave the user with a clue that it is at least as good, if not better, such as "try removing question X and then import again".
Another and perhaps better approach would be maximizing "fault tolerance". During my many import failures, I noticed that Moodle could often correctly count my questions, but stopped long before it had processed them all. This suggests that in these cases, later questions could have been imported if Moodle had wanted to. I'd suggest that higher fault tolerance than at present, coupled with a choice of remedial actions and clear indications of where problems lay, would be user-friendly.
For the inexperienced, losing 100 out of 100 questions could be distressing; getting 90% or so in (and then giving up on the rest) could mean that the test can more or less go ahead on schedule.
(Now, if only I knew why my numerical questions weren't importing properly, but that's another post...)
Cheers,
JM
Pierre Pichet wrote "Howard has put an interesting MDL_8838 improvment proposition:"
How about this...
If a question fails to import (for whatever reason), then do the following:
1) Stop the import, and advise the User that "Question# 23 in the import file, with Question Name xyz, has failed to import."
2) Ask the user if they would like to
(a) "Skip this question, and continue with import?" or
(b) "Cancel the import, but keep Questions that have already been imported?" or
(c) "Abort the import completely (do NOT keep Questions that have already been imported)?"
With all these options, this should keep everybody happy!!!
Also, giving as much info about which question caused the problem is also helpful... For example, the specific question number (ie: the 23rd question in the file), and the question name.
There are some practical difficulties to all this (of course)...
I would like to handle errors better in the import/export api. That would be to remove the task of reporting errors from the plugins completely so that it can be handled more consistently. My hope is that this delete everything issue would logically fall out of that. I need to have a bit more of a think about what that might look like.
I think I've spotted something important which nobody else has mentioned yet - but it follows on from the question about what to do with residual questions.
A story of import failure...
Attempt one: import 6 out of 20, with one skipped.
Attempt two: import 13 out of 20, reduplicating the original 6 (aaagh!).
It might be that reduplication which had everyone talkíng about deleting the original 6 after attempt number 1.
But surely (and isn't this the point that nobody brought up yet?) it would be better simply to have a little checkbox saying "don't reduplicate".
OK, I know a function for checking question identity would be a pain to write, but just think of the elegance of the user experience!
Just an idea.
Cheers!
JM