X Close

Digital Education team blog


Ideas and reflections from UCL's Digital Education team


Moodle STACK Quiz question type: deploying variants to avoid quiz crashing

By Aurelie, on 4 May 2022

Questions in STACK can contain randomly generated elements. A student will be given a random variant of a question generated by a pseudo-random seed.

Why deploy variants?

The tutor is strongly advised to pre-generate and “deploy” variants of a question. Not pre-generating question variants Forces Moodle to generate them on the fly – for quizzes with larger numbers of participants this can cause quizzes to crash/freeze.
When a student attempts the question, they will be given a random selection from the deployed variants.

Other reasons for deploying variants of a question:

  • STACK runs all the question tests on each deployed variant to establish each variant of the question is working. This aids quality control. By using question tests, it is unlikely a student will be given a random variant which does not work correctly.
  • The tutor can decide if each deployed variant appears to be of equal difficulty. The tutor can easily delete variants they do not like.


  • If an author does not deploy any variants (not advised!) then the student gets any random variant.
  • Questions that don’t use randomisation cannot be deployed explicitly. STACK automatically detects randomisation.

How to deploy question variants

The deployment interface can be found by editing a question and clicking on question tests and deployed variants.

  1. The easiest way to do so is to preview the question
  2. Then click the Question tests & deployed variant link on the top right corner.
  3. Click ‘deploy’ if not already deployed.
  4. Next to Attempt to automatically deploy the following number of variants, enter the number of variants  you would like and click Go.
    (depending on the question and the question note content you may be able to deploy various amount; if possible deploy over 30)
    You can preview results and either exclude variants, or return to the quiz question settings to revise the randomisation you have used in the question.
  5. Check variants as required.
  6. This will show the list of currently deployed variants, and links to undeploy all or a specific variant.
  7. Optionally, click ‘Run all tests on all deployed variants (slow):’ and check/undeploy any variants you don’t want to use.


There is currently no way to loop systematically over all variants and deploy them all.

Find more details and advice on using STACK question types on the M57 – STACK online assessment for mathematics and science.

Please notify ELE of any online exams

By Domi C Sinclair, on 11 December 2013

With the end of term fast approaching we are sure many of you will be running exams or tests, which may be via Moodle quizzes. If this is the case then E-Learning Environments would like to kindly request you let us know of any summative exams/ tests being run through Moodle. You can notify us via the link in the Help menu on Moodle or by finding the exam notification form on the ELE website. When you notify us of an exam this enables three things:

1. We can check the settings of the Moodle quiz
2. We can ensure a member of staff is available for support during the exam
3. We can notify the team that look after the cluster rooms, who can then check computers are working

If you would like to learn more about Moodle online exams, or would like a copy of the Exam Settings Checklist or Moodle Invigilator Checklist then visit the Moodle Resource Centre.