Variables instantiation is only used by teachers, generally when writing a question, to check which values the variables will take when the question is executed by the students.
It is not necessary to instantiate the variables and, if done, the instantiation does not affect the behaviour of the question in any way. It is simply a tool to help the teacher verify that the variables are well defined.
The figure below shows the instantiation of the variables defined in the question below which you can download in XML format. Each part of the instantiation is described in the following text.
This value indicates the number of sets of variables to instantiate. The proposed values range from 1 to 1000 and "*" is also proposed. Click the [Instantiate] button to display the selected number of instantiated datasets.
"*" means the maximum possible number of different instantiations. This number is based on the random variables. For example, if the following random variables are defined: a={1:5}; b={3,5,7}; c=shuffle([1,2,3,4,5,6,7]);, the maximum possible number of different instantiations is equal to 4×3×7=84.
For the shuffle() function, an instantiation only shows a number of datasets equal to the number of arguments of the function. New instantiations show different datasets. For example, when c=shuffle([1,2,3,4,5,6,7]); is instantiated, only 7 datasets are displayed. If we instantiate c=shuffle([1,2,3,4,5,6,7]); again, 7 other datasets are displayed. The purpose of this is simply to limit the number of datasets displayed during instantiations. Note that the shuffle([1,2,3,4,5,6,7]) function actually generates \(7! = 5040\) different datasets, all of which are susceptible to be used when the question is run.
You cannot display more instantiated datasets than the maximum possible number of different instantiations. In the previous example where this number is 84, you cannot display more than 84 instantiated datasets even if you request a larger number such as 100, 250, 500, or 1000.
On the other hand, you can request to instantiate fewer datasets than the maximum possible number of different instantiations. Still in the same example where this later number is 84, you can request to instantiate 1, 5, 10, 25 or 50 datasets.
Note that the specified "Number of datasets" simply indicates the number of datasets to display in the quiz settings. The number of instantiated datasets has absolutely no effect on the number of datasets that will actually be presented to students when running the quiz.
When the maximum possible number of different datasets is greater than 1000, the number of datasets displayed in the quiz settings is limited to 1000. When running the quiz, all possible datasets are used, that is, datasets are randomly selected from all possible datasets even if there are millions of them.
If the maximum possible number of different instantiations is greater than the number of students, not all datasets can be used when running the quiz. Since the datasets are chosen at random, it is not certain that all students will have different datasets, but most of them will.
If the maximum possible number of different instantiations is less than the number of students, all datasets may be used when running the quiz. In this case, it is certain that some students will have the same datasets.
In general, it is advisable to have a maximum possible number of different instantiations greater than the total number of students who take the quiz. Note that by varying the value of a few variables, as in the example above, this condition is easily met. For example, a maximum possible number of different instantiations of 84 is more than sufficent for a class of 30 students. It is also easy to get a much larger maximum possible number of different instantiations.
You can view a dataset by choosing it from the drop-down menu. It is not necessary to click the [Update] button because the dataset is updated automatically when selecting it.
The "Preview using dataset" field shows the following for the selected dataset:
In the main question text, random and global variables enclosed in curly brackets are replaced by the numeric values from the dataset. In the parts' text, random, global, as well as local variables enclosed in curly brackets are replaced by the numeric values from the dataset. Expressions that include mathematical operations or functions, enclosed in curly bracket, for example {=a+b} are displayed but not evaluated.
The "Statistics" and "Instantiated dataset" fields display the values of the random and global variables, and, for each part, the values of the local variables and of the target answers (@1 for part 1, @2 for part 2, etc.) Note that "Grading variables" are not instantiated.
The "Statistics" field displays the minimum and maximum values of the variables in the instantiated datasets. The "Instantiated dataset" field displays the values of the variables for each dataset instantiated according to the specified value of "Number of dataset".
© 2019-2024 Dynamic Courseware (Dominique Bauer)
Documentation: CC0 1.0 Universal - No copyright
Remixes for Moodle: CC BY-NC-SA 4.0 Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International
Contact request sent
Personal space
Save draft messages, links, notes etc. to access later.
No starred conversations
No group conversations
No private conversations
No results
Search people and messages
You can restrict who can message you
You have blocked this user.
You are unable to message this user