Create Quiz

When building a quiz you can add:

  • Quiz questions with answer explanations: SingleChoice, MultipleChoice, and TextEntry ("Type the answer")
  • Quiz question with items to order
  • Flashcard questions
  • Form fields
  • General blocks
  • Multiple result pages: segment users based on their score

Add single/multiple choice questions

Properties

PropertyRequiredTypeDescriptionDefault
titlestringtitle of the question
typestringset to SingleChoice or MultipleChoice
itemsobjectkey-value array, consisting of the question as the key and the value is a boolean value indicating if the answer is correct
itemsShuffledbooleanIf set to true, the order of the items/choices will be shuffledfalse
itemsRightOrWrongbooleanIf set to true, the items will be shown as right or wrongtrue
scoreintegerThe score the user gets for answering this question correctly1
explanationobjectAn explanation object for the correct answer; learn more
wrongExplanationobjectAn explanation object for the incorrect answer; learn more

Example object

{
    "title": "The best noodles?",
    "type": "SingleChoice",
    "items":  {
        "Spaghetti": true,
        "Fusilli": false
    }
}

In this example Spaghetti would be the correct choice.

Please note that only one answer option can be correct for SingleChoice questions. If you try to add more than one correct answer the API will return an error.

Providing answer explanations and scores per answer

Just as in the Riddle Creator, you can provide an explanation and score for each answer individually. Please note that you must either provide an explanation / a score for each answer, one for all, or none.

Example object:

{
    "title": "The best noodles?",
    "type": "SingleChoice",
    "items":  {
        "Spaghetti": {
            "isCorrect": true,
            "score": 2,
            "explanation": {
                "title": "Correct!",
                "description": "Spaghetti is the best noodle"
            }
        },
        "Fusilli": {
            "isCorrect": false,
            "score": 0,
            "explanation": {
                "title": "Incorrect!",
                "description": "Spaghetti is the best noodle"
            }
        }
    }
}

In this example Spaghetti would be the correct choice and the user would get 2 points for selecting it. If they select Fusilli they would get 0 points and see the explanation "Spaghetti is the best noodle".

Add "Type the answer" questions

Properties

PropertyRequiredTypeDescriptionDefault
titlestringtitle of the block
typestringset to TextEntry
answersstring[]an array of possible answers
ignoreCasebooleanset to true to ignore the case of the answer (e.g. "hello" and "Hello" would be considered the same)false
ignoreSpacesbooleanset to true to ignore spaces in the answer (e.g. "hello" and "h e l l o" would be considered the same)false
livesintegerset to a number to give the user multiple attempts to answer the question1
unlimitedLivesbooleanset to true to give the user unlimited attempts to answer the questionfalse
scoreintegerThe score the user gets for answering this question correctly1
explanationobjectAn explanation object for the correct answer; learn more
wrongExplanationobjectAn explanation object for the incorrect answer; learn more

Example object

{
    "title": "Type 'hello' in either Italian, German, or French.",
    "type": "TextEntry",
    "answers": ["Ciao", "Hallo", "Bonjour"]
}

Optional properties

By default the user must type the exact answer to get the question correct and only has one life/attempt. To change this behavior you can set ignoreCase, ignoreSpaces, and lives:

{
    "title": "Type 'hello' in either Italian, German, or French.",
    "type": "TextEntry",
    "answers": ["Ciao", "Hallo", "Bonjour"],
    "ignoreCase": true,
    "ignoreSpaces": true,
    "lives": 3
}

Add "Order it" questions

Properties

PropertyRequiredTypeDescriptionDefault
titlestringtitle of the question
descriptionstringdescription of the question
typestringset to Order
itemsstringan array of strings/items to order
itemsShuffledbooleanIf set to true, the order of the items/choices will be shuffledfalse
scoreintegerThe score the user gets for answering this question correctly1
layoutTypestringset to Rows or ColumnsRows
rankFormatstringset to Number, Letter, or NumberEnumNumber
showCorrectAnswerButtonbooleanset to true to show the correct answer buttonfalse
guessesAreUnlimitedbooleanset to true to allow unlimited guesses; if this is set to true none of the guesses properties below can be set.false
guessesintegerset to a number to give the user multiple attempts to answer the question1
guessesIconstringset to Heart, Numeric, or XHeart
guessesDisplayLabelstringprovide a string to display the # of remaining guesses

Example objects

An example with only the required options:

{
    "title": "Order the following colors from lightest to darkest.",
    "type": "Order",
    "items": ["red", "blue", "green"]
}

An example with extensive configuration:

