Topic outline
-
-
If you want to randomise just one variable to increase test security, or to allow students to practice the quiz question multiple times, but with different values, then you can create a basic question such as this one.
This type of question only requires the steps below - leave all other settings as default.
The example question we'll use to illustrate this step is:
If a = (random number) and b = (random number), what is a + b?
You can see the final version of the question embedded at the bottom of this page.
(We have included an .xml file of this question below. You can download this and import it into your course website question bank. Use it to develop your own basic formula questions.)
Steps
1. Click on Create a new question in the Moodle question bank and select the Formulas question type.
2. Fill in the name, and enter your random and global variables.
- Random variables are the basic variables which the question depends on. You set the variables within a certain range, and according to incremental steps.
- Global variables are determined by formulas, from either the random variables (that is, they manipulate the random variables), or from other global variables. Moodle works out their values based on the random variables assigned to that student in that question
When adding both random and global variables:
- Make a new line for each new variable
- Use a semicolon at the end of each line
- Give each variable a unique name
- Make sure that the set is enclosed within curly brackets {} and ends with a semi-colon (;) except for the final variable.
-
3. Set up the question part, by entering the mark and the answer variable.
4. Set up the allowable error for the student's answer in the Grading Criteria box. You can use the Grading Criteria box to outline a range of different instructions about marking, but at this stage we'll just define allowable error. In fact, in the default non-expert mode, the allowable error is the only grading criterian that you can set, and Moodle makes it easy - all you have to do is select the type of error (relative or absolute), and the actual allowance. Absolute error is the absolute difference between the student's answer and the correct answer (for example, +/- 5). It gives the size of the error in the same units as the measurement. Relative error is the ratio of the student's answer to the correct answer (for example, +/- 5%). (See more information about relative and absolute error.)
5. Write the text of the question, with an area for the student to answer.
-
6. Add feedback for an incorrect answer.
-
7. Save changes.
-
You can see the final question for our example below. Try entering various answers, to see how it behaves.
If you refresh the webpage, each time you'll see that the variable ‘a’ is randomly assigned a different value.
Watch out for this: After you've created a Formula question, ALWAYS test various correct and incorrect answers to see how your question will react.
-
You can import this question into your course question bank. You can then copy and adapt it.
Administration - Course administration - Question bank - Import - Moodle xml format - Choose the file - Import. (Watch a video on how to import the question into a course website.)
-
-