As teacher, create a quiz and set a time limit, a close date and set When time expires to Allow a grace period to submit, but not change any responses. Set Submission grace period to a suitable amount of time to let you do the tests below.
1. As student, start a quiz attempt and answer some questions. Then leave the browser tab open until time expires.
2. You will be automatically redirected to the review page, and the quiz will move into the overdue state. There will be a message telling you the deadline before which you must submit.
3. Click the submit button, and your attempt will be submitted and counted.