## Quiz

### A proposed new Gapfill question type

This discussion has been locked because a year has elapsed since the last post. Please start a new discussion topic.
A proposed new Gapfill question type

The Background

Cloze Syntax
The syntax for creating Cloze (embedded answers) question type in moodle is complex, which may discourage teachers from using it. For example the sample question on the help page is

{1:SHORTANSWER:=Berlin} is the capital of Germany.

And a multiple gap question using the shorter syntax would read as

The {1:SA:=cat} sat on the {1:SA:=mat}. The  {1:SA:=cow} jumped over the  {1:SA:=moon}

This creates a question with gaps for the student to fill in the correct answers of  Berlin, cat, mat, cow and moon This represents a minimum of eight characters including  six items  of punctuation for each field to create the question. The complexity of the syntax put me off this question type even though I  have spent much of my life as a programmer so I should be used to arbitrary punctuation syntax.

Code complexity
Because the current cloze question type does much more than the simple gapfill question, i.e. dropdown lists, radio buttons etc the source code is difficult to understand and modify.

New Gapfill question type
I propose a simpler gapfill question type with that only uses two items of punctuation as follows

[Berlin] is the capital of Germany. The [cat] sat on the [mat]. The [cow] jumped over the [moon]

The reduced feature set should result in simpler code and make it easy to understand and modify the source code and to add features.

Scope
My proposed gapfill question type is not in any way designed to be a replacement for the current Cloze question type. It will only support a single question element type and will not have per item feedback or mark value.

Note that there are contributed question types that address some of these issues such as Drag and Drop into text and Select missing words question types. However these also have a slightly complex question creation interface with a requirement to create numbers that point to answers. i.e. The 1 sat on the 2. And you then add the actual answers in other fields of the question creation form. I find this level of indirection somewhat confusing.

Reasons against
There are several attempts at creating a GUI for editing the current close question type, one in Javascript and one as a Java applet. Although these work they add another level of code to maintain and I have found neither satisfactory for my own purposes.

A Prototype
I have created a prototype for this proposed question type that will run in Moodle 2.2 and 2.3 beta code. You can see an animation of its use at the following link.
http://www.examulator.com/gf/gf.swf

I would appreciate any feedback on this idea.

Average of ratings: Useful (1)
Re: A proposed new Gapfill question type

Marcus, I think that a new question type for this (and many other such requirements) is the wrong approach. It's inflating the qtype list with minor specializations.

The same effect could be achieved by making it an editing filter which could be plugged in to the standard question type, and a bit of ui in the question editing for the user to select which editing filters to apply. Then a user could apply this filter and create a cloze question with this syntax. But since it's just a filter it doesn't prevent the user from using the advanced syntax for particular items. So the user could add also a few items with multiple possible answers next to the simplified items.

Average of ratings: -
Re: A proposed new Gapfill question type

I had a similar thought and spent some time trying to come up with something that would accept a simpler syntax with existing well tested Cloze code. However the codebase defeated me.

The code in the animation was actually part of an idea to come up with a very simple question type to act as a template for anyone wanting to understand how questions work internally.

Average of ratings: -
Re: A proposed new Gapfill question type

Very nicely implemented.

I would definitely be more likely to use this that to tackle a cloze setup.

Now, how to go about implementing it?

Average of ratings: -
Re: A proposed new Gapfill question type

Bill, which version of Moodle are you using?

Average of ratings: -
Re: A proposed new Gapfill question type

Our institution is just moving over to 2.2(.2)

Average of ratings: -
Re: A proposed new Gapfill question type

Have you seen https://github.com/timhunt/moodle-qtype_ddwtos? That is not quite the same as what you are proposing, but the syntax is similar.

Average of ratings: -
Re: A proposed new Gapfill question type

Yes indeed Tim, it was something that motivated me to work on my idea.  My concern is that the syntax or interface to existing question types such as Cloze and ddwtos is complex enough to discourage many teachers.

I am hoping that my "The [cat] sat on the [mat]" syntax would be grasped by any teacher and then if they wanted more advanced features they could move on to those other question types with more functionality.

I think another sentence or two in the ddwtos help file would be very useful as I still find the meaning of the group dropdown and infinite checkbox confusing.

I have created working instances of this question type and even spent quite a bit of time reading through the source code but the functionality keeps falling out of my brain.

