Make the following php code print out the string "cat"
$ar= array('cat','mat');
print $ar[{0}];
]]>
What are the medals that can be won in the olympic games?
Enter the same value twice or, e.g. gold, gold, silver. It will mark all answers correct with a tick, but if you notice the score will be 2 rather than three.
{gold|silver|bronze} {gold|silver|bronze} {gold|silver|bronze}
]]>What are the medals that can be won in the olympic games?
Enter the same value twice or, e.g. gold, gold, silver. It will mark all answers correct with a tick, but if you notice the score will be 2 rather than three.
{gold|silver|bronze} {gold|silver|bronze} {gold|silver|bronze}
]]>The [Cat] sat on the [Mat]
]]>Use of the double !! indicates that a gap must be left blank be considered correct. The !! fields get a mark if left blank and can be thought of as distractors.
Canine | [dog] |
Feline | [cat] |
Bovine | [!!] |
2[+]2=4
4[/]2=2
The option for disable regex can be found in the More Options in the question editing form.
Complete the syntax for this for loop in PHP
for($i=0;$i[<]10;$++){
print($i);
}
]]>
The [cat] sat on the [mat]
Although this is a "drag and drop" version, you can simply type into the fields, which may be useful when using a mobile browser. Note the draggable clues are shuffled each time a new quiz session starts.
Drag the correct words into the gaps.
The {cat} sat on the {mat}
]]>What is the greater than symbol [>]
What is the less than symbol [<]
What is the addition symbol [+]
What is the minus symbol [-]
What is the multiply symbol [*]
]]>
The complete phrase is "The cat sat on the mat", but this time the word options are in dropdowns.
The [cat] sat on the [mat]
]]>
The [kangaroo] is a native of Australia, the Kiwi is a native of [New] Zealand
]]>A question can be converted from showing prompts to no prompts by a simple selection in the question edit screen. This can be used to create an easy (with prompts version) and then copying it, making that change and you will then have a harder (no prompts) version.
The [cat] sat on the [mat]
]]>Feline | [tiger|lion] | [tiger|lion] |
Canine | [dog|!!] | [dog|!!] |
Feline | Canine |
---|---|
{tiger|lion} | {dog|!!} |
{tiger|lion} | {dog|!!} |
]]>
What is the less than sign [<]
What is the addition symbol [+]
What is the subtraction symbol [-]
What is the multiplication symbol? [*]
[10² ]=100The answer is "the black cat sat on the soft mat"
The [black cat] sat on the [soft mat]
]]>Moscow is the capital of [Россия]
The french word garçon has an accent on the letter c [garçon]
]]>Red, Green and Blue are examples of {colou?rs?}
This gap illustrates how you can "escape" the special characters used in regular expressions such as the dollar sign by preceeding them with a backslash i.e. \$. The correct answer for this gap is the $ symbol.
The special character that indicates the start of a variable in PHP is the {\$} sign. (enter the $ sign)
The HTML tag to start a paragraph is {\<p\>} (enter <p>)
Note there is an option under more options to switch off regular expression for the whole question, but escaping is useful where you need some regex processing.
You can ensure any spare spaces between words are ignored with \s
The correct answer here is black and white but it will accept the words with one or more spaces between them {black\s+and\s+white}.
Moodle has two short answer question types that support regular expressions
Preg
http://docs.moodle.org/25/en/question/type/preg
and
Regular Expression Short Answer
https://moodle.org/plugins/view.php?plugin=qtype_regexp
]]>
This question does not [work] because there are hidden html tags within the field, you can view (and delete) the hidden div tags by clicking the HTML button on the editor bar.
]]>
What are the colors of the French flag? |
It's [ blue, white, red ]
]]>