-

Note: You are currently viewing documentation for Moodle 3.10. Up-to-date documentation for the latest stable version of Moodle may be available here: Preg question type examples.

Preg question type examples

From MoodleDocs

Here are some examples and advantages of using the Preg question type instead of the standard Moodle Short-Answer question type.

Vocabulary practice

  • In all levels and subjects, many students find it difficult to memorize the right spelling of some words. The preg question type with hinting can be helpful for formative assessment.
  • You must decide whether there wil be a penalty for the hints. A reasonable penalty might force the students to try harder to guess the correct answer, but some students will get no points if they need much hinting.

Solar system example

  • You must make a list of all the words that the students need to practice, along with the stem of the question for that word. For example:
Mercury. Which is the planet closest to the Sun.
Venus. Which is the second planet from the Sun.
Earth. Which is the third planet from the Sun.
Mars. Which is the fourth planet from the Sun.
Jupiter. Which is the fifth planet from the Sun.
Saturn. Which is the sixth planet from the Sun.
Uranus. Which is the seventh planet from the Sun.
Neptune. which is the eight planet from the Sun.
  • You must configure the first preg question as follows:
  • Name = Solar System 1
  • Settings:

preg example solar system 01.png

preg example solar system 02.png

  • You need to create this first question and in order to test it thoroughly you must now make a quiz and add this only question to that quiz:

preg example solar system 03.png

preg example solar system 04.png

  • Now you can verify that the question indeed helps the student to remember the correct spelling of this difficult word (Mercury) and that the right and wrong answers were treated properly:

preg example solar system 05.png

preg example solar system 06.png

  • You will then look at all the questions available in your Question bank and duplicate this question and obtain a new question named 'preg example solar system 01 (copy)'


preg example solar system 07.png

preg example solar system 08.png

  • Edit this newly copied question and replace the original word with the word # 2 in your list.
  • Rename this question (the copy) to 'preg example solar system 02'

preg example solar system 09.png

  • Replace 'Mercury' with 'Venus'
  • Replace 'Which is the planet closest to the Sun' with 'Which is the second planet from the Sun'

preg example solar system 10.png

  • Test that it works as expected
  • When you are happy that the second question is working perfectly, proceed to make the third question
  • and so on...
  • It is very important that you configure the question behaviour for the quiz and the settings for each individual preg question to perform exactly as you want.
  • And, most important, you must check that the final quiz with all your preg questions is indeed useful for your students (not too easy, nor too difficult).
  • The actual numbers for the penalties must be set acccording to the difficulty of the subject and the characteristics of the students in the course. You will likely have to experiment and lower or heighten the default values shown here in order to get the best learning experience for your students :).

Medical vocabulary example

  • Make a list of the words and the questions:
petechiae. What is the name for multiple small (less than 3 mm) hemorrhages ?
ecchymosis. What is the name for multiple medium sized (larger than 3 mm) hemorrhages ?
hematoma. What is the neame for a localized collection of blood outside the blood vessels ?
hamartoma. What is the name of a benign developmental malformation, made of disorganized overgrowth of tissue in their normal location, that resemble a neoplasm but grows at the same rate as the surrounding tissue ?
choristoma. What is the name of a benign developmental malformation, made of disorganized overgrowth of tissue in an abnormal location ?
  • Proceed as in the Solar system example
  • It is very important that you configure the question behaviour for the quiz and the settings for each individual preg question to perform exactly as you want.
  • And, most important, you must check that the final quiz with all your preg questions is indeed useful for your students (not too easy, nor too difficult).

preg example medical vocabulary 11.png

  • The above image shows a quiz where the second question does not have the 'Hint next correct character' button. We should fix this before the students start practicing this quiz.
  • The actual numbers for the penalties must be set acccording to the difficulty of the subject and the characteristics of the students in the course. You will likely have to experiment and lower or heighten the default values shown here in order to get the best learning experience for your students :).

Sentence memorization examples

  • Sometimes a student needs to memorize an exact sentence, paragraph, poem or article of the law.
  • Here we can use hinting of whole words

One article of the law example

A robot may not injure a human being or, through inaction, allow a human being to come to harm.
  • The preg question must have the following settings:

preg paragraph memorization 13.png

  • As before, you must check that the question in the quiz works as expected.

preg paragraph memorization 12.png

Matching the beginning of a large paragraph example

Suppose you want your students to memorize the sonnet 43 by Elizabeth Barrett Browning:

How do I love thee? Let me count the ways.
I love thee to the depth and breadth and height 
My soul can reach, when feeling out of sight
For the ends of Being and ideal Grace.
I love thee to the level of everyday's
Most quiet need, by sun and candlelight.
I love thee freely, as men strive for Right;
I love thee purely, as they turn from Praise.
I love thee with the passion put to use
In my old griefs, and with my childhood's faith.
I love thee with a love I seemed to lose
With my lost saints,—I love thee with the breath,
Smiles, tears, of all my life!—and, if God choose,
I shall but love thee better after death.
  • The settings for this question are similar to the previous example. But here we left empty the 'Correct answer box':

preg paragraph memorization 17.png

preg paragraph memorization 18.png

  • You can use the * wildcard in the answer box after the text that the student MUST quote correctly:
How do I love thee? Let me count the ways*


  • As usual, you must check that your finished preg question actually performs as you intend before making the quiz available for your students.

preg paragraph memorization 16.png

preg paragraph memorization 20.png

    • Because we left empty the 'Correct answer' box, this question will not show the student the correct answer, So, we have a strange-looking 'The correct answer is: ' with no text after it.

Caveat

Remember that this is a replacement for a short answer question type. If you enter a very large text in one of the answer boxes, you might get an error:

preg paragraph memorization 19.png