The quiz questions are built using an include with parameters. The template expects 3 parameters:
- question - the text for the question
- choices - an array of options for the question, presented in the order given
- answer - the position of the correct answer in the choices array
- feedback (optional) - the array of feedback options, must match the order of the choices array
It is easiest to use variables to hold the parameter values, then pass the variables into the include. The variables can be setup in the page YML or as liquid variables (shown below).
This requires Bootstrap for styling.
Question
This is an awesome template!
True |
Correct! This is an awesome template. |
|
False |
How can you say that?! |