Fix logic for showing quiz grading confirmation code. #10829

We now only look at the quiz idnumber when deciding whether to display
the code. This gives maximum flexibility. (E.g. makes it possible to
display the codes on the exam server, which uses different course
short names.)

New unit tests for the new cases, with expected results from
https://css3.open.ac.uk/OSCAR/CalculateConfirmation.aspx
Fix use of deprecated quiz_questions_in_quiz. #11290
Adding behat feature, #11476