InMotion Hosting Support Center

The first option in the Moodle Question Bank is the Calculated question. The calculated question allows the teacher to create mathematical questions. These can have formulas that are kept in a Dataset (Datasets will be discussed in a later article). An example of a calculated question would be a question on the area of a rectangle. The teacher can create a question based off of the area of a rectangle formula. Lets move forward and walk through the steps of creating the calculated question.

Creating a Calculated Question in Moodle

  1. Log into the Moodle Dashboard
  2. Navigate to Front page settings > Question bank > Questions in the Settings section on the left..
  3. Click Create a new question.

    When the Choose a question type to add box pops up, select the Calculated radio button and click Next.
  4. calculated-question-3-general-moodleNext the Adding a Calculated question page will display. The following table will detail the necessary fields to fill out.
    Category Select the category. For more information on the question categories click here.
    Question name Type the Question name. This should be very unique as it will need to be distinguishable from the other questions.
    Question Text In the Question Text box, type the question. For instruction purposes, type the area of a rectangle question. The question should look like the following:

    What is the area of a rectangle that is {A} by {B}

    The Curly brackets are wild card variables that can be set to random parameters. There are many different formulas that can be created for the Calculated question. This tutorial will not cover Calculated question formulas. The student will see random numbers in place of the curly bracketed variables like the following:

    What is the area of a rectangle that is 5 by 3?

    Note! At least one wildcard must be in the Question text. Wildcards are placed inside curly brackets. Wild cards will be discussed in a different article.

    Default mark The Default mark is to determine how much the question is worth. For example, if the question is weighed heaver than other questions, the Default mark can be set to 2 or 3 points.
  5. calculated-question-4-answer-moodleNext, fill in the Answer section. Below is a brief on the Answer settings. When done click Save Changes.
    Correct Answer Formula= This is where the formula for the question is entered. Moodle will use the formula to calculate the question and answer. The formula used in this tutorial is {A}*{B}. Formulas will be created the same way they are normally calculated with a calculator. This article will not discuss how to create a formula.
    Grade The grade must be set or there will be an error saving the question. This value is how much the question is worth if answered correctly.
    Tolerance ±= The Tolerance of the Question answer is the same as "Grading on a Curve". Tolerance allows the student to come close to the correct answer. The default is 0.01. which is equivalent to 1%. This is figured into the Tolerance type. This will be discussed in a later article
    Tolerance type The tolerance of the answer is figured 3 ways, Nominal, Relative, and Geometric. Each of these are factored in with the Tolerance ±=. The details of how this works will be discussed in a different article.
    Correct answer shows This determines the precision of the answer.
    Format This setting sets the answer as a decimal or significant figures.
    Feedback What displays when the answer is correct goes in the Feedback box. This is not a necessary part of the answer.

  6. calculated-mulitchoice-bank-6-dataset-moodleOn the Choose Wildcards dataset properties page click next. (This section will be discussed in detail in a different article.)
  7. calculated-mulitchoice-bank-7-add-moodleOn the Edit the wildcards datasets page, where the Add section is located, make sure to click Add.

    Important! . If the dataset item is not added, there will be an error message stating:
    You must add at least one dataset item before you can save this question.

    Once the dataset is added, click Save changes. (This section will be discussed in detail in a different article.)
  8. calculated-question-6-bank-moodleNow the Question will show in the Question Bank. To preview the Question click the preview preview icon.
  9. calculated-question-7-preview-moodleThe preview should look like the following snapshot. Congratulations the question was entered in the Question bank and is now available to use in Lessons and Quizzes.

This concludes the article on Inserting a Calculated question in the Moodle Question Bank. If you missed the previous article on Creating categories in the Moodle Question Bank, feel free to visit it now. There are many more question types that can be added to the Question bank. To see other questions that can be added, please see the course on Working with the Question Bank

Was this article helpful?
Continued Education in Course 104: Working with the Question Bank
You are viewing Section 3: Inserting a Calculated question in the Moodle Question Bank
Section 2: Creating categories in the Moodle Question Bank
Section 4: Working with the calculated question Tolerance in Moodle 2.3

Related Questions

Here are a few questions related to this article that our customers have asked:
Ooops! It looks like there are no questions about this page.
Would you like to ask a question about this page? If so, click the button below!
Ask a Question

Forum Login

You are NOT logged in. You can still browse our Support Center.

To participate within our Community Support Forum:

n/a Points
2015-03-10 5:23 am

"round{=100-8800/{p} }"

{=100-8800/{p} }

round{=100-8800/{p} }

I cannot ROUND the variable as above, please advice.


10,077 Points
2015-03-10 11:48 pm
Hello Agen,

I have found moodles documentation specifically on calculated questions as it will go more in depth than our guide.
n/a Points
2014-12-03 8:02 am

Thanks - finding these pages far more useful than Moodle's documentation.

However, "a square that is 5 by 3"?! I suggest changing this to rectangle.

43,761 Points
2014-12-03 11:48 am
Hello Dan,

Thank you for pointing that out. We have corrected the issue.
Kindest Regards,
Scott M

Post a Comment

Email Address:
Phone Number:

Please note: Your name and comment will be displayed, but we will not show your email address.

4 Questions & Comments

Post a comment

Back to first comment | top

Need more Help?


Ask the Community!

Get help with your questions from our community of like-minded hosting users and InMotion Hosting Staff.

Current Customers

Chat: Click to Chat Now E-mail:
Call: 888-321-HOST (4678) Ticket: Submit a Support Ticket

Not a Customer?

Get web hosting from a company that is here to help. Sign up today!