https://docs.moodle.org/35/en/GIFT_format

Format symbols

Here are some common GIFT symbols and their use.

Symbols Use
// text Comment until end of line (optional)
 ::title:: Question title (optional)
text Question text (becomes title if no title specified)
[…format…] The format of the following bit of text. Options are [html], [moodle], [plain] and [markdown]. The default is [moodle] for the question text, other parts of the question default to the format used for the question text.
{ Start answer(s) — without any answers, text is a description of following questions
{T} or {F} True or False answer; also {TRUE} and {FALSE}
{ … =right … } Correct answer for multiple choice, (multiple answer? — see page comments) or fill-in-the-blank
{ … ~wrong … } Incorrect answer for multiple choice or multiple answer
{ … =item -> match … } Answer for matching questions
#feedback text Answer feedback for preceding multiple, fill-in-the-blank, or numeric answers
####general feedback General feedback
{# Start numeric answer(s)
answer:tolerance Numeric answer accepted within ± tolerance range
low..high Lower and upper range values of accepted numeric answer
=%n%answer:tolerance n percent credit for one of multiple numeric ranges within tolerance from answer
} End answer(s)
\character Backslash escapes the special meaning of ~, =, #, {, }, and :
\n Places a newline in question text — blank lines delimit questions

Here are some quick examples:

// true/false
::Q1:: 1+1=2 {T}

// multiple choice with specified feedback for right and wrong answers
::Q2:: What's between orange and green in the spectrum? 
{ =yellow # right; good! ~red # wrong, it's yellow ~blue # wrong, it's yellow }

// fill-in-the-blank
::Q3:: Two plus {=two =2} equals four.

// matching
::Q4:: Which animal eats which food? { =cat -> cat food =dog -> dog food }

// math range question
::Q5:: What is a number from 1 to 5? {#3:2}

// math range specified with interval end points
::Q6:: What is a number from 1 to 5? {#1..5}
// translated on import to the same as Q5, but unavailable from Moodle question interface

// multiple numeric answers with partial credit and feedback
::Q7:: When was Ulysses S. Grant born? {#
         =1822:0      # Correct! Full credit.
         =%50%1822:2  # He was born in 1822. Half credit for being close.
}

// essay
::Q8:: How are you? {}

See the Moodle documentation link above for details.

Get My FREE eBook!
Learn how to achieve your dreams in my FREE e-book! Plus receive fresh content from my blog. Six Simpe Steps ebook cover
I respect your privacy. I don't spam!
FREE eBook!
Learn how to discern God's calling on your life! Sign up for this FREE eBook and get our blog content straight to your inbox as well. Preparingtodiscerngodscalllarge2
We respect your privacy. We don't spam.