## Question types: Select missing words

qtype_gapselect
Maintained by Tim Hunt, Jamie Pratt, Phil Butcher
This question type allows students to complete a paragraph of text by selecting the missing words using drop-down menus.
1k
3k
21
Moodle 2.6, 2.7, 2.8, 2.9

There are working examples in eAssessment with Moodle on our OpenLearn site.

The documentation is in How to create questions in Moodle on that site.

This question type allows students to complete a paragraph of text by selecting the missing words using drop-down menus. You can make questions like this using the Cloze question type, but this question type is easier for teachers to get up, and presents the feedback in a more accessible way.

The question type was created by Jamie Pratt for the Open University.

### Sets

This plugin is part of set Open University.

### Contributors

Jamie Pratt: Developer
Phil Butcher: Question type designer
Colin Chambers: Developer

### Awards

• Wed, Jan 8, 2014, 9:00 PM
OK, I just did it. It was working fine in 2.6, but there is a bug fix, so you should probably upgrade to the latest version that I just uploaded.
• Sun, Jan 12, 2014, 9:56 PM
I updated from 2.4 to Moodle 2.5.2+ and experience problems with my questions. Some now display a question mark - unknown question type. I figured out that the OU questions seems to miss, so I wanted to install them, but now I receive the message that I need to resolve plugin requirements, but I don't know how. I downloaded the questions types and wanted to install them manually, but this does not work either.

Could anybody please provide any help. Thanks.
• Mon, Jan 13, 2014, 2:30 AM
I could solve the problem described above.
• Fri, Jul 18, 2014, 5:42 PM
Hey,

Were planning to upgrade to 2.7 soon, has anyone tested this plugin in 2.7? If not I will do so later this month.
• Fri, Jul 18, 2014, 6:23 PM
Yes I've been testing things for a while now and I think it's OK.
• Tue, Aug 26, 2014, 9:16 PM
I have a small feature request:

It would be nice to have a way for us to set the answer "Choose.." text, either via a plugin-specific language string or (better) via something in the question description. We have an instructor using this question type for digital state diagrams where there are many selects across in a single table and CSS cell boundaries used for the digital waveform. It's a brilliant use of the question type, except that the "Choose..." text makes everything too wide. Thanks!
• Wed, Aug 27, 2014, 10:50 PM
I've run into this too so I appreciate the point. I'll ask how easy/hard it is to provide.

Phil
• Wed, Jan 21, 2015, 12:04 AM
The link to the documentation appears to be out of date, and searching at that site leads only to eLearning sessions that don't appear to cover the plugins in huge detail. I'm trying to work out if this question type supports multiple correct answers, and, if so, how I should go about specifying that in the question text. Obviously one correct answer is, e.g., 1, but if 2 and 3 are both correct answers, how do I specify that? It must be possible because there's an option to specify feedback for a partially correct response.
• Wed, Jan 21, 2015, 12:12 AM
At the bottom of that site: Find the link "How to create questions in Moodle" then find the right section: http://www.open.edu/openlearnworks/mod/oucontent/view.php?id=52747&section=2.3.6
• Wed, Jan 21, 2015, 1:04 AM
Aha - thank you for the direct link. For me, the link posted twice above takes me only to the OpenLearnWorks front page, with no "How to create questions in Moodle" link visible there. The direct link is very helpful.

However, unless I'm missing something, the page you have just linked does not answer the "multiple possible correct answers" or "partially correct answers" issue. Is there any further information available, please?

Am I right in assuming that the concept of partially correct comes from the learner having selected, from multiple "gapselect" lists, some of the right answers and some of the wrong answers? As opposed to, say, selecting an answer from a single list that could be designed to be partially correct but not the fully correct answer?

Perhaps it's easier if I state the use case here - we are looking to collect information as part of the quiz from a drop down list. Consider it reverse feedback, if you will, but it could be some further demographic information about the learner or their organisation, or whatever that was not collected from the user in their initial user profile, or elsewhere in the system. Correct or incorrect doesn't really matter to us in this case, as any of the entries a learner may select are fine. However, that's not something we are able to tell this question type, and it demands one and only one of those options be a "correct answer". Either ignoring correct/incorrect answers, or making all answers accepted as correct, is what I'm looking to do here. We could theoretically just use a normal multiple choice qtype with no feedback, but the client would prefer a drop down.

If it's not possible to do this with this plugin, that's fine, I'll either convince the client that the radio button option is the way to go, or just develop a no-feedback drop down. FWIW, I can totally see why what I need is not a question type that should be encouraged in a proper assessment environment.
• Wed, Jan 21, 2015, 1:06 AM

What you want is not possible with this question type.

I think that if you set the max mark for a question to 0 (on the edit quiz page) normally very little correctness information is shown, and that might fit your use case. (I don't know how well this qtype handles that case.)
• Wed, Jan 21, 2015, 1:17 AM
That's fine, Tim, I'll take a look. Thanks for your assistance.
• Wed, Apr 13, 2016, 5:25 AM
Hello everyone!
I am looking for a bit of help, I think I broke my moodle (though I've found workarounds, I'm paranoid about causing a server crash again)

This is the error I receive, and it always is asking to install gapselect. (I have the drag and drop image questions working fine at this time)

qtype_gapselect
DDL sql execution error

Debug info: Table 'moodle.mdl_question_gapselect' already exists
CREATE TABLE mdl_question_gapselect (
id BIGINT(10) NOT NULL auto_increment,
questionid BIGINT(10) NOT NULL DEFAULT 0,
shuffleanswers SMALLINT(4) NOT NULL DEFAULT 1,
correctfeedback LONGTEXT CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
correctfeedbackformat TINYINT(2) NOT NULL DEFAULT 0,
partiallycorrectfeedback LONGTEXT CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
partiallycorrectfeedbackformat TINYINT(2) NOT NULL DEFAULT 0,
incorrectfeedback LONGTEXT CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
incorrectfeedbackformat TINYINT(2) NOT NULL DEFAULT 0,
shownumcorrect TINYINT(2) NOT NULL DEFAULT 0,
CONSTRAINT PRIMARY KEY (id)
, KEY mdl_quesgaps_que_ix (questionid)
)
ENGINE = InnoDB
DEFAULT CHARACTER SET utf8
DEFAULT COLLATE = utf8_unicode_ci
COMMENT='Defines select missing words questions'
Error code: ddlexecuteerror
Stack trace:
line 449 of \lib\dml\moodle_database.php: ddl_change_structure_exception thrown
line 905 of \lib\dml\mysqli_native_moodle_database.php: call to moodle_database->query_end()
line 76 of \lib\ddl\database_manager.php: call to mysqli_native_moodle_database->change_database_structure()
line 412 of \lib\ddl\database_manager.php: call to database_manager->execute_sql_arr()
line 364 of \lib\ddl\database_manager.php: call to database_manager->install_from_xmldb_structure()
line 508 of \lib\upgradelib.php: call to database_manager->install_from_xmldb_file()