Wordselect question type

From MoodleDocs

Installing this question type

You can install automatically, or download manually, this plugin from the Moodle plugins database. You can also download the latest development version of this plugin from GitHub.

If you download the ZIP file, follow the generic Installing plugins documentation. The files must be in the directory moodle\question\type\wordselect. If you uncompressed the ZIP file from GitHub, please rename 'moodle-qtype_wordselect-master' into 'wordselect'.

Word Select Question Type

A very easy to use Moodle question type that allows a teacher to create text where one or more words are indicated to be the correct answers. The student is presented with the text and can select one or more words and is marked according to if they are correct.

You can see a short video of it in action in this YouTube video

https://www.youtube.com/watch?v=FGv-c7fJIxo

Description

This question type is designed to ask students to select text according to some criteria. For example "select the verb in the following sentence". Conceptually this is a little like a multiple choice question type (with multiple selectable options). The student responds by clicking on words to select them, and clicking a second time to unselect them.

It provides an introduction field where words will not be selectable at runtime and a questiontext field. In the question text any words with braces around them will be considered correct. All words can be clicked-on to select. A word can occur multiple times, but only the ones with the braces around it in the source will be considered correct.

Wordselect creation

A word is considered to be some text with space around it. HTML characters are stripped out first to generate a list of potentially selectable words, meaning it is possible to put words within a table. At runtime the question looks like this:

Wordselect selected word

Pedagogically, this type of question has the advantage of it being possible to give no clue as to which word is to be selected. You might address the problem by offering four multiple choice options with different words in locations but this will narrow down the selection that the student can possibly make. By making every word selectable the student has little guide as to which is the correct answer.

If it is not possible to use square braces (e.g. in the context of maths where they have a special meaning), alternative delimters are available from the Delimit Characters dropdown

Wordselect delimit characters

So selecting {} would allow a question to be created as 'The cat {sat} on the mat'.

Formatting in selectable text

All formatting except the <sub>,<sup>,<i>,<u>,<b> is stripped from selectable text.



These display as expected i.e. sub sup i u b


Multiword mode

If any text is surrounded by double delimiters e.g. [[cat]] it will be treated as correct, and any selectable non correct text must be given single delimiters e.g. [mat]. Text can thus include multiple words. CSS Formatting indicates which text is selectable. ws multiword.png

The code for the body of this is as follows.

To make [[more than]] [[one]] word selectable add double delimiters for correct text and single for incorrect text. Once one item has double delimiters any text without delimiters will not be selectable.

[This is selectable incorrect text]

The multiword mode allows the creation of multiple choice questions as follows.

How many beans make five?

[a] one

[[b]] five

[c] two

[d] none

Category Questions

Words can be placed inside tables and students asked to identify which words match the category in the heading:

Wordselect table categories

This is the code used to create that table:

<table border="1">
<tbody>
   <tr><td style="background-color: #c0c0c0;">Feline</td><td style="background-color: #c0c0c0;">Canine</td>
   </tr><tr><td>wolf</td><td>[dog]</td></tr>
   <tr><td>cow</td><td>zebra</td></tr>
   <tr><td>[cat]</td><td>lion</td></tr>
</tbody>
</table>


Creating a Wordselect question with a nice table

  • The Moodle Text editor has an option for creating tables which can have any number of columns and rows.
  • You begin by creating a new question of the Wordselect type.
  • Choose a good name for your new question.
  • Write the introduction.
  • Expand the Atto toolbar by clicking on its very first button (blue square in the next image).
  • Locate the table creation button (green square) and click on it:

wordselect category table creation 01.png

  • For this example we will use a table with 3 columns and 4 rows (the top row will be used for the categories: Canine, Feline and Avian):

Wordselect step 2 .png

  • Notice in the above image that we left both the 'Caption' and 'Caption position' options blank. This is intentional, because the regular table captions are just too large for this situation. Also notice that we have selected 4 rows and 3 columns

Wordselect step 2.png

  • We now have an empty table, that we will fill with our words:

Wordselect step 3.png

  • Notice that we put the right answers (cat, dog and canary) enclosed in square brackets
  • Our question in now complete (but we will later see that it is not very nice).
  • We will now save the changes and preview the question (notice the looking glass icon in the following image):

