Short Answer Questions in Moodle
The Short Answer question type requires students to type a word or phrase in response to a question. The answer is compared against one or more acceptable answers defined by the teacher. Moodle can evaluate short answers with case sensitivity options and wildcard characters, making this question type flexible for various assessment scenarios.
Creating a Short Answer Question
- Open the Question bank and click Create a new question.
- Select Short answer from the list of question types.
- Configure the settings as detailed below.
- Click Save changes.
General Settings
- Category: The question bank category for storing this question.
- Question name: An internal name for the question.
- Question text: The question prompt displayed to students. Supports HTML, images, and multimedia.
- Default mark: The maximum marks for a correct answer.
- General feedback: Shown to students after the question is answered, regardless of correctness.
Case Sensitivity
The Case sensitivity setting controls how the student response is matched against the defined answers:
- No, case is unimportant: "Paris", "paris", "PARIS", and "pArIs" are all treated as the same answer. This is the default and most commonly used setting.
- Yes, case must match: The student must type the answer with the exact capitalisation specified. This is useful for questions where case matters (e.g., programming language syntax, chemical symbols like "Na" vs "NA").
Defining Answers
You can define multiple acceptable answers, each with its own grade and feedback:
- Answer: The expected text response. You can define multiple answers to account for spelling variations, synonyms, or alternative acceptable responses.
- Grade: The percentage of marks awarded for this answer. Typically, the primary correct answer gets 100%, but you can assign partial credit (e.g., 50%) for partially correct answers.
- Feedback: Specific feedback displayed when this answer is matched.
Example Configuration
Question: What is the capital of France?
Answer 1: Paris Grade: 100% Feedback: Correct!
Answer 2: paris Grade: 100% Feedback: Correct! (if case-sensitive)
Answer 3: Parris Grade: 50% Feedback: Almost! Check spelling.
Answer 4: * Grade: 0% Feedback: The correct answer is Paris.
Using Wildcards
The asterisk (*) serves as a wildcard character that matches any sequence of characters (including no characters). Wildcards are useful for creating flexible matching patterns:
*Paris*— matches any answer containing "Paris" (e.g., "Paris", "City of Paris", "It is Paris").Par*— matches any answer starting with "Par" (e.g., "Paris", "Parity").*— matches any answer. This is commonly used as a catch-all final answer with 0% grade to provide feedback for any unmatched response.
Important: Answers are evaluated in order from top to bottom. The first matching answer determines the grade and feedback. Therefore, place more specific answers before wildcard patterns.
Multiple Correct Answers
Some questions may legitimately have more than one correct answer. For example:
Question: Name one primary colour.
Answer 1: red Grade: 100%
Answer 2: blue Grade: 100%
Answer 3: yellow Grade: 100%
Answer 4: * Grade: 0% Feedback: Primary colours are red, blue, and yellow.
Each correct answer gets a full 100% grade, so the student receives full marks for any one of the correct responses.
Multiple Tries and Penalties
When the quiz behaviour supports multiple tries:
- Penalty for each incorrect try: Set the fraction of marks deducted per incorrect attempt (e.g., 0.3333333 for a one-third penalty).
- Hints: Provide hints shown on subsequent attempts.
GIFT Format for Short Answer
// Single correct answer
::Capital of France::What is the capital of France?{=Paris}
// Multiple correct answers with partial credit
::Primary colour::Name a primary colour.{
=red
=blue
=yellow
~%50%green
}
Common Issues and Solutions
- Students complain their correct answer was marked wrong: Check for trailing spaces, unexpected characters, or case sensitivity issues. Add more answer variations.
- Too many spelling variations: Use wildcards sparingly to accommodate common misspellings, or consider using a different question type (e.g., Multiple choice) if exact text entry is not essential.
- Grading ambiguity: Always include a catch-all wildcard answer (
*) as the last entry with 0% grade to handle unexpected responses gracefully.
Best Practices
- Keep expected answers short (one or two words) to reduce ambiguity.
- Anticipate common misspellings and add them as partial-credit answers.
- Use case-insensitive matching unless case is specifically being tested.
- Always add a wildcard catch-all answer at the end with helpful feedback.
- Preview and test the question with various inputs before using it in a live quiz.
- Consider whether short answer is the right question type; if students might use many different phrasings, multiple choice may be more appropriate.