Simple calculated question type


Simple calculated questions offer a way to create individual numerical questions whose response is the result of a numerical formula which contain variable numerical values by the use of wildcards (i.e {x} , {y}) that are substituted with random values when the quiz is taken.

The simple calculated questions offers the most used features of the calculated question with a much simpler creation interface.


My first Simple calculated question

As a first example we will create a question asking for the surface of a rectangle. Here are the quick steps we will go over in detail:

Initiating the creation process

Go to the Question bank, select "create a new question" and in the pop-up window select the Simple calculated. The Simple calculated question interface will appear. Give a name to your question in the title.

The question text

Fill the question text (note that the {param} names can be chosen at will. Here we will use {b} for base and {h} for height.

The Correct Answer Formula

Fill the Correct Answer Formula using the {param} names used in the question text. Here we use {b} for base and {h} for height.

Other answer and response parameters

We will set the Grade to 100%, as this is the only answer in this question.

Leave the other parameters as they appears ( 0.01 relative means ±1% tolerance).

Find the {param} in the formula

In simple calculated only the {param} that are in the formula will be used.

In the question text , the {param} that are in the formula

will appear with there numerical values i.e 6.7 .

Any other {enclosed text} will appear as is i.e. {enclosed text}.

Click on the button

On reload the two {b} and {h} will be displayed.

Set the minimum and maximum values

Here the {b} range has been set to a 15-20 range and

the {h} range has been set to a 5-10 range

as we want a rectangle with a larger base than height.

Note the sets are shown in reverse order so the the number indicates how many sets were created.

The two sets illustrate that the variability defined by the Min and Max values.

Note that the formula result is analyzed and

the tolerance limit (here 1% relative) is shown

The correct response that will be shown to the student is also shown.

The 2 decimals where defined are the default values defined as the last parameter under the Correct formula.

Click on the Save button

Test your first Simple calculated question

On the question bank click on the preview icon.

Enter the result you have calculated yourself or click on the Fill with Correct button.

The values should be identical...

Click on the submit button

My second Simple Calculated question: adding apples and oranges

Question text

Calculated values

Editing a Simple Calculated question: Additional comments

  1. Set the default question grade (i.e. the maximum number of marks for this question).
  2. Set the Penalty factor (see Penalty factor below).

Correct answer formula syntax for further details.

  1. Choose the grade that the student will get for this question if they give this answer. This should be a percentage of the total marks available. For example, you could give 100% for a correct answer, and 50% for an answer that is nearly right. One of the answers must have a 100% grade.
  2. Determine the tolerance for error that we will accept in the answer. The tolerance and tolerance type settings combine to give a range of acceptable scores. So, if tolerance = t, correct answer = x and the difference between the user's answer and the correct answer is dx, then the tolerance types are as follows:

    1. Nominal - mark correct if dx <= t
    2. Relative - mark correct if dx / x <= t
  3. The next 2 settings, "Correct answer shows" and "Format" determine the precision of the Correct answer shown. They are not used for grading.
  4. Add some feedback which the student will see if they enter this answer.
  5. We can specify as many answer formulae as you like - click "Add another answer blank" to add more.
  6. We can also specify units for the answers. For example, if you enter a unit of 'cm' here, and the accepted answer is 15, then the answers '15cm' and '15' are both accepted as correct. If you add more than one unit, we can also specify a multiplier. So, if your main answer was 5500 with unit W, we can also add the unit kW with a multiplier of 0.001. This means that the answers '5500', '5500W' or '5.5kW' would all be marked correct. Note that the accepted error is also multiplied, so an allowed error of 100W would become an error of 0.1kW.

Penalty factor

The 'penalty factor' only applies when the question is used in a quiz using adaptive mode - i.e. where the student is allowed multiple attempts at a question even within the same attempt at the quiz. If the penalty factor is more than 0, then the student will lose that proportion of the maximum grade upon each successive attempt. For example, if the default question grade is 10, and the penalty factor is 0.2, then each successive attempt after the first one will incur a penalty of 0.2 x 10 = 2 points.

Correct answer formula syntax

DO NOT PUT THE = sign in the formula

Available functions

The available functions are the same as for the calculated question type.

Predefined constants

Actually there is NO Predefined constant that is allowed other than pi() as a function without parameter. Pierre Pichet 00:00, 5 June 2009 (UTC)