Couldn't you have that more easily by simply extending the session timeout period?
Quiz
What happens if a session times out in the middle of a quiz?
གྲོས་བསྟུན་འདི་བསྡམས་ཡོདཔ་ལས་ ལན་གསལ་བརྐྱབ་མི་ཚུགས་