Reforming the quiz edit page

Reforming the quiz edit page

by Gustav W Delius -
Number of replies: 9

The quiz edit page could be improved. One thing I would like to change is the way in which currently changes are only saved when one leaves the page. If one adds a question to the quiz by pressing "Add selected to quiz" or if one deletes a question from the quiz by clicking on the delete icon then one is led to believe that this action has indeed been performed because the display on the page changes accordingly. However in reality the quiz is not actually updated in the database until one clicks on "Save this whole quiz". This leads to two problems:

1) If the teacher navigates away from the page for example by following the breadcrumb links the changes are lost.

2) When deleting a question from the quiz and then trying to also delete it from the category one gets an error message that the question is still used in the quiz.

I think it would be much better if the changes were made in the database straight away. Are there any objections to this?

Average of ratings: -
In reply to Gustav W Delius

Re: Reforming the quiz edit page

by Dawn Wright -
I agree. It took me awhile when I first started with Moodle to understand that changes were not being made immediately and I still occasionally forget and lose my changes.
In reply to Gustav W Delius

Re: Reforming the quiz edit page

by Gustav W Delius -
Since no-one has indicated that they really like the way it is done at the moment I will now go ahead and try to change edit.php so that the modifications to the quiz get saved to the database as soon as the teacher makes them.
In reply to Gustav W Delius

Re: Reforming the quiz edit page

by Martin Dougiamas -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
The only problem is that there will not be an "undo" anymore ... but if others have no issue with this then I don't.  Where are all the usability advocates when it comes to the crunch, eh?  wink

I'm aiming for a 1.5 beta in about three weeks so please try and make sure everything you're working on is in a stable state by then.
In reply to Martin Dougiamas

Re: Reforming the quiz edit page

by Gustav W Delius -

Yes, I thought about this trade-off between loosing the ability to undo changes and the danger of loosing changes accidentally and I think the later far outweighs the former and I have therefore commited my changes.

Your plan of having a stable Moodle 1.5 fits very well with our plans. It gives us a nice deadline to work against.

In reply to Gustav W Delius

Re: Reforming the quiz edit page

by Eloy Lafuente (stronk7) -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Peer reviewers Picture of Plugin developers Picture of Testers
And should these be solved too?

http://moodle.org/mod/forum/discuss.php?d=17401&parent=82995

Not sure if they are things to solve or intentional behaviours! But having records in quiz_question_grades consistent is a must to move the "questions" field from the quiz table to its new, normalised, place in the future.

Ciao smile
In reply to Eloy Lafuente (stronk7)

Re: Reforming the quiz edit page

by Gustav W Delius -
Thanks for bringing this up. I think my new code already fixes that.
In reply to Gustav W Delius

Re: Reforming the quiz edit page

by Eloy Lafuente (stronk7) -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Peer reviewers Picture of Plugin developers Picture of Testers
Cool smile, just testing it now!

Uhm, great, now quiz_question_grades seems to be syncronished with real questions in the quiz and the auto-save works!

But, if somebody has made an attempt... record is deleted from quiz_question_grades, but not from question_responses, so the student has some result based in a non-existing question. Perhaps would it better to forbide deleting questions from a quiz if it has been attempted? Or what to do with responses and final grades?

And, finally, I tried to delete one used-question and the "question XX is in use" message whas showed. Nice!! But when I tried to delete an unused-question, the "infamous" wink "sesskey required" messsage was showed.

Anyway, a great advance in quizz editing! Cheers!

Ciao smile
In reply to Eloy Lafuente (stronk7)

Re: Reforming the quiz edit page

by Timothy Takemoto -

Thank you Gustav! I think that this is a major advance in usability. I have forgotten to press that save changes button and lost changes more times than I can remember.

It would be nice if the bottom button on the first quiz page, with the deadline etc, also saved changes.

The possibility of students taking questions that have disappeared - if this is in effect the point that Eloy is making - is a bit worrying. I usually create quizes before I put them them up but occasionally after.

Tim

In reply to Eloy Lafuente (stronk7)

Re: Reforming the quiz edit page

by Gustav W Delius -

Thanks for reporting the sesskey bug. It is now fixed.

The problem with deleting questions that already have attempts, this is part of the wider issue on which I have tried to start a discussion in another thread. The same problem arises when a question is edited in a way that changes the allowed responses. The solution I had advocated is to keep the old question around for the historic record.