Logged in as a student:
1. Go to the gradebook, click on the link that is the name of a quiz. You should end up at the view.php page for that quiz, which shows you what attempts (if any) you have made.
Logged in as teacher.
2. Go to the grader report. Click on the name of a quiz. You should end up at the overview (grades) report for that quiz.
3. Go to the user report for a user who has attempted the quiz. Click on the name of the quiz. You should be taken to the review page for the quiz attempt that lead to the user getting that score.
4. Go to the user report for a user who has not attempted the quiz. Click on the name of the quiz. You should be taken to the overview (grades) report for that quiz. (This is not ideal, but there is no better page we could send users too.)
5. Edit the permissions for the teacher role, so that they do not have mod/quiz:viewreports (but do still have quiz/statistics:view). Repeat 2. and 4. The teacher should now be redirected from the gradebook to the quiz statistics report.
6. Edit the permissions for the teacher role, and remove all three quiz report capabilities (mod/quiz:viewreports, mod/quiz:grade and quiz/statistics:view). Repeat 2. and 4. and verify the teacher is now redirected to the quiz view.php page.
7. Repeat 3., for four different quizzes, one set to each of the four different grading methods (first/last/highest/average), and for a user who has multiple quiz attempts. (Or, just change then setting on one quiz). Verify that you are redirected to the 'right' attempt review based on this setting.