Embedded Answers (Cloze) with Regexp question type

Материал из База знаний Центра ПУСК МФТИ
(перенаправлено с «Question/type/multianswerrgx»)
Important notice

First read the documentation at Inserting RegExp sub-questions in Cloze type questions

Instructions for use

Inserting regexp sub-questions in the question text

The insertion of regexp sub-questions inside the question text of a cloze/multianswer follows the same pattern as the insertion of SHORTANSWER sub-questions. See the documentation here. For REGEXP sub-questions you have a choice of 4 formats:

  • regexp (REGEXP or RX), case is unimportant,
  • regexp (REGEXP_C or RXC), case must match.

Here are some examples of use.

Question text

The colours of the French flag are: {1:REGEXP:%100%blue, white and red#Congratulations!~--.*(blue|red|white).*#You have not even found one of the colours of the French flag!~--.*(&&blue&&red&&white).*#You have not found all the colours of the French flag~--.*blue.*#The colour of the sky is missing!}.

What about the German flag? {1:REGEXP_C:%100%It's black, red and gold#Very good!~%80%it's black, red and gold#OK, but you should start your answer with a capital letter}.

Result

Файл:2024-07-08 14-27-50.jpg

Most of the features of the REGEXP question type are available when inserting a REGEXP inside a Clozergx question. However, the Hints (Letter/Word) feature is not available, nor the automatic feedback formatting. The permutation feature is available, and the "developed" syntax will be be displayed when clicking the Decode and verify the question text button, and then clicking the Question {#n} Regular expression short answer button. The full list of accepted alternative correct answers will also be displayed.

Result

Файл:2024-07-08 15-34-58.jpg
Using permutations

Answers Validation

When you validate your Question, the question engine checks the validity of your expression, according to the features explained above. If an error is found, an ERROR message is displayed above the erroneous Answer(s) and you cannot save the Question until that error has been corrected. The validation system works in the same way as in the Regexp question type.

Файл:2024-07-08 11-26-17.jpg

The Add cloze gaps feature

Besides allowing the user to add REGEXP sub-questions to the question text of a multianswerrgx question this feature makes it easy to create a classical Cloze question. This new feature needs to be enabled in the Admin settings when installing (or editing) the multianswerrgx question type plugin.

Currently it's limited to creating cloze gaps every 5 or 9 words. There is an option to skip capitalised words (on their first appearance in the text). Once the desired gaps have been created with the default SA/SHORTANSWER question type they can be edited and their question type can be changed if desired. There is also an option to remove all the gaps, including gaps that have been created (or edited) with a sub-question type other than SHORTANSWER.

Файл:2024-09-18 15-54-40.png