Plans to implement question preview

Plans to implement question preview

by Przemyslaw Stencel -
Number of replies: 6

Hi guys,

Here at SWPS we're planning to start contributing code to Moodle. We'd like to start small so we've decided to have a go at the question preview feature in the Quiz module. This is how we're planning to do it:

The quiz editing window will have "preview" buttons (see screenshot below)
preview1.gif

Clicking on the icon will open a popup window with the question preview (see below).
preview2.gif

That window will allow the teacher to test the question (without actually writing any data to the database):
preview3.gif

Is there anything else that we should take into account when doing it? Any suggestions for improvements?

Przemek

PS
I'm writing "we", because in fact I'm only requesting the modifications, the real work will be done by Pavel Petrov.

Average of ratings: -
In reply to Przemyslaw Stencel

Re: Plans to implement question preview

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
Great, yes, that would be good.

Bear in mind that the quiz module is currently being refactored (by Henrik Kaipe) into a class-based model that will allow new question types to be plugged in. The deadline for this is the end of July.

However, it shouldn't be too hard to rewrite this small amount of code to fit into that new scheme later.
In reply to Martin Dougiamas

Re: Plans to implement question preview

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
Thanks, guys!   This is all in CVSapprove
In reply to Martin Dougiamas

Re: Plans to implement question preview

by Timothy Takemoto -

Wow, thank you Przemyslaw Stencel  for the "question preview"!

I was in bit of a head-to-head presentation against a commercial Japanese system called SMART-HTML today, basically a quizing machine that --as its name suggests-- started life as a sort of quiz producing authoring tool.

As one types into the "SMART-HTML" quiz production GUI on the left, the quiz is built and displayed on a frame to the right. It impressed those watching simply because one could see the quiz being produced, the radio buttos appearing. It makes the cuiz creator feel powerful.

But low and behold, I come back to the forums here and see that this one of the few features in SMART-HTML that is not in Moodle is pretty much already achieved. Joy.

I think that for all real purposes there is no need for real time preview, but perhaps the preview window might have a refresh button? Nah,,, just pressing the preview button again has that effect, I presume.

By the way, the other things that the Japanese quiz server SMART-HTML had that Moodle does not, were the following. If anyone has anything to say about them, please start a new thread.

1) Drag and drop quiz categories, from one course to another, from a teachers file, to a quiz (SMART-HTML uses Java). This was pretty impressive. Perhaps when the Moodle DMS comes into play quiz categories might be stored as files rather than in the database (Especially now that Howard Miller has a XML format for quizzes)?

2) The ability to set a difficulty level next to each question as opposed to just a grade in the quiz implementation of that question. I am not sure what good this is but it might be nice one day. Then categories could be sorted according to difficulty?

3) The ability to browse/select audio and image files on quiz answers as well as questions.  Again, I don't use this functionality now but there is no end to my greed. It would be pretty trivial to implement, just making the answers call the html editor but it would be heavy ( like the old Lesson module interface).

The happiest thing about todays presentation was that while SMART-HTML was billed as being SCORM compliant, and that was threatening to boot Moodle, in fact it turned out that SCORM IMPORT (only) was "PLANNED"!! "Ho ho," I scoffed, "Moodle has that already."

Ah Moodle,

Tim
takemoto

In reply to Martin Dougiamas

Re: Plans to implement question preview

by Przemyslaw Stencel -

Well, it didn't go exactly the way I described it above. Pavel told me that he had to change the display of the question results a little (compared to the way questions behave in a real quiz). The trade-off he was facing was that if he made the questions look exactly the same, the preview script would have to be updated each time a new question type is added. The way it is designed now is that new question types are 'catered for' by the preview script 'automatically', but the downside is that they look different in the preview than in a real quiz (which may be a little confusing at first).

To illustrate what I'm saying:

This is what the results of a multiple-choice question look like in a real quiz:
preview10.gif

And this is what they look like in the preview:
preview6.gif

I think it might be a little confusing to some people. On the other hand, as Pavel tells me, if we mimic the real-quiz behaviour, we lose the adaptability of the script. I think what we might do is just add some explanations to the preview window - it could look like this:
preview9.gif

Does this help? Or am I just trying to fix what ain't broken? Comments? Suggestions?

Cheers to all,
Przemek

In reply to Przemyslaw Stencel

Re: Plans to implement question preview

by Timothy Takemoto -

I think that I would be fine with the final version (with annotations) but for others, I guess it is a bit confusing that a "preview" window, is not really previewing.

If it is going to be different to the quiz, then the difference between it and looking at the settings becomes a little obscure.

Will the above work if the answers are randomised? I mean if the question part is produced by a different script to the feedback part then I am not sure how the randomisation in the question will be preserved in the feedback. At present, as far as I am aware, the order of the answers is not preserved in the feedback screen, which displays the answers in the order that they were input.  

Would it not be possible to put the parts inside a table, frame or iframe, so that it looks like the below?

p1

 
 p2


Thanks very much for the useful feature, either way.
Tim

In reply to Przemyslaw Stencel

Re: Plans to implement question preview

by Greg Hodgins -

Hi Przemek and Pavel,

I appreciate your efforts with respect to the quiz preview.

You might have a look here http://moodle.org/mod/forum/discuss.php?d=12842.

It would appear that the $quiz variable is not being set in the code, and I doubt very much that I have provided a hot fix that sets this variable in the desired location, or even method for that matter.

Perhaps you could fix it as you see fit.

Thanks.

Greg