Average of ratings: -
Re: A proposed new Gapfill question type

Marcus "I think another sentence or two in the ddwtos help file would be very useful..."

By the way, it is not clear where the help for the "Drag and Drop into text" question resides.

1. In the Moodle Question editing interface, clicking on the online help gives minimal info,
2. and the More Help link send you to a question/type/ddwtos page in the Moodle documentation wiki, with only a screenshot as "more help" plus a link to More documentation.
3. Unfortunately, that last link sends you to the OU page of the Drag and drop markers, which is a different question than the "Drag and Drop into text".

This is a real mystery "paper-chase"!

Joseph

Average of ratings: -
Re: A proposed new Gapfill question type

Joseph,

The last link is wrong, it should send you to this page (easy to find with the content on the left) of the OU fantastic "How to create an ICMA in Moodle"

But in fact I think everybody (Tim excepted ) here should be required to read this documentation .

The first page is here : How to create an ICMA in Moodle

I repeat it's a fantastic documentation about the Moodle quiz activity.

PS : I have corrected the link in Moodle doc wiki

Average of ratings: -
Re: A proposed new Gapfill question type

After reading that page I like The [cat] sat on the [mat] even more

Average of ratings: -
Re: A proposed new Gapfill question type

I like your gapfill question. Contrary to Some Moodle users (Itamar and I am sure many others) I think we need a lot  question types as there are many differents uses of the quiz module.

I think the number of questions types is not a problem at all. And that it is in fact easier to have differents questions types even for slight variations than an unique one with a lot of options that are unfriendly for first time users.

Just a question : have you implemented all the new question engine goodies : hints with number of right answers and clear wrong answers ? As your question is multipart, this would be very interesting. EDIT I watched your video again and it seems your first version doesn't implement these features. If you need some help ...

Average of ratings: Useful (1)
Re: A proposed new Gapfill question type

No, I have kept the features to the bare minimum in the hope of actually making it work.

Average of ratings: -
Re: A proposed new Gapfill question type

The danger with a really simple syntax like The [cat] sat on the [mat] is that you are likely to get false positives. The teacher may want to type text that looks like your special syntax as part of the question text. In particular a significant number of people use Moodle quiz to teach programming. How would your qtype cope if the teacher wanted students to fill in the gaps in a line of code like:

a[1][2] = 3.14159;

That is why a slighly more obscure syntax is better, but there is a balance to be struck. No matter how hard you try, you won't cope with everything. For example, it might be hard to create a ddwtos question about making links in wikipedia (which uses as link marker, as does Moodle Docs). Then there is the self-referential problem. What if we wanted to make a ddwots question about what you have to type to make ddwtos quesions?

Average of ratings: Useful (2)
Re: A proposed new Gapfill question type

Tim " What if we wanted to make a ddwots question about what you have to type to make ddwtos questions?"

Another case of "Quis custodiet ipsos custodes?".

Joseph

Average of ratings: -
Re: A proposed new Gapfill question type

At the moment I would be happy to advise a teacher wanting to ask a question with that syntax not to use the question type.

I'm proposing an alternative/additional question type, not a replacement to any of the existing types. At the moment the cloze style syntax available is sufficiently complex to discourage many teachers.

On a slightly related subject do you know what the infinite checkbox in the ddwtos question editor does?

Average of ratings: -
Re: A proposed new Gapfill question type

Marcus "... do you know what the infinite checkbox in the ddwtos question editor does?"

Yes, I do. You use it if you have more than one instance of the same blanked out word in your text. Here's an example.

The 1 and white 2 sat on the 1 and red 3.

You have to tick the Infinite box for 1, to use "black" more than once.

Joseph

Average of ratings: -
Re: A proposed new Gapfill question type

Thanks Joseph, I have been wondering about that for a long time.

Average of ratings: -
Re: A proposed new Gapfill question type

Just noticed that the newly introduced automatic linking to the Moodle documentation wiki feature ruined my explanation. Here is a screenshot of the question editing window in replacement for the "garbage" that occurred.

Average of ratings: Useful (1)
Re: A proposed new Gapfill question type

I have now added hints to my prototype. Congratulations to whoever developed the hint code, it was about 45 minutes from deciding to add hinting and to it working. I have also added a feature for setting the delimit character i.e. change [ ] to ## or  whatever on a question by question basis which might address the Tim Hunt conundrum, i.e instead of