{
    "title": "Order the following colors from lightest to darkest.",
    "type": "Order",
    "items": ["red", "blue", "green"],
    "itemsShuffled": true,
    "layoutType": "Rows",
    "rankFormat": "Number",
    "showCorrectAnswerButton": true,
    "guesses": 3,
    "guessesIcon": "Heart",
    "guessesDisplayLabel": "Cat lives"
}

Add flashcard questions

Properties

PropertyRequiredTypeDescriptionDefault
titlestringtitle of the question
descriptionstringdescription of the question
typestringset to Flashcard
hintstringhint for the question
backsideobjectobject with title and optionally description + media; this is the content the user sees when flipping the flashcard

Example object

{
    "title": "Capital of germany",
    "description": "Germany is a country in Europe",
    "hint": "Starts with a 'B'",
    "type": "Flashcard",
    "backside": {
        "title": "Berlin",
        "description": "Berlin is the capital of Germany"
    }
}

Answer explanations

You can add an answer explanation to SingleChoice, MultipleChoice, and TextEntry questions.

To do this add an explanation object to the quiz question block configuration, consisting of:

PropertyRequiredType
titlestring
descriptionstring

If you wish to have an incorrect answer explanation, you can add the wrongExplanation with the same properties as explanation to the block. If only explanation is provided, it will be shown as an explanation for both correct and incorrect answers.

Example object

{
    "title": "Type 'hello' in either Italian, German, or French.",
    "type": "TextEntry",
    "answers": ["Ciao", "Hallo", "Bonjour"],
    "explanation": {
        "title": "My correct explanation",
        "description": "My correct explanation description"
    },
    "wrongExplanation": {
        "title": "My wrong explanation",
        "description": "My wrong explanation description"
    }
}

Note: Explanations can also be provided on answer level for single and multiple choice questions. Please refer to "Providing answer explanations and scores per answer" above.

Result pages

In a quiz you can specify multiple result pages to segment users based on their scores. For example users who score between 0-50% will see one result, users who score between 51-100% will see another result. Each result has a title, description, minPercentage, and maxPercentage property.

As there can be multiple results, we store the results in an array in build.results:

[
    {
        "title": "My result 0-30%",
        "description": "Description 1",
        "minPercentage": 0,
        "maxPercentage": 50
    },
    {
        "title": "My result 31-100%",
        "description": "Description 2",
        "minPercentage": 51,
        "maxPercentage": 100
    }
]

If you want to create complex result pages with texts, images, answered blocks, ... click here to learn how to build advanced result pages.

Full example

Example with all available blocks + options:

{
    "type": "Quiz",
    "build": {
        "title": "Germany quiz",
        "blocks": [
            {
                "title": "What's the capital of Germany?",
                "type": "SingleChoice",
                "items": {
                    "Berlin": true,
                    "Lissabon": false,
                    "Leipzig": false
                },
                "explanation": {
                    "title": "Correct!",
                    "description": "Berlin is the capital of Germany"
                },
                "wrongExplanation": {
                    "title": "Incorrect!",
                    "description": "Berlin is the capital of Germany"
                }
            },
            {
                "title": "What are valid colors in German?",
                "type": "MultipleChoice",
                "items": {
                    "rot": true,
                    "schwarz": true,
                    "nero": false
                },
                "explanation": {
                    "title": "Correct!",
                    "description": "Berlin is the capital of Germany"
                }
            },
            {
                "title": "Type 'hello' in either Italian, German, or French.",
                "type": "TextEntry",
                "answers": [
                    "Ciao",
                    "Hallo",
                    "Bonjour"
                ],
                "explanation": {
                    "title": "Correct!",
                    "description": "Ciao, Hallo, and Bonjour all mean 'hello'"
                },
                "wrongExplanation": {
                    "title": "Incorrect!",
                    "description": "Ciao, Hallo, and Bonjour all mean 'hello'"
                },
                "ignoreCase": true,
                "ignoreSpaces": true,
                "lives": 3
            },
            {
                "title": "Order the following colors from lightest to darkest.",
                "type": "Order",
                "items": [
                    "red",
                    "blue",
                    "green"
                ],
                "itemsShuffled": true,
                "guesses": 3,
            },
            {
                "title": "Capital of Germany",
                "description": "Germany is a country in Europe",
                "hint": "Starts with a 'B'",
                "type": "Flashcard",
                "backside": {
                    "title": "Berlin",
                    "description": "Berlin is the capital of Germany"
                }
            }
        ],
        "results": [
            {
                "title": "Not so good...",
                "description": "There's room for improvement",
                "minPercentage": 0,
                "maxPercentage": 50
            },
            {
                "title": "Well done!",
                "description": "You're a winner",
                "minPercentage": 51,
                "maxPercentage": 100
            }
        ]
    }
}