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}
]]>Canine | Feline | Bovine |
---|---|---|
[wolf|dog|dingo] | [lion|tiger|lynx] | [buffalo|yak|antelope] |
[wolf|dog|dingo] | [lion|tiger|lynx] | [buffalo|yak|antelope] |
[wolf|dog|dingo] | [lion|tiger|lynx] | [buffalo|yak|antelope] |
]]>
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]
]]>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.
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 [cat] sat on the [mat]
]]>What is the less than sign [<]
What is the addition symbol [+]
What is the subtraction symbol [-]
What is the multiplication symbol? [*]
]]>The answer is "the black cat sat on the soft mat"
The [black cat] sat on the [soft mat]
]]>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 ]
]]>