a[1][2] = 3.14159;

You can change it to

a[#1#][#2#] = 3.14159;

You can see an animation of this at

http://www.examulator.com/gf/gf2.swf

(The cat mat question has display answers set to on which is why you can see cat and mat above the fields on the animation, the checkbox on the editing form can set it to off)

Average of ratings: -
Re: A proposed new Gapfill question type

Marcus, I've just got to a point where I need an efficient way to create simple gap fill questions of the sort this thread is about. As I've suggested before it seems to me that another question type is not necessarily the most efficient way to get the desired efficiency. So I've drafted a preliminary question tools block. At this point its not even a block type but just javascript in html block.

So we start with some text in the question text of the cloze question:

To make some parts SA subquestions we simply activate the {SA} tool in the question tools and click on a word in the editor. The word will be wrapped with the SA syntax. If we want more than one word, we can select the desired string and the selection will be wrapped.

Suppose now that we want to de-SA one of the marked words. We activate the eraser tool, and as before click on the target word (or select the whole {:SA...} string) and the wrapping SA syntax will be removed.

These tools can be extended to allow complex setting of the subquestion. MC, for instance, could show a few input fields for the options. etc.

Average of ratings: Useful (3)
Re: A proposed new Gapfill question type

That looks nice Itmar, no need for Java and no need to use the WYSIWYG editor which I find causes more problems than it solves. It is also nice to use the well tried underlying code of the existing Cloze question. However ....

I have been continuing developing my gapfill question type and have spent a big piece of the weekend creating Selenium test scripts, very satisfying.

I have added a feature to turn on and off case sensitivity and for presenting the question to the student with drop downs containing all correct answers. I have added in combined feedback support, hinting and selectable field delimters i.e. ## or  instead of [].

I am beginning to appreciate why some people are proposing a more compact presentation of the question editing form as it is getting very long indeed.

Average of ratings: -
Re: A proposed new Gapfill question type

I have done some more work on this question type and I am looking for people to experiment with an installed version of it. Send a moodle message or an email to marcusavgreen [at] gmail.com if you are interested.

Average of ratings: -
Re: A proposed new Gapfill question type

Marcus,

Thanks again for letting me test this.  Now that you pointed me in the direction of using both the brackets AND the display answers setting, I'm pretty excited about how easy it will be for teachers using this type to set up the kinds of question scenarios they are used to setting up on paper.  It is amazing!  Pic of my test here to show how it is possible to control for poor spellers AND create a more sophisticated matching option than the match question type allows.  (Please somewhat disregard actual content as it is kind of a mish-mash of lit terms questions I would not necessarily put together for real; it just shows the test in action.)

YAY!

Average of ratings: Useful (1)
Re: A proposed new Gapfill question type

Many thanks for the feedback Lesli. It was your feedback that encouraged me to implement the * wildcard operator to adress answers that might be spelled differently. I am currently working on some PHPUnit tests to try to get tests for as much of the code as I can.

I had some other interesting feedback from Josepthsuggesting how it would be nice to have per field hinting a la hotpot cloze. I have been a longtime Hotpot fan but I will concentrate on getting the basic version of my question type finished first.

Average of ratings: Useful (1)
Re: A proposed new Gapfill question type

Hi all,

very interesting and sensitive subject.  Question type and question authoring in general is a relatively complex and time consuming process which may discourage teachers from doing it.

I am exploring  a new way ( but I am not sure it is the best way ) of doing that by using "questions models" instead of "questions types". Here are my first 4 questions models ( many more are on the way ):

The teacher have to give 2 simple text files ( utf8 ) and to choose the desired model. The system named Socrate, generate a file compatible with Moodle question xml import file format! Any and many questions types may appears in a question model.

In your particular example the first file contain :

The cat sat on the mat. The cow jumped over the moon.

The second one :

cat mat cow moon

As your exact model is not created in my system I choose the nearest one that give:

Most importantly, instead of only one, if you have many hundreds  sentences or a complete book in the first file,  the authoring effort is the same for the teacher and many hundreds questions are generated in one operation by the teacher

I hope I am not too out of scope!

Salutations from Québec,

Bernard

Average of ratings: Useful (1)
Re: A proposed new Gapfill question type

Hi, Bernard.  I missed this post a month ago.  I totally think you are on the right track with this idea as having some models available to me for possible cloze question usage way back around 1.8 is what made me brave enough to try it.  I just copied in the model and changed the words around the code so that the question said what I needed it to say.  If we had a bank of these somewhere, that would be so valuable!  I've been thinking along similar lines regarding the work I'm currently doing with outcomes.  If there are places for teachers to see models working in context, it makes it so much easier for them to understand how they can apply these tools in their own practice.

Average of ratings: -
Re: A proposed new Gapfill question type

Hi Lesli,

thanks for your interest in questions "models".

I will be pleased if you want to test it with your own texts but as Socrate is not finished ( only 4 of the anticipated models are created ) yet and not documented and not "packaged" maybe it will be easier for both of us to proceed in 3 managable steps if you agree:

1 - You give me the 2 input text files and I send you the XML import file.

When you will master the input file creation and the XML import process then:

2 - I will create you and account in a test server and you will make the small manipulations yourself.

3 - I will give you the 2 zip files ans show you how to install it.

If you have some French reading capabilities that long presentation maybe of some interest:

Existing models ( including Moodle Games ) : Slides 12 @ 21.

Anticipated models : Slides 22 @ 29.

Outcomes representations : Slides 73 @ 79.

The Socratic Dialog generation ( feedback for Self-Assessment ? ) : Slide 102.

Let me know if you are ready for the instructions for step 1

Salutations from Québec,

Bernard

Average of ratings: -
Re: A proposed new Gapfill question type

Hi, Bernard.  Wow!  Impressive project--from what I could glean from the pictures, at least, as I don't speak French.  In any case, the part I can contribute to is the bank of ELL model tests, if you like.  If I'm understanding you correctly, you would let me test it by doing the following:

1. I export two of my grammar/mechanics questions to text format from a Moodle course and send you the file.

2. You convert it on your site to the Socrate model and send back the xml file for import.

3. You give me access to a server with the right settings enabled for your model system to work.

4. I import the xml file, view the questions in that format, and have the ability to see how they can be edited/used as template models by teachers in general.

Is my understanding accurate?  If so, I'd be happy to send the text files of my two grammar/mechanics sample questions to your gmail.

Best,

Lesli

Average of ratings: -
Re: A proposed new Gapfill question type

Hi Lesli,

Sure that you can contribute to "ELL model tests" ( I just learn what ELL mean maybe it include grammar ) but, if you prefer and if you use some cloze questions or short answers in your "grammar/mechanics questions" then we can add more questions to your bank if you desire using Socrate to support yours students.

One restriction at the moment is that some of yours questions should look like one of the 4 existing models. ( Slides 12 @ 21 )

Your understanding of the process is quite good with the precision that you will have to use sometime XML files but you and your teachers will not have to look inside XML files as Socrate is there also to simplify the life of questions authors

If you look attentively at my first post in that thread, you will see that to create Itamar's example you need only two simples plain text files like these:

The first file contain only the complete text:

The cat sat on the mat. The cow jumped over the moon.

The second file contain only the words we want to treat in the text  :

cat mat cow moon

As you see no need to know Close syntax, no Symbol to learn, no XML tag to match, only 2 simples plain texts files in utf8 format Socrate do the all the complicated work ;-D

One more advantage, if instead of only 2 sentences in the first file you have many sentences or one complete book the authoring is the same and Socrate wil create hundreds or thousands of questions in one authoring pass

If the process is clear enough we are ready to do your first step

Salutations from Québec,

Bernard

p.s. Do you think that we are hijacking Marcus thread? If so please create a new one with a significant english title!

Average of ratings: -
Re: A proposed new Gapfill question type

It's interesting having two similar/related concepts discussed in the same thread, I'll start a new one if I get to a new stage..I have been working on tweaking my question type in the hope of having a release version in the near future.

I am wondering if it would be a good idea to have "distractors", i.e. for the drop down list a set of incorrect answers that get randomly added so that for the cowmoon question in the image the dropdowns would say cow,cat,moon, dog instead of just cow and moon.  I have also looked at Joseph Rézeau and Jean-Michel's regex question so I can use more complex wildcards.

Average of ratings: -
Re: A proposed new Gapfill question type

Marcus,

Re: "distractors"

I was actually thinking the same thing, as I used to do that on paper.  However, either due to the limitations of my understanding of possible questions types or to the question type itself, I'd sort of given that up except when I could do it on a limited basis using cloze.  I think teachers would find that handy to have back in a format that is easy to create.

Bernard,

Re: conversation regarding Socrate

I thought at first they were somewhat related as there is the code part, but then there is also the pedagogy part.  Marcus has the code, and I thought what you were proposing was a system that would better help us understand the pedagogy behind choosing the question types we choose. While it sounds as if it does do that a little bit, I'm now understanding that it is a separate Swiss army knife all on its own.

I was going to test it with questions I used to use (that I wrote myself, more or less--with some sentences pulled directly from student papers) if you needed a tester.  But I'm not using those questions for real anymore.  The curriculum I am now using was developed by my department team.  I think they might be interested in participating and/or taking advantage of a tool like Socrate, but it would be a corporate decision that can't be made until the faculty convenes again this fall.  I'll start a new thread then if I get positive feedback on interest.  In the meantime, looking forward to hearing how the project develops either way.  Best,

Lesli

Average of ratings: -
Re: A proposed new Gapfill question type

Argh.  I keep surpassing my editing time limit.  Can I just say that 30 minutes is not enough time when one has to post around the activity of little ones?  Ah, summer.

I'd like to revise this sentence: "While it sounds as if it does do that a little bit" to "It sounds as if that is what it does, plus a whole lot more; it now seems to me that it is a separate 'Swiss army knife' all on its own."

Thanks.

Average of ratings: -
Re: A proposed new Gapfill question type

Hi Lesli,

If 30 minutes is short for You imagine for me with my slow english translator Long time ago that was worst because I got sessions timeout and lost my work ;-(

I like your 'Swiss army knife'  analogy

Bernard

Average of ratings: -
Re: A proposed new Gapfill question type

Yet another variant of cloze tool illustrated below. It's part of recompiling and uploading tools I've developed and used in courses. Open for public use at http://substantialmethods.com/subject/view.php?id=6&topic=1.

We should definitely start a thread on understanding pedagogies behind question types.

### Preview

Average of ratings: Useful (1)
Re: A proposed new Gapfill question type

Hi Itamar,

very interesing generation tool!

It correspond to one of Socrate questions models. The interface is easy.

It is funny to see how Cloze questions are Open to the generation

Bernard

Average of ratings: -
Re: A proposed new Gapfill question type

It's one and the simplest of a few question tools I've been using to make my work more efficient. Indeed it is similar to Socrate in certain respects and I think that it is so because there are some obvious extensions of the cloze interface which anyone with some spare time could implement fairly easily this way or another.

Average of ratings: -
Re: A proposed new Gapfill question type

Hi Lesli,

no problem to use your personnal questions, it will be a pleasure to do so.

The generator tool that Itamar created and linked on that thread use a very similar approach to create cloze questions. The manipulations are differents but the principle is the same.

It use input fields instead of files. It generate one of the four Socrate questions models.

Salutations from Québec,

Bernard

Average of ratings: -
Re: A proposed new Gapfill question type

Hi Marcus,

good to know that I did'nt distract you too much

Speaking distractors I think that MCQ should have at least 5 choices but there are exceptions: for example if the student have difficulty to recognize the moon and the cow then it is better to start with only 2 choices and to add more distractors when he is more proficient!

For the choice of the distractors may I suggest to don't choose them randomly if possible. If you choose a distractor not randomly then it is possible for you to add an appropriate feedback if the student choose that distractor to help the student to understand why the distractor is a bad choice!  Another advantage of "good" distractor you can also route the student to another question that will help him to understand why that distractor is bad if you use the lesson module or an adaptive quiz. That post show an example.

About Joseph and Jean-Michel regex questions I think that these enhancements should be integrated in nearly any question type to make these more flexible!

Salutations from Québec,

Bernard

.

Average of ratings: -
Re: A proposed new Gapfill question type

I agree that randomly selected distractors are not the best solution, but they are easy to implement and are consistant with an easy to use editing interface. I have surprised myself this evening by adding editing and display of distractors via a single new field called wrong answers designed for a comma separated list. These values then get added to the dropdowns at random. See attached image.

When I get the first version finished I am interested in adding a form for adding per field details such as hints and wrong answers/distractors.

Average of ratings: Useful (1)