Delayed attempts in quizzes
插件测验访问限制稳定版

Delayed attempts in quizzes

quizaccess_delayedJuan Pablo de Castro

  • Moodle 1.9–5.1
  • 更新 2025-10-08

Control the initial access to a Quiz with a randomized delay to reduce the load at the start and end times. By lightly spreading the access of the students the server load decreases dramatically and the overall capacity of your system increases by orders of magnitude.
Quiz Access Rule quizaccess_delayed
There is a tutorial page at https://juacas.github.io/quizaccess_delayed/index.html
During the COVID19 epidemic, we had to radically change the way in which the evaluation was carried out. Suddenly, the infrastructure designed for face-to-face teaching had to absorb the burden of a multitude of synchronous questionnaires. This has caused saturation in all Moodle systems.
A measure to mitigate the problem is to control the initial access to a Quiz with a randomized delay to reduce the load at the start and end times.
It is a module for Moodle platform that makes the “Attempt quiz now” button auto-enable at quiz open timing plus a randomized delay, without requiring to refresh the page.
This is done by a client side countdown timer (javascript) which is initiated when the page is rendered in the browser.
If you enable quiz open time in quiz settings, quiz students will no longer have to manually refresh the
page in order to get “Attempt Quiz Now” button at the quiz open timing.
A random delay up to 10 minutes is assigned to each student for spreading the entry times.
Background and Need
In a quiz with strict time constraints students tend to refresh the page too often, just to make sure if the attempt is available yet.
This unnecessarily increases the server load, and is a problem with large number of students.
Synchronized start of many attempts places a heavy short-time load in the Quiz core engine. By phasing in access, the impact is minimized.
Some questionnaire configurations generate particularly high server loads.
Some quiz schedules generate problems for students.
Solution
The “Activate Delayed Attempt” plugin makes the “Attempt quiz now” button auto-enable at quiz open timing plus a randomized delay, without requiring to refresh the page. This is done by a client side countdown timer (javascript) which is initiated when the page is rendered in the browser.
The plugin is implemented as an access-rule plugin overriding the default activity page render.
The page, displays the time remaining to start the quiz using an animated countdown. A pseudo-random delay is assigned to each student depending on the number of students and a set of site-wide parameters as fixed rate of entry, maximum allowable delay. An optional message for the students can be defined for all quizzes in the platform. An optional check and advice message for teachers can be defined for all quizzes in the platform.

返回插件目录