Getting the answers to stay in order

Getting the answers to stay in order

by Kate Rhodes -
Number of replies: 12

Hi there,

I'm trying to build a quiz question that has 10 statements in which the user needs to choose the correct response. There are 10 responses as well. So in the drop downs are 10 Risk Factors - they look like Factor 1, Factor 2, Factor 3 etc...

In the drop downs, they are randomized, but I would really like to keep them in order from 1 to 10. This example is the Gapfill question, but I have tried other questions types and still can't get them to keep the answers in order.

Does anyone have a suggestion on what I can try? Maybe a different type of question???

Thank you! Happy new year!

screen cap

Average of ratings: -
In reply to Kate Rhodes

Re: Getting the answers to stay in order

by Dominique Bauer -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers

Hello Kate,

From MoodleDocs:

The editing form offers a field for adding wrong or distractor options. These only make sense in dragdrop or dropdown mode. Wrong answers must be entered as a comma delimited list and a shuffled list of correct and
incorrect answers will be displayed with the question. If you need commas to appear in your distractors they can be escaped with a backslash \,

So it looks like you can't have an ordered list with the Gapfill question type. Marcus could confirm.

On the other hand, you can use the Embedded Answers (Cloze) question type with its MULTICHOICE or MC format. Make sure that in the "Quiz settings" and under "Question behaviour", "Shuffle within questions" is set to "No". In this way, the answers will be displayed as an ordered list in the dropdown menus.

Average of ratings: Useful (2)
In reply to Dominique Bauer

Re: Getting the answers to stay in order

by Marcus Green -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
Gapfill always shuffles the options. I figured a checkbox for turning off shuffle would have added rarely used complexity. The core select missing words question has a shuffle checkbox, and I have just tested it and it seems to work.
Average of ratings: Useful (1)
In reply to Marcus Green

Re: Getting the answers to stay in order

by Kate Rhodes -
Thank you to both Marcus and Dominique!

I ended up reformatting the question and it works the way I want it both the Gapfill and in the Cloze question type. Sometimes you can't see the forest for the trees can you.
Average of ratings: Useful (1)
In reply to Marcus Green

Re: Getting the answers to stay in order

by Troy Patterson -
Hi. I'll throw my pitch in for adding this feature (allowing for an ordering of the potential answers) as well. Here is one use case:

Teachers spend an inordinate amount of time with spelling. I use the Gapfill question type ( with the following settings: Drag and Drop | Fixed Gap Size |Options after text). This creates a structure that is almost perfect.

I've created a question, where I have 12 spaces available. For distractors, I entered all of the letters of the alphabet.
Teachers just need to duplicate the question, then type the letters of the spelling words in between each bracket. (And record themself reading the word).


Since this is being used by elementary students and is a spelling test, having the "answers" in alpha order would be helpful.

Options:
I have created the question as Drag and Drop built-in question type. It does "work". However, gapfill is so much more elegant and easy to use. (Yes, I understand that I'm asking for a bit of additional complexity). The Drag and Drop built-in question ends up with teachers having to enter a number that corresponds to the correct letter (which is kind of weird for teachers). Thus, the question ends up looking like this:

Plus, if we have mixed upper and lower case, the answers double.

Gapfill is so much more elegant. In gapfill, it would look like this: [t][h][e]. Much easier for the teacher to enter.

I can see utilizing a strict order for elementary students.

Thanks so much for this excellent plugin (I use this and WordSelect regularly). I realize that this is a specialized use case, but Thank you in advance for consideration.
In reply to Troy Patterson

Re: Getting the answers to stay in order

by Dominique Bauer -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers

Hello Troy,

With the formulas question, set:

Global variables: alphabet=["","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"];

Answer: [13,15,15,4,12,5]

Part's text: {_0:alphabet:MCE}{_1:alphabet:MCE}{_2:alphabet:MCE}{_3:alphabet:MCE}{_4:alphabet:MCE}{_5:alphabet:MCE}

and you get this:


Average of ratings: Useful (2)
In reply to Dominique Bauer

Re: Getting the answers to stay in order

by Dominique Bauer -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers

Hello Kate,

With the formulas question, set:

Global variables: factor=["","Factor 1","Factor 2","Factor 3","Factor 4","Factor 5","Factor 6","Factor 7","Factor 8","Factor 9","Factor 10"];

Question text: <p>Match the statements or scenarios below to the best Risk Tolerance Factor that is involved.</p>
<p>(<b>HINT:</b> You will only use each Risk Tolerance <u>once</u>)</p>
<p>{#1}</p>
<p>{#2}</p>
<p>{#3}</p>

Part 1
Answer: 7
Part's text: I have driven in worse conditions than this and did fine. {_0:factor:MCE}

Part 2
Answer: 9
Part's text: I've never seen of heard anything bad happen from doing it MY way. {_0:factor:MCE}

etc.

and you get this, where the choices stay in order:

In reply to Dominique Bauer

Re: Getting the answers to stay in order

by Germán Valero -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators
@Dominique:
@Joseph:

Making questions to test for correct spelling is a very important issue in language teaching in many languages.

Can you please have a look at https://docs.moodle.org/38/en/Spelling_questions and add/remove/change as necessary?

Thanks in advance
Average of ratings: Useful (1)
In reply to Germán Valero

Re: Getting the answers to stay in order

by Joseph Rézeau -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators
@Germán,
I will add my regexp question type to that docs page.
Average of ratings: Useful (1)
In reply to Joseph Rézeau

Re: Getting the answers to stay in order

by Dominique Bauer -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers

@German:

I added some explanations.

Thank you.
Average of ratings: Useful (1)
In reply to Troy Patterson

Re: Getting the answers to stay in order

by Joseph Rézeau -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators
Hi Troy,
Not related to the discussion at hand, but ... did you get my PM message?
In reply to Joseph Rézeau

Re: Getting the answers to stay in order

by Troy Patterson -
Yes, I did. Sorry for the delay. I've been caught up in other parts of the job. I'm just getting back to the instructional parts.