Wordselect step 4.png

  • The question works:

Wordselect step 5.png

  • But the lack of the gridlines to signal the cells could make this table a bit difficult to use:

Wordselect step 6.png

  • We will now put some gridlines inside the table with this instruction inside angle brackets:
 <table border="1">
  • The trick is finding where and how to put it.
  • We will now click on the Atto button tool with the <> characters to expand the HTML code inside the Question text box:

Wordselect step 7.png

  • And now we have a lot of HTML instructions, that we don't really need to understand. We will just insert the gridlines instruction right after the first instruction that seems to be related to our table (look at the image below), and we will see if it works:

Wordselect step 8.png

  • It works:

Wordselect step 9.png

  • And now we will put some nice colours in some of our text.
  • For this we will use a Moodle additional plugin for the Atto editor, that we must first download from the Moodle plugins database.
    • We wil need to add the more font colours additional plugin for Atto
    • Install the plugin directory as usual in lib/editor/atto/plugins.
    • Then visit Site Administration > Plugins > Atto > More font colors to define the colors you want your users to be able to chose from. As a default, the same colors as the core atto_fontcolor colours are defined.
    • Finally, enable the plugin by adding 'morefontcolors' (without the quotes) in the Atto toolbar settings.
  • We can now choose a nice colour for our selected text:

Wordselect step 10.png

  • This will give us a nicer-looking table for our Wordselect question:

Wordselect step 11.png

  • We still might want to change the background colour for the first row cells.
  • We will now install the More background colours additional plugin for Atto, and see if it does the job...

Wordselect step 12.png

  • Notice in the above image the two new buttons in the Atto toolbar: more font colours (blue square) and more background colours (yellow square), that we will use to give our first row the intended font and background colours:

Wordselect step 13.png

  • So, it seems we have managed to create a Wordselect question with a nice table, without having to learn any HTML code syntax.
  • We could now customize the colour palettes available for the more font colours and the more background colours plugins, by replacing the default values with some HTML hexadecimal color codes from the wikipedia.
  • Perhaps a more elegant technique might have been been to use the Styles plugin for Atto, but that remains to be tested later...

Grading

An attempt will be graded as correct if all correct and no incorrect words are selected. If any incorrect words are selected it will be marked as partially correct. In interactive mode (with hints) the penalty defined in the editing form will be applied with each new check/attempt. This defaults to 33.33%

The marking is designed to discourage a strategy of "select all words so you are bound to select all the right words". Each incorrectly selected word will deduct a mark down to zero. For example, selecting one correct and one incorrect mark will result in zero marks. Selecting one correct and two incorrect will also result in zero. A count of all incorrect marks is deducted from a count of all correct marks unless there is a negative result, in which case the mark is set to zero.

If this seems harsh, e.g. the wordpenalty value can reduce the deuction made for each incorrect selection

Wordpenalty

Instead of the default 1 mark deduction for each incorrect selection this can be used to set a percentage of a mark deduction. Word Penalty

Feedback

If the quiz has the right answer display selected, square braces will be shown around any unselected correct words. The square braces are not related to the default characters used in the editing interface. This is designed to allow the user to see the correct responses within the text rather than look at the feedback area (an approach used in some other question types).

Wordselect partially correct answers.png

Mobile Use

It has been tested with a variety of mobile devices both android and iOS tablets and phones. It also supports the Moodle mobile App.

Accessibility

It is possible to move forwards and backwards through words with tab and shift-tab. Words can be selected and unselected using the space bar. It uses the aria tags to help screen readers recognise when a word is selected and unselected.

Sample Word squarequestion

The question type comes with a set of sample questions in XML format in a file called sample_questions.xml (it is located in the moodle\question\type\wordselect. directory). These illustrate issues such as non ASCII characters, the inclusion of images and the creation of word squares where each "word" is a single letter and the user has to click on the letters that make up words (e.g. find the animals in this square).

Wordselect example 1.png

Sample Comprehension question

This is an example question of using Wordselect for an English literature reading comprehension assessment:

Wordselect example reading comprehension.png

You can find instructions on importing questions at Import questions.

Compatibility with other third party Moodle plugins

This question type has been briefly tested in the Question practice module and the Question Creation module (QCreate).