As teacher, create a quiz and set a time limit and set When time expires to "Allow a grace period to submit, but not change any responses". DO NOT set an end date. 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. The timer will count down telling you how long you have in which to submit.
3. Click the submit button, and your attempt will be submitted and counted.