Randomized Numbers per Student in STEM Quizzes
· 6 min read · QuizClap Editorial
Write one calculation question and give each student their own values: placeholders, ranges and steps, a formula, percent tolerance grading, the built-in calculator, and an honest look at Moodle export.
When every student in a 150-seat hall gets the same numbers, the answer to question 3 travels along the row in seconds. QuizClap can give each student their own values for a calculation question from one template, and grade every answer against that student's own result. This guide shows how to write the template, how the numbers are chosen, how grading works, and what happens when you export the question to Moodle.
Available on Individual Pro and Campus Package. Closed-book mode, the Room PIN, device rules, focus warn-then-lock, the presence check, the built-in calculator and the Stage 2 team re-run are part of Individual Pro ($1.58/month billed $19/year, or $4/month; Rp 24.900/month billed Rp 299.000/year in Indonesia) and the Campus Package (15+ lecturer seats, $16.80 down to $9.80 per seat per year). Students always pay $0 and need no app or account. See plans and pricing.
1. Write the question with placeholders
Use a Type the answer question and write the stem with placeholders in curly braces. LaTeX works as everywhere else in QuizClap:
A cart of mass $m = {m}$ kg accelerates at $a = {a}$ m/s$^2$. Find the net force $F$ in N.
A placeholder name starts with a letter and has up to 12 letters, digits or underscores, for example {m}, {v0} or {R_load}. A placeholder with no matching variable is left as written, so a typo shows up in the editor preview.
2. Define the variables, formula and tolerance
Open Parameterized numeric variables & formula under the question. For each variable give a name, a minimum, a maximum and a step:
| Variable | Min | Max | Step | Possible values |
|---|---|---|---|---|
| m | 2 | 8 | 1 | 2, 3, 4, 5, 6, 7, 8 |
| a | 3 | 9 | 1 | 3, 4, 5, 6, 7, 8, 9 |
Then the formula for the right answer, written with the variable names: m * a. Formulas support + - * /, powers with ^, brackets, sqrt( ), and the constants pi and e. A free-fall question could use h from 5 to 20 in steps of 0.5 with the formula sqrt(2 * 9.81 * h).
Finally set the tolerance in percent, for example 1 for plus or minus 1%. The editor shows a sample student's version as you type, so you can check the wording and the answer before class.
Values follow the step exactly: min + k * step, never above the maximum, with as many decimals as your min, max and step use. A step of 0.5 gives 13.5, not 13.500000001.
AI agents can write the same question through the QuizClap MCP server or REST API with a numSpec object: {"vars": [{"name": "m", "min": 2, "max": 8, "step": 1}, {"name": "a", "min": 3, "max": 9, "step": 1}], "formula": "m * a", "tolPct": 1}.
3. How each student's numbers are chosen
The numbers come from a seeded random generator. The seed combines the event, the quiz, the run of the quiz, a random secret created for that quiz, the question number and the student's device in the class. That has three practical effects:
- Stable. A student who reloads the page or drops off Wi-Fi gets the same numbers again.
- Fresh on a re-run. Run the quiz again next week and everyone gets new values.
- Not guaranteed unique. Each student gets an independent draw, so two students can land on the same values. With 7 values for
mand 7 forathere are 49 combinations; in a class of 40, expect around 25 different pairs. To make sharing pointless, widen the ranges or add a third variable: 3 variables with 10 values each give 1,000 combinations.
4. How grading works
QuizClap evaluates your formula with the student's own values and accepts an answer within your tolerance of that result. With tolPct set to 1 and an expected answer of 42, anything from 41.58 to 42.42 counts. Details students will appreciate:
- A comma works as a decimal point:
42,4is read as 42.4. - Scientific notation works:
1.2e3is 1200. - Near zero there is a tiny absolute floor, so an expected answer of 0 does not demand perfect digits.
The formula is evaluated by QuizClap's own small math parser, not by running code, so a formula cannot do anything except compute a number.
5. The built-in calculator
In closed-book mode you can switch on the built-in scientific calculator. Students then calculate inside the quiz screen instead of switching to a calculator app, which would count as a focus leave under warn-then-lock. See the closed-book quiz guide for how focus leaves are handled, and the Safe Exam Browser guide if your exams run in SEB.
6. Writing good templates
- Choose ranges that keep the physics sensible: no negative masses, no division by a value that can be zero.
- Round your expected precision with the tolerance, not with the formula. If you want 3 significant figures, 0.5% to 1% is a fair tolerance.
- State units in the stem and ask for one unit only.
- Put the worked method in the explanation with LaTeX, for example
$F = m a$, so students can check their own numbers after results are released.
7. What happens when you export
Be careful here: the per-student variants do not survive export to other formats. We checked each exporter:
- Moodle XML: the question becomes a Moodle short-answer question with the placeholders left as text (
{m},{a}) and the formula text (m * a) as the accepted answer. - GIFT: the same, with
=m * aas the answer. - Cloze: the same, as a
SHORTANSWERgap with=m * a. - CSV and Excel: the stem keeps the placeholders and the Correct column holds the formula text.
- Aiken: the export refuses these questions, because Aiken only holds one-answer and true or false questions.
None of these become Moodle calculated questions. If you need the question in Moodle, rewrite it there as a calculated question, or export a fixed version with real numbers. Keep the QuizClap version as your master copy: a QuizClap JSON backup keeps the variables, formula and tolerance. On import, QuizClap also leaves out Moodle calculated questions and tells you how many it skipped, so build these templates in QuizClap. For ordinary banks, the free Word & Excel to Moodle XML converter converts in your browser.
8. A worked example for week 3
- Create a quiz with four Type the answer questions: Newton's second law, free fall, Ohm's law and a simple energy balance.
- Give each two or three variables with wide ranges and a 1% tolerance.
- Tick Closed-book mode, choose Laptop & tablet browsers only and switch on the calculator.
- Run it, release results, then run the Stage 2: Team re-run so groups compare methods on their different numbers.
More settings are in the lecturer guide. Plans are on the pricing page, and the comparison page shows how QuizClap's LaTeX and Moodle support compares with other classroom tools.