Hey,
what is the best way to import code blocks (for programming quiizzes) with the gift format?
I was trying to use markdown format to write unformated code. But I didn't get the right indentation as expected.
Any idea?
Thanks, Stefan
Hey,
what is the best way to import code blocks (for programming quiizzes) with the gift format?
I was trying to use markdown format to write unformated code. But I didn't get the right indentation as expected.
Any idea?
Thanks, Stefan
Hello Stefan,
In your GIFT file, write:
::Multi choice 1::[markdown] ``` function myFunction(p1, p2) \{ ····return p1 * p2; // The function returns the product of p1 and p2 \} ```
where ···· stand for non-breaking spaces (Alt-255 on Windows) and where { and } are escaped with \.
Moodle will display:
function myFunction(p1, p2) { return p1 * p2; // The function returns the product of p1 and p2 }