In view.php, find where it detects the no questions situation, and add the redirect there:
https://github.com/moodle/moodle/blob/master/mod/quiz/view.php#L191
In view.php, find where it detects the no questions situation, and add the redirect there:
https://github.com/moodle/moodle/blob/master/mod/quiz/view.php#L191