You really need to be logged in to Moodle with two separate web browsers to test this. Be Teacher in one, and Student in the other.
1. As teacher, create a quiz as a teacher, with no access restrictions (yet).
2. As student, start an attempt and go to the summary page.
3. Now, as teacher, change the settings to restrict things. For example add an IP address restriction, or a close date in the past (or both).
4. As a student, click reload on the summary page. Verify that you see an error message that explains the problem (not a fatal error about an undefined function.)
5. As student, click continue, you should get to the view.php page.
6. As teacher, turn off the access restrictions again, and delete the student's attempt.
7. As student, click reload. The Start attempt button should re-appear.
8. As teacher, turn the access restrictions back on.
9. As student, click the Start attempt button. You should get an error message explaining that you cannot start the attempt now.