We did something similar about giving all students extra time while taking into account of all existing user and group overrides & only applying it to the exam sitting that is currently in progress (e.g. if exam hall is too small, some students may take exam in the morning, the other half of the class take it the afternoon etc and if disruption happens in the morning only they should get the extra time). Sharing in case some of the code can be reused to help you with this:
- https://blogs.ucl.ac.uk/digital-education/2025/05/09/moodle-exam-guard-update/
- https://github.com/ucl-isd/moodle-local_examguard/pull/5
- https://github.com/ucl-isd/moodle-local_examguard/pull/6