MC multianswer all or nothing

MC multianswer all or nothing

by Itamar Tzadok -
Number of replies: 10

I know there is a plugin question type for all nothing but I prefer to avoid plugins if they are not necessary, and the mc all or nothingt seems to be a case in point. I had to change only 10 lines and add 16 to add the all or nothing option to the core mc. There may be more to it but very likely not much more. If there is willingness to incorporate such an enhancement into the core question I can follow the formal procedure of filing a tracker issue etc. Otherwise I'll just git it when I get to that. smile

 

Average of ratings: Useful (2)
In reply to Itamar Tzadok

Re: MC multianswer all or nothing

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

What does it do to the editing UI?

In reply to Tim Hunt

Re: MC multianswer all or nothing

by Itamar Tzadok -

Merely an additional option in an existing dropdown:

This way there are no changes to the question's DB structure.

I made the all or nothing a minimal extension of  qtype_multichoice_multi_question, overriding only  the grade_response method to comp the fraction as 0 for anything less than 1. The rest should behave exactly like the original multi.  So there may be some redundancies when constructing the question, such as the need to assign a fractional grade to each choice such that the sum of corrects is 100% and every incorrect is -xx%. But this seems to me a small price to pay for a much desired functionality for those who do not have the resources to mainain extra plugins. smile

In reply to Itamar Tzadok

Re: MC multianswer all or nothing

by Lev Abramov -

I like this solution much better than having two different question types - a "regular" multiple-choice question (with "One correct answer" and "More than one correct answer" being the available options) and the "All or Nothing" question type.

I believe it would be appropriate to add this as a core question type in the next version. Many thanks, Itamar!

Itamar, could you please post the amended versions of the file (for each existing Moodle version currently supported as from 1.9) rather than let us mortals tamper with the code on our own? That would be a real treat...

Lev

In reply to Lev Abramov

Re: MC multianswer all or nothing

by Itamar Tzadok -

I can definitely do that for the 2.1 version. I'll see what I can do about the others. smile

In reply to Lev Abramov

Re: MC multianswer all or nothing

by Itamar Tzadok -

Lev, since the last reply I moved on to a distinct multichoice question type which includes in addition to the single answer and multi answer also matching and ordering, with optional all-or-nothing and optional drag and drop. It is still in the proof of concept stage so no code release just yet and at any rate it will work only on Moodle 2.1 and higher (new question engine). If you want to add the all-or-nothing option to a specific version I can help. 1.9 and 2.0 will require more work than 2.1. smile

In reply to Itamar Tzadok

Re: MC multianswer all or nothing

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

That bit makes sense, but you still have the issue that in the rest of the question, each choice has a grade dropdown with a million choices, whereas for all-or-nothing scoring, you really only want the choices right and wrong.

In reply to Tim Hunt

Re: MC multianswer all or nothing

by Itamar Tzadok -

True, and so some may still opt to install the specialized all-or-nothing question type.

For me this is not a real issue because I don't use the question bank ui for creating questions, especially mc questions. I create them in excel which I set up to compute all the fractions automatically and then bulk upload into the question bank. I use the ui only for fixing typos. 

But I suppose many others who do use the ui may still appreciate the AON option in the core question despite the somewhat awkwardness of its ui. And the ui may get better in time.

Apropo ui, consider the following.

Here is what I get in the browser, top to bottom, when editing the mc question:

 

That's a choice and a half per visible screen. But with a bit of tweaking we can do much better:

 

 

That's four choices per visible screen, and needless to say, without all these editors rendering themselves the page loads much faster.

And if you want to edit the content of a choice you can simply click on the plus sign to open the respective editor:

 

 

Then you can click on the minus sign to close it and move to the feedback or other choices.

We can save even more space by omitting the fieldsets and rendering the elements of each choice in one line.

 

smile

In reply to Itamar Tzadok

Re: MC multianswer all or nothing

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

Have you been spying on my colleague Colin Chambers? He has been working on a lot of tweaks like that to the editing forms. In a few weeks we will be summarising what he has come up with, so we can have a discussion about which changes go into Moodle version 2.3.

In reply to Tim Hunt

Re: MC multianswer all or nothing

by Joseph Rézeau -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators

@Tim,

I'm looking forward to this. Over all those years of using the Moodle question editing interface I have privately (and sometimes publicly) pestered against the incredibly cluttered screen, which is getting longer and longer and needing more and more scrolling as more options are being added to the interface.

Joseph

In reply to Tim Hunt

Re: MC multianswer all or nothing

by Itamar Tzadok -

Indeed this is the case in the alternate qtype mentioned here. Per default there is no need to set fractions in any of the methods (single, multi, multi-aon).

The multi-aon (all or nothing) becomes a powerful tool. You can fix the number of choices but select the number of corrects and distractors randomly. So different instances may have different number of corrects and users have to consider all choices rather than break after a fixed number of corrects has been identified. smile