text2qti icon indicating copy to clipboard operation
text2qti copied to clipboard

Adding "fill in multiple gaps" and "multiple dropdown" question types

Open NiallTracey opened this issue 2 years ago • 1 comments

I was talking about adding new question types. From the point of view of syntax consistency, I think the multiple gaps and multiple dropdowns would be the most straightforward.

If I was making my own tool from scratch, I'd be tempted to go with something like

1. The old man who brings presents is called Saint [[Nick|Nicholas]] and he lives at the North [[Pole]]

However, that would start to diverge from the way text2qti works, and doesn't really map well to a Canvas way of thinking (for example, it would make feedback harder).

Instead, I was thinking of following Canvas's lead and making named gaps, and using the existing syntax for single gap and multiple choice answers to do the main work after the prompt, thusly:

1. The old man who brings presents is called Saint {{gap1}} and he lives at the North {{gap2}}
...This is a very Western-centric question
{{gap1}}
* Nick
* Nicholas
{{gap2}}
*Pole

2. {{gap1}} are better than {{gap2}}
{{gap1}}
[*] Dogs
[] Cats
... are you mad?
[] nothing
... that doesn't even make grammatical sense
{{gap2}}
+ You have a soul.
- You have no soul.
[] dogs
[*] cats

This might need a bit of a code refactor -- not sure yet as I've not fully got my head around the code.

Anyway, the main question would be what makes most sense for the labelling. I've notated it here as a gap in double braces {{...}} -- braces because markdown doesn't seem to mess with them (I'd personally prefer square brackets [[...]] as a visual representation of the webpage form element, but md might get confused), doubled because as a computing teacher I know I'm going to need to use braces inside some of my questions!!!

I've used the same convention for both the gap and the header to the question so as not to use up extra symbols, but I'm not wedded to that as a rule -- open to an alternative. Would just the label name followed by a colon work...?

1. The old man who brings presents is called Saint {{gap1}} and he lives at the North {{gap2}}
...This is a very Western-centric question
gap1:
* Nick
* Nicholas
gap2:
*Pole

NiallTracey avatar May 04 '22 10:05 NiallTracey

For multiple gaps, I think the suggested syntax looks good and is consistent with what currently exists.

1. Question {{gap_name}}
{{gap_name}}
* ans 1
* ans 2

It may be good to avoid square brackets since Pandoc Markdown uses them for spans, and we might want to support more Pandoc-style features in the future. Also, double square brackets may look like internal wiki links to some people. I think double braces are fine, since they suggest some sort of interpolation. I think a syntax something like this will be necessary so that feedback can be specified. However, I'm not opposed to having an alternate, more concise syntax. Maybe something like this:

1. Question {{ans 1|ans 2}}

Basically, there could be a rule that if the gap name is an ASCII identifier, then the list-style syntax is being used, and if a pipe character is found then the compact syntax is in use.

For multiple dropdowns, the syntax also looks good.

1. Question {{gap}}
{{gap}}
[*] Correct
[] Incorrect
[] Also incorrect

Again, some sort of short alternative might be worth considering. Perhaps something like {{*Correct/Incorrect/Also incorrect}}.

In the list-style syntax, using a colon would be possible. However, colons have so far only been used for settings (sort of YAML-like), so there is a possibility for confusion/syntax collision.

gpoore avatar May 04 '22 19:05 gpoore