Calculated multiple choice quiz question
  • 16 Sep 2024
  • 2 minutes to read

Calculated multiple choice quiz question


Article summary

Calculated multiple choice questions operate much like the multiple choice question type, however the choices available are generated from a given formula using wildcards and datasets, as with the calculated question type.

For example, a question may be: 'Calculate the area of a rectangle where its width = {width} and its height = {height}.

The correct answer would be: 'The rectangle's area is {={width}*{height}} cm²' 

An incorrect answer could be: 'The rectangle's area is {={width}+{height}} cm²' 

The correct answer choice would display with the calculated answer, based on the values the system automatically generates.

A calculated multiple choice quiz question from the Learner's perspective.

To set up a calculated multiple choice quiz question, follow these steps:

  1. In the quiz activity, click Add, then select a new question.
  2. Select Calculated multiple choice, then click Add.
  3. Give the question a name, then enter the question in the Question text field. The question text must include the wildcards you will use in the answer formula, with each one inside a set of curly brackets. For example:
    'A rectangle has a width of {width} and a height of {height}. What is the area of this rectangle?'
  4. Set the Default mark, i.e. how many marks the Learner will be awarded if they answer correctly.
  5. Configure the other General settings as required.
  6. Enter a formula in each of the Choice fields, with at least one answer using the correct formula that will be used to calculated the correct answer based on the wildcards that are randomly generated. For example, entering {={width}*{height}} would mean the correct answer would be calculated by multiplying two wildcards: {height} and {width}. An incorrect choice could include the formula {={width}+{height}*2}. See Answer formula syntax for more information. You can configure additional answers by clicking Blanks for 3 more choices.
  7. Set the grade weighting for each answer.
  8. Add feedback for each choice. If you don't want to provide specific feedback for each answer, either use the General feedback field or the Combined feedback section.
  9. If required, configure the Units and Unit handling sections.
  10. If required, configure the Multiple tries and Tags sections.
  11. Click Save changes.
  12. Set which dataset you wish to use for the wildcards, and set whether data is synchronised with other questions in the quiz.
  13. Click Next page.
  14. Manually add wildcard values by entering values in the Wild card {x} fields, then clicking Add. If you want Totara to generate the values, you can additionally enter the Minimum and Maximum for the Range of values, set the number of decimal places, and select which distribution to use (Uniform means all values in the range are equally likely, while Loguniform means higher values are less likely to be generated). Note that you can generate multiple wildcards at once using the dropdown next to the Add button.
  15. Click Save changes.

There are two courses in the Totara Academy about using quizzes in Totara Learn, Getting started with quizzes and Advanced quiz Using these courses you can learn more on how to use these features, see best practice, and give it a go yourself.


© Copyright 2024 Totara Learning Solutions. All rights reserved. Some content originally obtained via GPLv3 license and continues to be available under GPLv3. All other content is the sole copyright of Totara Learning Solutions. 

Was this article helpful?

Changing your password will log you out immediately. Use the new password to log back in.
First name must have atleast 2 characters. Numbers and special characters are not allowed.
Last name must have atleast 1 characters. Numbers and special characters are not allowed.
Enter a valid email
Enter a valid password
Your profile has been successfully updated.