There are millions of if statements in view.php and attempt.php and review.php to enforce the various rules about when students can attempt the quiz. This is messy, it makes the logic hard to follow, and there are often bugs where the logic to implement a particular rule is not exactly the same in different places.
The plan is to refactor all this code into some classes. There is a main class quiz_access_manager, which is the only one that view.php, attempt.php, etc. have to talk to.
Internally, it uses a number of small classes derived from quiz_access_rule_base which each encapsulate a particular rule. For example, there will be a open_close_date_access_rule, a time_limit_access_rule, and so on. Thus, all the logic for a particular rule is in just one place, and therefore, hopefully, consistent.