submitFinalize when closing time is reached

Created on 1 February 2024, 5 months ago

Problem/Motivation

Timing out a quiz by js countdown timer means either calling submitForm or submitBlank. Calling submitBlank on an answered question results in a quiz_result_answer that is now marked as skipped, which is undesirable, but calling submitForm currently does not submit just this question and no more, because at the point of submission the exam has not yet hit the buffer time (closing time plus 5 seconds). This can result in multiple form submissions until the buffer time is hit.

Proposed resolution

Allow a submission to be made up until closing time plus buffer time, but if a submission is made after the closing time, call submitFinalize directly. This requires "isTimeReached" and "isTimeBufferReached".

Attached patch makes this change to QuizResult and QuizQuestionAnsweringForm, so any automated submission can submitForm if input is found, or submitBlank if it is not - and the user is smoothly taken to the results page.

✨ Feature request
Status

Active

Version

6.0

Component

Code - Quiz core

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.69.0 2024